/* nicekin.css - Pinterest-inspired design system for hotmoan.com */
/* Total redesign: clean, modern, professional, massively improved UX */

/* ===================================================
   CSS CUSTOM PROPERTIES
   =================================================== */
:root {
  /* Brand colors */
  --primary:         #E60023;   /* Pinterest red */
  --primary-hover:   #AD081B;
  --primary-light:   #FFEEF0;
  --primary-glow:    rgba(230, 0, 35, 0.15);

  /* Neutrals */
  --bg:              #EFEFEF;   /* Pinterest's page background */
  --surface:         #FFFFFF;
  --surface-2:       #F8F8F8;
  --border:          #E0E0E0;
  --text-primary:    #111111;
  --text-secondary:  #767676;
  --text-muted:      #AAAAAA;

  /* Semantic */
  --success-color:   #0a9928;
  --danger-color:    #E60023;

  /* Shape */
  --radius-xs:       4px;
  --radius-sm:       8px;
  --radius:          16px;
  --radius-lg:       24px;
  --radius-full:     9999px;

  /* Shadow */
  --shadow-xs:       0 1px 3px rgba(0,0,0,0.08);
  --shadow-sm:       0 2px 8px rgba(0,0,0,0.10);
  --shadow:          0 6px 20px rgba(0,0,0,0.13);
  --shadow-lg:       0 12px 40px rgba(0,0,0,0.18);
  --shadow-xl:       0 24px 64px rgba(0,0,0,0.22);

  /* Motion */
  --transition:      all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font:            'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:       'Courier New', monospace;

  /* Legacy aliases (keep old names working) */
  --primary-color:   #E60023;
  --secondary-color: #EFEFEF;
  --dark-color:      #111111;
  --light-color:     #F8F8F8;
  --border-radius:   16px;
  --box-shadow:      0 2px 8px rgba(0,0,0,0.10);
}

/* ===================================================
   RESET & BASE
   =================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding-bottom: 75px; /* room for fixed footer nav */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

/* ===================================================
   NAVBAR
   =================================================== */
.navbar {
  background: var(--surface) !important;
  box-shadow: 0 1px 0 var(--border) !important;
  padding: 0.55rem 0 !important;
  position: sticky !important;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  font-size: 1.9rem !important;
  font-weight: 900 !important;
  color: var(--primary) !important;
  letter-spacing: -1.5px;
  flex-shrink: 0;
}
.navbar-brand:hover { color: var(--primary-hover) !important; }

/* Centered search bar */
.navbar-search {
  flex: 1;
  max-width: 560px;
  margin: 0 1rem;
}
.navbar-search .search-wrap {
  background: var(--bg);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  transition: var(--transition);
}
.navbar-search .search-wrap:focus-within {
  background: white;
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}
.navbar-search .search-icon {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-right: 8px;
  flex-shrink: 0;
}
.navbar-search input {
  background: transparent;
  border: none;
  outline: none;
  padding: 0.55rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-primary);
  width: 100%;
}
.navbar-search input::placeholder { color: var(--text-secondary); }

/* Nav icon buttons */
.nav-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-primary) !important;
  font-size: 1.1rem;
  transition: var(--transition);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}
.nav-icon-btn:hover {
  background: var(--bg);
  color: var(--text-primary) !important;
}

/* Profile thumbnail in navbar */
.nav-profile-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.nav-profile-thumb:hover { border-color: var(--text-primary); }

/* Navbar nav links */
.nav-link {
  color: var(--text-primary) !important;
  font-weight: 700 !important;
  border-radius: var(--radius-full) !important;
  padding: 0.45rem 0.9rem !important;
  transition: var(--transition) !important;
  font-size: 0.9rem !important;
}
.nav-link:hover {
  background: var(--bg) !important;
  color: var(--text-primary) !important;
}

/* ===================================================
   DROPDOWN
   =================================================== */
.dropdown-menu {
  background: var(--surface) !important;
  border: none !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: var(--radius) !important;
  padding: 0.5rem !important;
  min-width: 190px;
  animation: dropIn 0.15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  color: var(--text-primary) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.6rem 0.9rem !important;
  font-weight: 700;
  font-size: 0.88rem;
  transition: var(--transition);
}
.dropdown-item:hover {
  background: var(--bg) !important;
  color: var(--primary) !important;
}
.dropdown-divider { border-color: var(--border) !important; }

/* ===================================================
   NOTIFICATION / VISITOR BADGES
   =================================================== */
.notification-bell,
.visitor-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  padding: 0.1rem 0.38rem;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 17px;
  text-align: center;
  line-height: 1.5;
  border: 1.5px solid white;
}

/* ===================================================
   MOBILE QUICK-LINKS BAR
   =================================================== */
.mobile-profile-links {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-profile-links::-webkit-scrollbar { display: none; }
.mobile-profile-links .container { display: flex; gap: 4px; padding: 0 12px; }
.mobile-profile-links a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.mobile-profile-links a:hover {
  background: var(--bg);
  color: var(--primary);
}

/* ===================================================
   TOP POST BANNER
   =================================================== */
.top-post-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
  font-size: 12.5px;
}
.top-post-content {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
  vertical-align: middle;
}
.top-post-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.top-post-score {
  background: var(--success-color);
  color: white;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
}

/* ===================================================
   CATEGORY NAVIGATION PILLS
   =================================================== */
.category-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav-inner {
  display: inline-flex;
  gap: 8px;
  padding: 0 16px;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  text-decoration: none;
  font-family: var(--font);
}
.cat-pill:hover, .cat-pill.active {
  background: var(--text-primary);
  color: white;
}
.cat-pill.active-red {
  background: var(--primary);
  color: white;
}

/* ===================================================
   HERO SECTION
   =================================================== */
.hero-section {
  background: linear-gradient(150deg, #fff5f6 0%, #ffffff 45%, #f0f8ff 100%);
  padding: 3.5rem 0 2.5rem;
  margin: 0;
  text-align: center;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1.5px;
  margin-bottom: 0.75rem;
}
.hero-title .brand { color: var(--primary); }
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 1.5rem;
  font-weight: 500;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.hero-stat-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  display: block;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===================================================
   SIGNUP CARD
   =================================================== */
.signup-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  border: none;
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
}
.signup-card .card-header {
  background: var(--primary);
  color: white;
  font-size: 1.25rem;
  font-weight: 900;
  padding: 1.25rem 1.5rem;
  border: none;
  border-radius: 0;
}
.signup-card .card-body { padding: 1.75rem; }

/* ===================================================
   SECTION HEADER
   =================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 1rem;
}
.section-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0;
}

/* ===================================================
   MASONRY PIN GRID  — JS-managed column divs
   Each .pin-col is an independent flex column; items
   are appended by JS (shortest-column-first) so nothing
   already rendered ever shifts position on load-more.
   =================================================== */
.pin-container {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 0;
}

/* Each column div created by JS */
.pin-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Tighter gaps on small phone screens to maximise card width */
@media (max-width: 480px) {
  .pin-container { gap: 8px; }
  .pin-col        { gap: 8px; }
}

.pin-item {
  width: 100%;
  animation: pinFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes pinFadeIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ===================================================
   PIN CARD  (the hero component)
   =================================================== */
.pin-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
  display: block;
  text-decoration: none;
  /* will-change applied only on hover to avoid holding GPU layers for every card */
}
.pin-card:hover {
  will-change: transform;
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}

/* Image wrapper – holds the hover overlay */
.pin-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #e8e8e8;
  display: block;
  min-height: 180px; /* placeholder so masonry column heights are measurable before images load */
}

.pin-image {
  width: 100%;
  display: block;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  opacity: 0;
}
.pin-image.loaded {
  opacity: 1;
}
.pin-card:hover .pin-image {
  transform: scale(1.05);
}

/* Dark scrim that appears on hover */
.pin-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.2s ease;
  pointer-events: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.pin-card:hover .pin-img-wrapper::after {
  background: rgba(0,0,0,0.28);
}

/* Overlay buttons that appear on hover */
.pin-hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
  pointer-events: none;
}
.pin-card:hover .pin-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.pin-overlay-top {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: flex-start;
}
.pin-overlay-bottom {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 6px;
}

/* The big red "Save" button */
.btn-pin-save {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  font-family: var(--font);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.btn-pin-save:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}
/* "•••" more button */
.btn-pin-more {
  width: 34px;
  height: 34px;
  background: white;
  color: var(--text-primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  flex-shrink: 0;
  font-family: var(--font);
}
.btn-pin-more:hover { background: var(--bg); }

/* "Visit" badge on bottom left */
.btn-pin-visit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.92);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  backdrop-filter: blur(4px);
}
.btn-pin-visit:hover {
  background: white;
  color: var(--text-primary);
}

/* Pin card info beneath image */
.pin-info {
  padding: 9px 12px 12px;
}
.pin-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pin-author {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.pin-author-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}
.pin-author-name {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pin-author-name:hover { color: var(--text-primary); }
.pin-count {
  font-size: 0.73rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

/* Legacy pin classes - kept for backward compat */
.pin-content { padding: 9px 12px 12px; }
.pin-user { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 4px; }
.pin-user a { color: var(--text-secondary); font-weight: 600; }
.pin-user a:hover { color: var(--text-primary); }
.pin-stats { font-size: 0.73rem; color: var(--text-muted); margin-bottom: 5px; }
.pin-actions { display: flex; justify-content: flex-end; }
.pin-button {
  border-radius: var(--radius-full) !important;
  padding: 4px 12px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
}

/* ===================================================
   LOADING INDICATOR — skeleton shimmer
   =================================================== */
/* individual skeleton card */
.skeleton-card {
  border-radius: var(--radius, 12px);
  overflow: hidden;
  background: #f0f0f0;
  animation: skeletonFadeIn 0.3s ease both;
}
@keyframes skeletonFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.skeleton-img {
  width: 100%;
  background: linear-gradient(90deg, #ececec 25%, #f8f8f8 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite ease-in-out;
}
.skeleton-body {
  padding: 10px 10px 12px;
}
.skeleton-line {
  height: 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #ececec 25%, #f8f8f8 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite ease-in-out;
}
.skeleton-line.short { width: 55%; }
.skeleton-line.medium { width: 75%; }
.skeleton-avatar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.skeleton-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(90deg, #ececec 25%, #f8f8f8 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite ease-in-out;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.no-more-pins {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  border-radius: var(--radius-full) !important;
  font-weight: 700;
  font-family: var(--font);
  padding: 0.55rem 1.25rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}
.btn-primary {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-hover) !important;
  color: white !important;
  box-shadow: 0 4px 14px rgba(230,0,35,0.35) !important;
  transform: translateY(-1px);
}
.btn-outline-primary {
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
}
.btn-outline-primary:hover {
  background: var(--primary) !important;
  color: white !important;
}
.btn-secondary, .btn-outline-secondary {
  background: var(--bg) !important;
  color: var(--text-primary) !important;
  border: 2px solid var(--border) !important;
}
.btn-outline-secondary:hover {
  background: var(--border) !important;
  border-color: var(--text-secondary) !important;
}
.btn-dark {
  background: var(--text-primary) !important;
  color: white !important;
}
.btn-dark:hover { background: #333 !important; color: white !important; }
.btn-sm {
  padding: 0.32rem 0.85rem !important;
  font-size: 0.8rem !important;
}
.btn-lg { padding: 0.75rem 1.75rem !important; font-size: 1rem !important; }
.btn-success { background: var(--success-color) !important; color: white !important; border-color: var(--success-color) !important; }
.btn-danger  { background: var(--danger-color) !important; color: white !important; border-color: var(--danger-color) !important; }
.btn-link { background: transparent !important; border: none !important; color: var(--primary) !important; padding: 0 !important; }

/* ===================================================
   FORMS
   =================================================== */
.form-control, .form-select {
  border-radius: var(--radius-sm) !important;
  border: 2px solid var(--border) !important;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-family: var(--font);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface) !important;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--text-primary) !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.07) !important;
  outline: none;
}
.form-label {
  font-weight: 700;
  font-size: 0.87rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
textarea.form-control { min-height: 95px; resize: vertical; }
.form-text { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; }
.input-group-text {
  background: var(--bg) !important;
  border: 2px solid var(--border) !important;
  border-right: none !important;
  color: var(--text-secondary);
  font-weight: 700;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
}
.input-group .form-control {
  border-left: none !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* ===================================================
   CARDS
   =================================================== */
.card {
  background: var(--surface);
  border: none !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-xs) !important;
  margin-bottom: 1rem;
  overflow: hidden;
}
.card-header {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  font-weight: 800;
  padding: 0.9rem 1.25rem;
  font-size: 0.92rem;
}
.card-body { padding: 1.25rem; }
.card-footer {
  background: var(--surface-2) !important;
  border-top: 1px solid var(--border) !important;
  padding: 0.75rem 1.25rem;
}
.card-img-top {
  width: 100%;
  object-fit: cover;
  max-height: 280px;
}

/* Cute card (legacy) */
.cute-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  overflow: hidden;
}
.cute-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cute-card .user-avatar { border: 2px solid var(--primary-light); }
.cute-card .user-score {
  background: var(--primary);
  color: white;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-block;
}

/* ===================================================
   PROFILE
   =================================================== */
.profile-header {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.5rem;
}
.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), #e8f4ff);
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -2.5rem -2rem 0;
  overflow: hidden;
}
.profile-photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--surface);
  box-shadow: var(--shadow);
  margin: -70px auto 1rem;
  display: block;
  position: relative;
}
.profile-username {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}
.profile-bio {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 420px;
  margin: 0 auto 1rem;
}
.profile-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.profile-stat {
  text-align: center;
  flex: 1;
  max-width: 120px;
}
.profile-stat + .profile-stat { border-left: 1px solid var(--border); }
.profile-stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
  display: block;
  letter-spacing: -0.5px;
}
.profile-stat-label {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-info p { margin-bottom: 0.4rem; font-size: 0.9rem; }
.profile-info strong { font-weight: 700; }

/* ===================================================
   USER CARDS (browse page)
   =================================================== */
.user-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
}
.user-card {
  text-align: center;
  transition: var(--transition);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.user-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.user-info { margin-top: 0.75rem; }
.user-username {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.user-location { color: var(--text-secondary); font-size: 0.82rem; font-weight: 600; }
.user-score {
  display: inline-block;
  background: var(--text-primary);
  color: white;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ===================================================
   BOARD CARDS
   =================================================== */
.board-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}
.board-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  color: inherit;
}
.board-cover {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 90px 90px;
  gap: 2px;
  background: var(--bg);
}
.board-cover-img {
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--bg);
}
.board-cover-img.main { grid-row: 1 / 3; }
.board-cover-placeholder {
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
}
.board-info { padding: 12px 14px; }
.board-name { font-size: 0.95rem; font-weight: 800; margin-bottom: 2px; }
.board-meta { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; }

/* ===================================================
   SINGLE PIN DETAIL PAGE
   =================================================== */
/* ── PIN DETAIL: two-column layout on desktop, stacked on mobile ── */
.pin-detail-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); /* 58/42 split */
  gap: 0;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.13);
  max-width: 980px;
  margin: 1.5rem auto;
  /* Desktop: keep entire card within the viewport so comments are scrollable */
  max-height: 92vh;
}

.pin-detail-image {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* On desktop the image fills the column height */
  max-height: 92vh;
}
.pin-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* show full image, not cropped */
  display: block;
  max-height: 92vh;
}

.pin-detail-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;           /* children scroll internally on desktop */
  background: #fff;
  border-left: 1px solid #efefef;
  max-height: 92vh;
  /* No padding here — each child section has its own padding */
}

/* ── Mobile: single-column, natural page scroll ── */
@media (max-width: 768px) {
  .pin-detail-wrapper {
    display: block;           /* switch off grid entirely on mobile */
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;         /* let page scroll naturally */
    overflow: visible;
  }

  .pin-detail-image {
    width: 100%;
    max-height: 80vw;         /* tall enough for portrait photos */
    min-height: 220px;
    background: #000;
  }
  .pin-detail-image img {
    max-height: 80vw;
    object-fit: contain;
  }

  .pin-detail-info {
    max-height: none;         /* show all content; page scrolls */
    overflow: visible;
    border-left: none;
    border-top: 1px solid #efefef;
  }

  /* Comments scroll area: on mobile just flows with the page */
  #comments-scroll-area {
    overflow-y: visible !important;
    max-height: none !important;
    flex: none !important;
  }

  /* Make action buttons wrap cleanly on narrow screens */
  #pin-action-row {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 12px;
  }

  /* Larger tap target for like/comment icon buttons */
  #pin-action-row button,
  #pin-action-row a {
    min-height: 40px;
    min-width: 40px;
  }
}
.pin-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.pin-detail-title {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}
.pin-detail-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.pin-detail-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}
.pin-detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
}
.pin-detail-author:hover { color: var(--primary); }
.pin-detail-author img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.pin-detail-author-info strong { display: block; font-weight: 800; font-size: 0.9rem; }
.pin-detail-author-info span { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; }

/* Share buttons */
.share-buttons {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
}
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share-btn-telegram { background: #0088cc; color: white; }
.share-btn-whatsapp { background: #25D366; color: white; }
.share-btn-twitter  { background: #000000; color: white; }
.share-btn-fb       { background: #1877F2; color: white; }

/* Pin boards list */
.boards-pinned { list-style: none; padding: 0; margin: 0; }
.boards-pinned li + li { border-top: 1px solid var(--border); }
.boards-pinned a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.87rem;
  text-decoration: none;
}
.boards-pinned a:hover { color: var(--primary); }
.boards-pinned a i { color: var(--text-muted); font-size: 0.8rem; }

/* Related pins section */
.related-pins-section { margin-top: 2.5rem; }

/* ===================================================
   COMMENTS
   =================================================== */
.comments-list { max-height: 300px; overflow-y: auto; padding-right: 4px; }
.comment-item {
  display: flex;
  gap: 8px;
  margin-bottom: 0.6rem;
  align-items: flex-start;
}
.comment-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.comment-bubble {
  background: var(--bg);
  border-radius: 4px var(--radius-sm) var(--radius-sm) var(--radius-sm);
  padding: 0.5rem 0.75rem;
  flex: 1;
}
.comment-author {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 1px;
}
.comment-text { font-size: 0.85rem; margin: 0; line-height: 1.45; }
.comment-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 3px; display: block; }

/* Legacy comment styles */
.comment {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: 0.6rem;
  font-size: 0.87rem;
}
.comment-form { margin-top: 0.75rem; }

/* ===================================================
   STATUS / FEED
   =================================================== */
.status-container {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  margin-bottom: 1rem;
  overflow: hidden;
}
.status-content { padding: 1.25rem; }
.status-footer {
  padding: 0.9rem 1.25rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.status-actions { display: flex; gap: 8px; margin-top: 0.5rem; }

/* ===================================================
   FIXED FOOTER NAV (mobile bottom bar)
   =================================================== */
.fixed-footer-nav {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -1px 0 var(--border), 0 -4px 20px rgba(0,0,0,0.06);
  z-index: 1020;
  padding: 0;
  border-top: 1px solid var(--border);
}
.footer-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 58px;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 8px;
}
.footer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  letter-spacing: 0.2px;
  min-width: 48px;
}
.footer-nav-item i { font-size: 1.2rem; margin-bottom: 2px; }
.footer-nav-item:hover, .footer-nav-item.active { color: var(--text-primary); }
.footer-nav-primary { color: var(--text-primary); }
.upload-button-circle {
  background: var(--primary);
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1px;
  box-shadow: 0 4px 14px rgba(230,0,35,0.4);
  transition: var(--transition);
}
.upload-button-circle:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(230,0,35,0.45); }
.upload-button-circle i { color: white; font-size: 1.25rem; margin: 0; }

/* ===================================================
   MODAL
   =================================================== */
.modal-content {
  border: none !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  box-shadow: var(--shadow-xl) !important;
}
.modal-header {
  border-bottom: 1px solid var(--border) !important;
  padding: 1rem 1.25rem !important;
  background: var(--surface);
}
.modal-title { font-weight: 800 !important; font-size: 1rem !important; }
.modal-body { padding: 1.25rem !important; }
.btn-close { opacity: 0.5; }
.btn-close:hover { opacity: 1; }

/* Progress bar */
.progress { height: 4px; border-radius: 2px; background: var(--bg); }
.progress-bar { background: var(--primary); }

/* ===================================================
   ALERTS & BADGES
   =================================================== */
.alert {
  border-radius: var(--radius-sm) !important;
  border: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}
.alert-info { background: #e8f4ff; color: #0069c0; }
.alert-success { background: #e6f9ec; color: #0a7020; }
.alert-danger { background: #ffeef0; color: #c00020; }
.alert-warning { background: #fff8e6; color: #8a6000; }

.badge {
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
}

/* ===================================================
   SPINNER / BOOTSTRAP OVERRIDE
   =================================================== */
.spinner-border { color: var(--primary) !important; }

/* ===================================================
   UPLOAD PREVIEW
   =================================================== */
#preview-placeholder {
  cursor: pointer;
  transition: background 0.2s;
  border: 2px dashed var(--border) !important;
  border-radius: var(--radius) !important;
  min-height: 260px;
}
#preview-placeholder:hover { background: var(--bg) !important; border-color: var(--primary) !important; }

/* ===================================================
   UTILITY
   =================================================== */
.text-primary-brand { color: var(--primary) !important; }
.bg-primary-brand { background: var(--primary) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }
.fw-black { font-weight: 900 !important; }
.letter-tight { letter-spacing: -0.5px; }

/* ===================================================
   CUSTOM SCROLLBAR
   =================================================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ===================================================
   RESPONSIVE HELPERS
   =================================================== */
@media (max-width: 768px) {
  .hero-title { font-size: 1.9rem; }
  .pin-detail-wrapper { border-radius: 0; box-shadow: none; margin: 0; }
  .profile-header { padding: 1.5rem 1.25rem; }
  .profile-photo { width: 110px; height: 110px; margin-top: -55px; }
  .profile-cover { height: 140px; margin: -1.5rem -1.25rem 0; }
  .section-title { font-size: 1.2rem; }
}
@media (max-width: 480px) {
  .hero-stats { gap: 1.25rem; }
  .hero-stat-val { font-size: 1.3rem; }
  .navbar-brand { font-size: 1.5rem !important; }
}
