/* ==========================================
   WALLPAPER HUB - MAIN CSS
   Dark theme, Lexica-inspired
========================================== */

:root {
  --bg-primary:   #0a0a0f;
  --bg-secondary: #111118;
  --bg-card:      #16161e;
  --bg-hover:     #1e1e28;
  --bg-input:     #1a1a24;
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);
  --text-primary: #f0f0f8;
  --text-secondary: #8888a4;
  --text-muted:   #555570;
  --accent:       #6366f1;
  --accent-hover: #4f52e0;
  --accent-glow:  rgba(99,102,241,0.25);
  --success:      #22c55e;
  --danger:       #ef4444;
  --warning:      #f59e0b;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.5);
  --header-height:60px;
  --sidebar-width:240px;
  --transition:   0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

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

/* ==========================================
   SCROLLBAR
========================================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

/* ==========================================
   BUTTONS
========================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-md);
  border: none; cursor: pointer; font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all var(--transition);
  white-space: nowrap; user-select: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 15px var(--accent-glow); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-hover); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-action {
  background: rgba(0,0,0,0.6); color: var(--text-primary);
  border: 1px solid var(--border); backdrop-filter: blur(8px);
  padding: 10px 16px;
}
.btn-action:hover { border-color: var(--accent); color: var(--accent); }
.btn-action.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ==========================================
   HEADER
========================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}
.header-inner {
  max-width: 1600px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 20px; height: 100%;
}
.site-logo {
  display: flex; align-items: center; gap: 9px;
  flex-shrink: 0; text-decoration: none;
}
.site-logo:hover .logo-desktop { color: var(--accent); }
.logo-icon { flex-shrink: 0; display: block; }
.logo-text { display: flex; align-items: baseline; gap: 0; line-height: 1; }
.logo-motion { color: var(--accent); font-weight: 300; font-size: 18px; letter-spacing: -0.2px; }
.logo-desktop { color: var(--text-primary); font-weight: 800; font-size: 18px; letter-spacing: -0.5px; transition: color 0.2s; }
.header-nav { display: flex; align-items: center; gap: 4px; }
.nav-categories { display: flex; gap: 2px; }
.nav-cat-link {
  padding: 6px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  transition: all var(--transition);
}
.nav-cat-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.header-search { flex: 1; max-width: 400px; }
.search-form { position: relative; }
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 12px; color: var(--text-muted); pointer-events: none; flex-shrink: 0; }
.search-input {
  width: 100%; padding: 10px 12px 10px 40px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px;
  transition: border-color var(--transition);
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* User Dropdown */
.user-dropdown { position: relative; }
.user-avatar-btn { background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; }
.user-avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-hover); }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); min-width: 200px;
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: all var(--transition);
}
.user-dropdown:hover .dropdown-menu,
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dropdown-header strong { display: block; color: var(--text-primary); font-size: 14px; }
.dropdown-email { color: var(--text-muted); font-size: 12px; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; color: var(--text-secondary); font-size: 14px;
  transition: all var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-item-danger:hover { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 8px; }

/* Search Suggestions */
.search-suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  z-index: 300; overflow: hidden;
}
.search-suggestions.hidden { display: none; }
.suggestion-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  color: var(--text-secondary); font-size: 14px;
  transition: background var(--transition);
}
.suggestion-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.suggestion-type { font-size: 11px; color: var(--text-muted); }

/* ==========================================
   FLASH MESSAGES
========================================== */
.flash-messages { position: fixed; top: calc(var(--header-height) + 12px); right: 16px; z-index: 500; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-md);
  border: 1px solid; font-size: 14px; box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease;
}
.flash-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: #4ade80; }
.flash-error { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #f87171; }
.flash-close { background: none; border: none; color: inherit; cursor: pointer; margin-left: auto; opacity: 0.7; padding: 0; }
.flash-close:hover { opacity: 1; }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ==========================================
   MASONRY GRID + WALLPAPER CARDS
========================================== */
.masonry-grid {
  columns: 5 200px; column-gap: 10px; padding: 0 20px;
  max-width: 1800px; margin: 0 auto;
}

/* ==========================================
   WALLPAPER CARD — DeviantArt 2026 style
========================================== */
.wallpaper-card {
  break-inside: avoid; margin-bottom: 10px;
  border-radius: 10px; overflow: hidden;
  background: var(--bg-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.wallpaper-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.5); }

.card-link { display: block; color: inherit; text-decoration: none; cursor: pointer; }

/* Media box — natural aspect ratio */
.card-media-box { position: relative; overflow: hidden; background: var(--bg-secondary); }
.card-img {
  width: 100%; height: auto; display: block;
  transition: transform 0.4s ease;
  min-height: 80px;
}
.card-img.lazy { opacity: 0; transition: opacity 0.3s ease, transform 0.4s ease; }
.card-img.loaded { opacity: 1; }
.wallpaper-card:hover .card-img { transform: scale(1.04); }

/* Video overlay */
.card-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.card-video.playing { opacity: 1; }
.wallpaper-card:hover .card-video.has-src { opacity: 1; }

/* GIF animated overlay (same pattern as video) */
.card-gif {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.25s;
  image-rendering: auto;
  pointer-events: none;
}
.card-gif.playing { opacity: 1; }
/* Suppress thumbnail zoom when GIF is playing */
.wallpaper-card[data-type="3"]:hover .card-img { transform: none; }

/* Badges (always visible) */
.card-badges {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 4px; pointer-events: none;
}
.card-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 20px;
  backdrop-filter: blur(8px);
}
.badge-live { background: rgba(239,68,68,0.85); color: #fff; }
.badge-gif  { background: rgba(168,85,247,0.85); color: #fff; }
.badge-image { background: rgba(0,0,0,0.55); color: rgba(255,255,255,0.85); }
.badge-res  { background: rgba(0,0,0,0.6); color: rgba(255,255,255,0.9); margin-left: auto; }

/* GIF badge animated pulse dot */
.gif-badge-dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: currentColor;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 1px;
  animation: gifDotPulse 1.4s ease-in-out infinite;
}
@keyframes gifDotPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

/* LIVE badge animated pulse dot (recording-style) */
.live-badge-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 1px;
  animation: liveDotPulse 1s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
}
@keyframes liveDotPulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(255,255,255,0.7); }
  70%  { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(255,255,255,0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(255,255,255,0); }
}

/* GIF hover loading state */
.wallpaper-card[data-type="3"].gif-loading .card-media-box::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  z-index: 3;
}

/* Hover overlay with action buttons */
.card-hover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
  opacity: 0; transition: opacity 0.2s ease;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 10px;
  pointer-events: none;
}
.wallpaper-card:hover .card-hover-overlay { opacity: 1; pointer-events: auto; }

.card-hover-actions { display: flex; gap: 6px; }
.card-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px; padding: 5px 10px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.card-action-btn:hover { background: rgba(255,255,255,0.28); transform: scale(1.05); }
.card-like-btn.liked { color: #f87171; border-color: rgba(248,113,113,0.5); }
.card-like-btn.liked svg { fill: currentColor; }
.card-action-btn svg { flex-shrink: 0; }

/* Card footer (below image) */
.card-footer {
  padding: 9px 10px 10px;
  background: var(--bg-card);
}
.card-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  margin: 0 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.3;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.card-author {
  display: flex; align-items: center; gap: 5px;
  color: var(--text-muted); font-size: 11px;
  overflow: hidden; max-width: 70%;
}
.card-author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-author:hover { color: var(--accent); }
.card-avatar { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.card-views { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

.empty-grid { break-inside: avoid; width: 100%; }
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px;
  text-align: center; color: var(--text-secondary);
}
.empty-state .empty-icon { color: var(--text-muted); margin-bottom: 20px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--text-primary); }
.empty-state p { margin-bottom: 20px; }

/* ==========================================
   HERO SECTION
========================================== */
.hero-section {
  padding: 80px 20px 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.12) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.15;
  color: var(--text-primary); margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.gradient-text {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle { font-size: 18px; color: var(--text-secondary); margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-search-form { max-width: 680px; margin: 0 auto 24px; }
.hero-search-wrap {
  display: flex; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl); padding: 6px 8px 6px 20px;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-md); }
.hero-search-icon { color: var(--text-muted); flex-shrink: 0; }
.hero-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 17px; padding: 8px 14px;
}
.hero-search-input::placeholder { color: var(--text-muted); }
.hero-search-btn {
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-lg);
  padding: 10px 24px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background var(--transition);
}
.hero-search-btn:hover { background: var(--accent-hover); }
.hero-tags { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; color: var(--text-muted); font-size: 14px; }
.hero-tags a {
  color: var(--text-secondary); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 14px; font-size: 13px;
  transition: all var(--transition);
}
.hero-tags a:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================
   SECTIONS
========================================== */
.trending-section, .categories-section, .creators-section, .cta-section {
  padding: 48px 0;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; margin-bottom: 24px; max-width: 1800px; margin-left: auto; margin-right: auto; margin-bottom: 24px;
}
.section-title-group { display: flex; align-items: center; gap: 10px; }
.section-icon { color: var(--accent); }
.section-title { font-size: 22px; font-weight: 700; }
.sort-tabs { display: flex; gap: 4px; }
.sort-tab {
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  color: var(--text-secondary); transition: all var(--transition);
  font-weight: 500;
}
.sort-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.sort-tab.active { background: var(--accent); color: #fff; }

/* Categories Grid */
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; padding: 0 20px; max-width: 1800px; margin: 0 auto;
}
.category-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 20px;
  text-align: center; transition: all var(--transition);
  color: var(--text-primary);
}
.category-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--text-primary); }
.category-icon { color: var(--accent); margin: 0 auto 12px; }
.category-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.category-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.category-count { font-size: 12px; color: var(--text-muted); }

/* Top Creators */
.creators-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; padding: 0 20px; max-width: 1800px; margin: 0 auto;
}
.creator-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: all var(--transition); color: var(--text-primary);
}
.creator-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text-primary); }
.creator-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-hover); flex-shrink: 0; }
.creator-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.creator-stats { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }

/* Stats Section */
.stats-section {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  max-width: 1400px; margin: 0 auto; padding: 60px 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; text-align: center;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stat-icon { color: var(--accent); }
.stat-value { font-size: 36px; font-weight: 800; color: var(--text-primary); }
.stat-label { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

/* CTA Section */
.cta-section {
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.15) 0%, transparent 70%);
  border-top: 1px solid var(--border);
}
.cta-inner {
  max-width: 700px; margin: 0 auto; padding: 80px 20px;
  text-align: center;
}
.cta-icon { color: var(--accent); margin: 0 auto 24px; }
.cta-title { font-size: 34px; font-weight: 800; margin-bottom: 16px; }
.cta-text { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================
   LOAD MORE
========================================== */
.load-more-wrap { text-align: center; padding: 32px 20px; }
.load-more-btn { min-width: 160px; }
.loading-spinner { display: flex; justify-content: center; padding: 20px; }
.loading-spinner.hidden, .hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.9s linear infinite; }

/* ==========================================
   WALLPAPER DETAIL PAGE
========================================== */
.wallpaper-page { max-width: 1600px; margin: 0 auto; padding: 32px 20px; }
.wallpaper-page-inner {
  display: grid; grid-template-columns: 1fr 380px;
  gap: 32px; align-items: start;
}
.wallpaper-media-wrap {
  background: var(--bg-secondary); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  min-height: 300px;
}
.wallpaper-image, .wallpaper-video { width: 100%; max-height: 80vh; object-fit: contain; }
.wallpaper-video { max-height: 70vh; }

.wp-fullsize-bar { padding: 6px 12px; text-align: right; }
.wp-fullsize-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  transition: color 0.15s;
}
.wp-fullsize-link:hover { color: var(--accent); }
.wp-fullsize-res { background: rgba(255,255,255,0.07); padding: 1px 7px; border-radius: 10px; font-size: 11px; }

.wallpaper-actions-bar {
  display: flex; gap: 8px; margin: 16px 0 24px; flex-wrap: wrap; align-items: center;
}
.btn-download {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 22px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff; border-radius: 10px; border: none; cursor: pointer;
  transition: opacity 0.18s, transform 0.15s; flex-shrink: 0;
  text-decoration: none;
}
.btn-download:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }
.dl-badge {
  background: rgba(255,255,255,0.22); padding: 1px 7px;
  border-radius: 20px; font-size: 12px; font-weight: 500;
}
.btn-action-count {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; font-size: 14px; border-radius: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: var(--text-secondary); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-action-count:hover { background: rgba(255,255,255,0.10); color: var(--text-primary); }
.btn-action-count.liked { color: #f87171; border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.10); }
.btn-action-count.liked .action-icon { color: #f87171; }
.btn-action-count.favorited { color: #facc15; border-color: rgba(250,204,21,0.35); background: rgba(250,204,21,0.08); }
.btn-action-count.favorited .action-icon { color: #facc15; }

.wp-stats-row {
  display: flex; gap: 0; margin: 0 0 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; overflow: hidden;
}
.wp-stat {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 11px 8px; gap: 3px;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.wp-stat:last-child { border-right: none; }
.wp-stat-icon { color: var(--text-muted); margin-bottom: 2px; }
.wp-stat-val { font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.wp-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }

.save-collection-wrap { position: relative; }
.collection-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 200;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px; min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.collection-dropdown.open { display: block; }
.collection-dropdown-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); padding: 4px 8px 6px; margin: 0; }
.collection-dropdown-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 6px; background: none; border: none;
  color: var(--text-primary); font-size: 13px; cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.collection-dropdown-item:hover { background: var(--bg-hover); }
.collection-dropdown-item .col-count { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.collection-dropdown-empty { padding: 10px; text-align: center; }
.collection-dropdown-empty p { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

/* ---- Wallpaper detail sidebar ---- */
.wallpaper-sidebar {
  position: sticky; top: 90px;
  max-height: calc(100vh - 110px); overflow-y: auto; overflow-x: hidden;
  padding: 22px;
  background: rgba(14,14,24,0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.wallpaper-sidebar::-webkit-scrollbar { width: 4px; }
.wallpaper-sidebar::-webkit-scrollbar-track { background: transparent; }
.wallpaper-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 4px; }

.wallpaper-title { font-size: 20px; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }
.wallpaper-desc { color: var(--text-secondary); margin-bottom: 18px; line-height: 1.7; font-size: 13px; }

.wallpaper-meta { display: flex; flex-direction: column; gap: 0; margin-bottom: 18px; }
.meta-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.meta-item:first-child { padding-top: 0; }
.meta-item:last-child { border-bottom: none; padding-bottom: 0; }
.meta-icon { color: var(--text-muted); flex-shrink: 0; }
.meta-label { color: var(--text-muted); min-width: 88px; flex-shrink: 0; }
.meta-value { color: var(--text-primary); }
.meta-link { color: var(--accent); }
.meta-link:hover { text-decoration: underline; }

.wallpaper-tags { margin-bottom: 18px; }
.tags-heading {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-muted); margin-bottom: 10px;
}
.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: var(--text-secondary); padding: 4px 11px;
  border-radius: 20px; font-size: 12px;
  transition: all var(--transition);
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); background: rgba(99,102,241,0.12); }

.sidebar-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 16px 0; }

.creator-card-block {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px; padding: 14px;
  margin-bottom: 16px;
}
.creator-heading {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 12px;
}
.creator-profile-link { display: flex; align-items: center; gap: 12px; color: var(--text-primary); }
.creator-profile-link:hover .creator-username { color: var(--accent); }
.creator-info-text { display: flex; flex-direction: column; gap: 2px; }
.creator-avatar-md { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.15); flex-shrink: 0; }
.creator-username { font-size: 15px; font-weight: 600; display: block; transition: color 0.15s; }
.creator-view-profile { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: block; }
.wallpaper-date { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 4px; }

/* Comments */
.comments-section { margin-top: 32px; }
.section-heading { font-size: 18px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.comment-count { background: var(--bg-hover); color: var(--text-secondary); font-size: 13px; padding: 2px 8px; border-radius: 20px; }
.count-badge { background: var(--bg-hover); color: var(--text-secondary); font-size: 13px; padding: 2px 8px; border-radius: 20px; }
.comment-form { margin-bottom: 28px; }
.comment-input-wrap { display: flex; gap: 12px; margin-bottom: 10px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; }
.comment-input {
  flex: 1; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  padding: 10px 14px; font-size: 14px; resize: vertical;
  font-family: inherit; transition: border-color var(--transition);
}
.comment-input:focus { outline: none; border-color: var(--accent); }
.comment-form-actions { display: flex; justify-content: flex-end; }
.login-prompt { color: var(--text-secondary); padding: 16px 0; }
.comments-list { display: flex; flex-direction: column; gap: 20px; }
.no-comments { color: var(--text-muted); text-align: center; padding: 30px 0; }
.comment { background: var(--bg-card); border-radius: var(--radius-md); padding: 16px; transition: background var(--transition); }
.comment.reply { margin-left: 36px; background: var(--bg-secondary); border: 1px solid var(--border); }
.comment.removing { opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; position: relative; }
.comment-meta { display: flex; flex-direction: column; flex: 1; }
.comment-username { font-size: 13px; font-weight: 600; color: var(--text-primary); text-decoration: none; }
.comment-username:hover { color: var(--accent); }
.comment-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.comment-body p { font-size: 14px; line-height: 1.6; color: var(--text-secondary); margin: 0; word-break: break-word; }
/* Comment actions row */
.comment-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.comment-like-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; color: var(--text-muted); font-size: 12px; cursor: pointer; padding: 3px 6px; border-radius: 6px; transition: color .15s, background .15s; }
.comment-like-btn:hover { color: #f87171; background: rgba(248,113,113,.1); }
.comment-like-btn.liked { color: #f87171; }
.comment-like-btn.liked .clk-icon { fill: #f87171; }
.comment-like-btn .clk-icon { width: 13px; height: 13px; stroke: currentColor; fill: none; transition: fill .15s; }
.comment-like-count { font-size: 12px; line-height: 1; min-width: 10px; }
.reply-btn { background: none; border: none; color: var(--text-muted); font-size: 12px; cursor: pointer; padding: 3px 6px; border-radius: 6px; transition: color .15s, background .15s; }
.reply-btn:hover { color: var(--accent); background: rgba(99,102,241,.1); }
/* Delete button — top-right of comment header */
.comment-delete-btn { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 3px; border-radius: 4px; display: flex; align-items: center; opacity: 0; transition: opacity .15s, color .15s; }
.comment:hover .comment-delete-btn { opacity: 1; }
.comment-delete-btn:hover { color: #f87171; }
.comment-delete-btn svg { width: 13px; height: 13px; }
/* Replies */
.comment-replies { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
/* Reply form */
.reply-form { margin-top: 12px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; }
.reply-form-row { display: flex; gap: 10px; align-items: flex-start; }
.reply-textarea { flex: 1; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); padding: 8px 12px; font-size: 13px; font-family: inherit; resize: none; min-height: 60px; transition: border-color var(--transition); overflow: hidden; }
.reply-textarea:focus { outline: none; border-color: var(--accent); }
.reply-form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.reply-char-count { font-size: 11px; color: var(--text-muted); }
.reply-form-btns { display: flex; gap: 8px; }
/* Main comment input char counter */
.comment-form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.comment-char-count { font-size: 11px; color: var(--text-muted); transition: color .15s; }
.comment-char-count.warn { color: #f59e0b; }
.comment-char-count.danger { color: #f87171; }

/* Related Section */
.related-section { margin-top: 40px; }

/* ==========================================
   SEARCH PAGE
========================================== */
.search-page { max-width: 1800px; margin: 0 auto; padding: 32px 0; }
.search-page-header { padding: 0 20px 28px; }
.search-page-form { display: flex; flex-direction: column; gap: 12px; }
.search-input-wrap.large .search-input { font-size: 17px; padding: 14px 14px 14px 48px; border-radius: var(--radius-lg); }
.search-input-wrap.large .search-icon { left: 16px; }
.search-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-select {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  padding: 9px 14px; font-size: 13px; cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--accent); }
.search-results-meta { margin-top: 12px; }
.results-count { color: var(--text-secondary); font-size: 14px; }
.results-count strong { color: var(--text-primary); }
.search-clear { position: absolute; right: 16px; color: var(--text-muted); }
.search-clear:hover { color: var(--text-primary); }

/* ==========================================
   AUTH PAGES
========================================== */
.auth-page {
  min-height: calc(100vh - var(--header-height));
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at 50% 20%, rgba(99,102,241,0.08) 0%, transparent 60%);
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; }
.auth-logo svg { color: var(--accent); }
.auth-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-secondary); font-size: 15px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-footer { text-align: center; color: var(--text-muted); font-size: 14px; margin-top: 20px; }
.auth-footer a { color: var(--accent); }

/* ==========================================
   FORMS
========================================== */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.form-control {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  padding: 11px 14px; font-size: 14px; width: 100%;
  font-family: inherit; transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.form-check input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.required { color: var(--danger); }
.form-submit { margin-top: 8px; }

/* ==========================================
   UPLOAD PAGE
========================================== */
.upload-page { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.upload-header { text-align: center; margin-bottom: 40px; }
.upload-title { font-size: 28px; font-weight: 800; display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 8px; }
.upload-title svg { color: var(--accent); }
.upload-subtitle { color: var(--text-secondary); }

.upload-dropzone {
  background: var(--bg-card); border: 2px dashed var(--border-hover);
  border-radius: var(--radius-xl); margin-bottom: 32px;
  transition: all var(--transition); position: relative;
  overflow: hidden;
}
.upload-dropzone.drag-over { border-color: var(--accent); background: var(--bg-hover); }
.dropzone-content { padding: 60px 20px; text-align: center; cursor: pointer; }
.dropzone-icon { color: var(--text-muted); margin: 0 auto 16px; }
.dropzone-content h3 { font-size: 20px; margin-bottom: 8px; }
.dropzone-content p { color: var(--text-secondary); margin-bottom: 16px; }
.browse-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.accepted-formats { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; color: var(--text-muted); font-size: 13px; }
.accepted-formats span { display: flex; align-items: center; gap: 5px; }
.file-limit { font-size: 12px; color: var(--text-muted); }
.file-input-hidden { position: absolute; opacity: 0; width: 0; height: 0; }

.file-preview { padding: 24px; text-align: center; }
.preview-img, .preview-video { max-height: 300px; max-width: 100%; margin: 0 auto 16px; border-radius: var(--radius-md); }
.file-info { display: flex; gap: 12px; justify-content: center; font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }

.upload-fields { display: flex; flex-direction: column; gap: 20px; margin-bottom: 28px; }
.upload-submit { text-align: center; }
.upload-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.upload-progress { margin-top: 20px; }
.progress-bar { background: var(--bg-hover); border-radius: 4px; height: 6px; margin-bottom: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; }
.progress-text { text-align: center; font-size: 13px; color: var(--text-secondary); }

/* ==========================================
   USER PROFILE PAGE
========================================== */
.profile-page { max-width: 1400px; margin: 0 auto; }
.profile-hero {
  background: linear-gradient(to bottom, rgba(99,102,241,0.05), transparent);
  border-bottom: 1px solid var(--border); padding: 48px 20px;
}
.profile-hero-inner { display: flex; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.profile-avatar-wrap {}
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.profile-info { flex: 1; }
.profile-username { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.profile-bio { color: var(--text-secondary); margin-bottom: 14px; max-width: 500px; line-height: 1.6; }
.profile-links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.profile-link { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 13px; }
.profile-link:hover { color: var(--accent); }
.profile-location { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.profile-stats { display: flex; gap: 32px; }
.profile-stat { text-align: center; }
.profile-stat strong { display: block; font-size: 22px; font-weight: 700; color: var(--text-primary); }
.profile-stat span { font-size: 12px; color: var(--text-muted); }
.profile-actions { margin-left: auto; }
.follow-btn.active { background: transparent; border-color: var(--border-hover); color: var(--text-secondary); }
.profile-content { padding: 40px 20px; }

/* ==========================================
   CATEGORY / TAG PAGES
========================================== */
.category-page, .tag-page, .seo-page { max-width: 1800px; margin: 0 auto; }
.category-page-header, .tag-page-header, .seo-page-header { padding: 40px 20px 28px; }
.page-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.page-description { color: var(--text-secondary); max-width: 600px; margin-bottom: 10px; }

/* SEO Links */
.seo-links-section { padding: 48px 20px; border-top: 1px solid var(--border); }
.seo-links-section h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.seo-links-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.seo-link-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 18px;
  color: var(--text-secondary); font-size: 14px;
  transition: all var(--transition);
}
.seo-link-card:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================
   DASHBOARD
========================================== */
.dashboard-layout { display: flex; min-height: calc(100vh - var(--header-height)); }
.dashboard-sidebar {
  width: var(--sidebar-width); background: var(--bg-secondary);
  border-right: 1px solid var(--border); padding: 24px 12px;
  flex-shrink: 0; position: sticky; top: var(--header-height);
  height: calc(100vh - var(--header-height)); overflow-y: auto;
}
.dashboard-nav { display: flex; flex-direction: column; gap: 4px; }
.dashboard-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-md);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.dashboard-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dashboard-nav-item.active { background: var(--accent); color: #fff; }
.dashboard-nav-divider { height: 1px; background: var(--border); margin: 8px 0; }
.dashboard-main { flex: 1; padding: 32px; overflow-y: auto; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.dashboard-header h1 { font-size: 24px; font-weight: 800; }

.stats-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  display: flex; align-items: center; gap: 14px;
}
.stat-card-icon { color: var(--accent); flex-shrink: 0; }
.stat-card-value { font-size: 26px; font-weight: 800; }
.stat-card-label { font-size: 13px; color: var(--text-muted); }

.dashboard-section { margin-top: 32px; }
.uploads-list { display: flex; flex-direction: column; gap: 2px; }
.upload-list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: var(--radius-md);
  transition: background var(--transition);
}
.upload-list-item:hover { background: var(--bg-hover); }
.upload-thumb { width: 64px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.upload-list-info { flex: 1; min-width: 0; }
.upload-list-title { font-size: 14px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.upload-list-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); margin-top: 4px; flex-wrap: wrap; align-items: center; }
.upload-list-meta span { display: flex; align-items: center; gap: 3px; }
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.status-approved { background: rgba(34,197,94,0.15); color: #4ade80; }
.status-pending { background: rgba(245,158,11,0.15); color: #fbbf24; }

.uploads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.upload-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.upload-card-thumb { width: 100%; height: 130px; object-fit: cover; }
.upload-card-body { padding: 12px; }
.upload-card-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.upload-card-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; margin-bottom: 6px; }
.upload-card-stats { display: flex; gap: 10px; font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.upload-card-stats span { display: flex; align-items: center; gap: 3px; }
.upload-card-actions { display: flex; gap: 8px; }

.collections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.collection-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; text-align: center; }
.collection-icon { color: var(--accent); margin: 0 auto 12px; }
.collection-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.collection-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

.settings-content { max-width: 700px; }
.settings-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.settings-section-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); }
.avatar-group {}
.avatar-upload-wrap { display: flex; align-items: center; gap: 16px; }
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-hover); }
.avatar-upload-controls { display: flex; flex-direction: column; gap: 6px; }

/* ==========================================
   PAGINATION
========================================== */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 32px 20px; flex-wrap: wrap; }
.page-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); padding: 8px 14px;
  border-radius: var(--radius-sm); font-size: 13px;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ==========================================
   ERROR PAGES
========================================== */
.error-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--header-height)); padding: 40px; }
.error-inner { text-align: center; }
.error-icon { color: var(--text-muted); margin: 0 auto 20px; }
.error-code { font-size: 100px; font-weight: 900; color: var(--text-muted); line-height: 1; margin-bottom: 10px; }
.error-title { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.error-text { color: var(--text-secondary); margin-bottom: 28px; }

/* ==========================================
   FOOTER
========================================== */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 60px 20px 30px; margin-top: 60px; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.footer-logo svg { color: var(--accent); }
.footer-tagline { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.footer-seo-links { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-seo-links a {
  color: var(--text-muted); font-size: 12px;
  background: var(--bg-card); padding: 4px 10px;
  border-radius: 20px; border: 1px solid var(--border);
  transition: all var(--transition);
}
.footer-seo-links a:hover { color: var(--accent); border-color: var(--accent); }
.footer-links h4 { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links ul li a { color: var(--text-muted); font-size: 14px; transition: color var(--transition); }
.footer-links ul li a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { color: var(--text-muted); font-size: 13px; }

/* ==========================================
   TOAST
========================================== */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 18px;
  font-size: 14px; box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ==========================================
   LIGHTBOX
========================================== */
#lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#lightbox-overlay.hidden { display: none; }
#lightbox-close { position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.5); border: none; color: #fff; cursor: pointer; padding: 8px; border-radius: 50%; }
#lightbox-content img, #lightbox-content video { max-width: 95vw; max-height: 92vh; border-radius: var(--radius-md); }

/* ==========================================
   ADMIN PANEL LINK (top header)
========================================== */
.admin-link { font-size: 12px; color: var(--warning); }

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 1200px) {
  .masonry-grid { columns: 4 200px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .masonry-grid { columns: 3 160px; }
  .wallpaper-page-inner { grid-template-columns: 1fr; }
  .wallpaper-sidebar {
    order: -1; position: static; max-height: none;
    overflow-y: visible; margin-bottom: 24px;
  }
  .header-nav { display: none; }
  .dashboard-sidebar { display: none; }
  .dashboard-main { padding: 20px; }
}

@media (max-width: 600px) {
  .masonry-grid { columns: 2 140px; column-gap: 8px; padding: 0 12px; }
  .hero-title { font-size: 2rem; }
  .hero-search-wrap { flex-direction: column; padding: 10px; gap: 8px; border-radius: var(--radius-xl); }
  .hero-search-btn { width: 100%; justify-content: center; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .profile-hero-inner { flex-direction: column; align-items: center; text-align: center; }
  .profile-stats { justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .mobile-menu-btn { display: flex; }
  .auth-card { padding: 24px 20px; }
}

@media (max-width: 400px) {
  .masonry-grid { columns: 1; }
}

/* ==========================================
   NAV LINKS (new navigation)
========================================== */
.nav-link {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  transition: all var(--transition); white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--accent); background: rgba(99,102,241,0.12); }
.nav-link svg { flex-shrink: 0; opacity: 0.8; }

/* XP badge in header */
.user-level-badge {
  font-size: 10px; font-weight: 700; background: var(--accent);
  color: #fff; border-radius: 10px; padding: 1px 6px;
  margin-left: 4px; letter-spacing: 0.3px;
}
.user-avatar-btn { gap: 0; align-items: center; }

/* Dropdown XP bar */
.dropdown-xp-wrap { margin-top: 4px; }
.dropdown-xp-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.dropdown-xp-bar-wrap {
  height: 4px; background: var(--bg-hover); border-radius: 4px;
  margin: 4px 0; overflow: hidden;
}
.dropdown-xp-bar { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.4s; }
.dropdown-xp-num { font-size: 10px; color: var(--text-muted); }

/* Upload btn in header */
.header-upload-btn { gap: 5px; }

/* Resolution badge in search */
.res-badge {
  display: inline-block; background: rgba(99,102,241,0.2);
  color: var(--accent); border: 1px solid rgba(99,102,241,0.4);
  border-radius: 6px; font-size: 11px; font-weight: 700;
  padding: 1px 8px; margin-left: 6px; vertical-align: middle;
}

/* ==========================================
   LEADERBOARD PAGE
========================================== */
.lb-page { min-height: 80vh; }
.lb-hero {
  background: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(139,92,246,0.08) 100%);
  border-bottom: 1px solid var(--border); padding: 60px 0 48px;
}
.lb-hero-inner { text-align: center; }
.lb-trophy-icon { color: #f59e0b; margin: 0 auto 16px; display: block; }
.lb-hero-title { font-size: 38px; font-weight: 800; margin-bottom: 10px; }
.lb-hero-desc { color: var(--text-secondary); font-size: 16px; }

.lb-container { max-width: 900px; margin: 0 auto; padding: 0 20px 60px; }

.lb-tabs {
  display: flex; gap: 8px; margin: 32px 0 24px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
  overflow-x: auto;
}
.lb-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px; color: var(--text-secondary); font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all var(--transition); white-space: nowrap;
}
.lb-tab:hover { color: var(--text-primary); }
.lb-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Podium */
.lb-podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 12px; margin-bottom: 40px; min-height: 280px;
}
.lb-podium-item {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 16px 0;
  position: relative; flex: 1; max-width: 200px; min-width: 140px;
}
.lb-podium-1 { border-color: #f59e0b; background: rgba(245,158,11,0.05); }
.lb-podium-2 { border-color: #94a3b8; }
.lb-podium-3 { border-color: #cd7c2f; }
.lb-crown { color: #f59e0b; margin-bottom: 6px; }
.lb-podium-rank {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; margin-bottom: 8px;
}
.lb-podium-1 .lb-podium-rank { background: #f59e0b; color: #000; }
.lb-podium-2 .lb-podium-rank { background: #94a3b8; color: #000; }
.lb-podium-3 .lb-podium-rank { background: #cd7c2f; color: #fff; }
.lb-podium-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border-hover); margin-bottom: 10px; }
.lb-podium-avatar-1 { width: 72px; height: 72px; border-color: #f59e0b; }
.lb-podium-name { font-size: 14px; font-weight: 700; color: var(--text-primary); text-align: center; margin-bottom: 4px; }
.lb-podium-name:hover { color: var(--accent); }
.lb-podium-level { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.lb-podium-stat { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.lb-podium-bar {
  width: 100%; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-top: auto;
}
.lb-bar-1 { height: 80px; background: linear-gradient(180deg, rgba(245,158,11,0.4), rgba(245,158,11,0.1)); }
.lb-bar-2 { height: 56px; background: linear-gradient(180deg, rgba(148,163,184,0.3), rgba(148,163,184,0.1)); }
.lb-bar-3 { height: 40px; background: linear-gradient(180deg, rgba(205,124,47,0.3), rgba(205,124,47,0.1)); }

/* Leaderboard Table */
.lb-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  background: var(--bg-secondary); padding: 12px 16px;
  text-align: left; font-size: 12px; color: var(--text-muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.lb-th-rank { width: 60px; text-align: center; }
.lb-row { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: var(--bg-hover); }
.lb-row-top { background: rgba(99,102,241,0.03); }
.lb-row td { padding: 12px 16px; font-size: 14px; }
.lb-td-rank { text-align: center; }
.lb-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; font-size: 13px; font-weight: 800;
}
.lb-rank-1 { background: #f59e0b; color: #000; }
.lb-rank-2 { background: #94a3b8; color: #000; }
.lb-rank-3 { background: #cd7c2f; color: #fff; }
.lb-rank-num { color: var(--text-muted); font-weight: 600; font-size: 14px; }
.lb-td-user { padding: 8px 16px; }
.lb-user-link { display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.lb-user-link:hover .lb-username { color: var(--accent); }
.lb-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-hover); }
.lb-username { font-weight: 600; font-size: 14px; }
.lb-level-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25);
  color: var(--accent); border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.lb-level-title { opacity: 0.8; font-size: 11px; }
.lb-td-primary { color: var(--accent); }
.lb-empty { padding: 40px; text-align: center; color: var(--text-muted); }

/* ==========================================
   CREATORS PAGE (full-page version)
========================================== */
.creators-page { min-height: 80vh; padding-bottom: 60px; }
.creators-hero {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.05));
  border-bottom: 1px solid var(--border); padding: 48px 0 36px;
}
.creators-hero .container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.creators-hero-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 32px; font-weight: 800; margin-bottom: 10px;
}
.creators-hero-title svg { color: var(--accent); }
.creators-hero-desc { color: var(--text-secondary); font-size: 15px; margin-bottom: 24px; }
.creators-sort { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.creators-sort-label { font-size: 13px; color: var(--text-muted); }
.creators-sort-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); background: var(--bg-hover); border: 1px solid var(--border);
  transition: all var(--transition);
}
.creators-sort-btn:hover { color: var(--text-primary); border-color: var(--border-hover); }
.creators-sort-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.creators-page .container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.creators-page .creators-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px; margin-top: 32px;
}
.creators-page .creator-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: all var(--transition);
}
.creators-page .creator-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.creator-card-header {
  position: relative; background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  padding: 28px 20px 16px; display: flex; justify-content: center;
}
.creator-card-header .creator-avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border-hover); display: block;
}
.creator-rank-badge {
  position: absolute; top: 10px; left: 12px;
  background: rgba(0,0,0,0.6); color: var(--text-muted);
  border-radius: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px;
}
.creator-card-body { padding: 0 16px 20px; text-align: center; }
.creator-card-body .creator-name {
  font-size: 16px; font-weight: 700; color: var(--text-primary);
  display: block; margin-bottom: 6px;
}
.creator-card-body .creator-name:hover { color: var(--accent); }
.creator-bio { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.creator-level { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.creator-level-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25);
  color: var(--accent); border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.creator-xp { font-size: 11px; color: var(--text-muted); }
.creator-xp-bar-wrap {
  height: 4px; background: var(--bg-hover); border-radius: 4px;
  margin: 0 0 14px; overflow: hidden;
}
.creator-xp-bar { height: 100%; background: linear-gradient(90deg, var(--accent), #8b5cf6); border-radius: 4px; }
.creator-card-body .creator-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; margin-bottom: 16px;
}
.creator-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 13px; color: var(--text-primary);
}
.creator-stat svg { color: var(--text-muted); }
.creator-stat small { font-size: 10px; color: var(--text-muted); }
.creator-profile-btn {
  display: block; width: 100%; padding: 8px; border-radius: var(--radius-md);
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25);
  color: var(--accent); font-size: 13px; font-weight: 600; text-align: center;
  transition: all var(--transition);
}
.creator-profile-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

@media (max-width: 900px) {
  .lb-podium { gap: 8px; min-height: auto; }
  .lb-podium-item { max-width: 140px; min-width: 100px; padding: 12px 8px 0; }
  .lb-hero-title { font-size: 28px; }
}
@media (max-width: 600px) {
  .lb-tabs { gap: 0; }
  .lb-tab { padding: 8px 12px; font-size: 13px; }
  .creator-card-body .creator-stats { grid-template-columns: repeat(2, 1fr); }
  .creators-page .creators-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}

/* ============ COLLECTIONS (IMPROVED) ============ */
.collections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.collection-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; transition: border-color var(--transition), transform var(--transition); }
.collection-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.collection-card-icon { position: relative; display: flex; align-items: center; gap: 8px; color: var(--accent); }
.collection-name { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0; }
.collection-desc { font-size: 13px; color: var(--text-muted); margin: 0; }
.collection-count { font-size: 13px; color: var(--text-secondary); }
.collection-actions { display: flex; gap: 8px; margin-top: 8px; }
.collection-private-badge, .collection-public-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }
.collection-private-badge { background: rgba(239,68,68,.15); color: #ef4444; }
.collection-public-badge { background: rgba(34,197,94,.12); color: #22c55e; }

/* ============ PAGE LAYOUT UTILITIES ============ */
.page-container { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
.page-header-row { margin-bottom: 32px; }
.page-title { font-size: 32px; font-weight: 700; color: var(--text-primary); margin: 8px 0 6px; }
.page-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 12px; }
.page-meta { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-secondary); }
.page-meta a { color: var(--accent); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.collection-author-link { color: var(--text-secondary); }
.collection-author-link:hover { color: var(--accent); }
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.page-btn { padding: 8px 14px; border-radius: var(--radius-md); background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); font-size: 14px; transition: all var(--transition); }
.page-btn.active, .page-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ==========================================
   GLASSMORPHISM / FROSTED GLASS DESIGN
========================================== */

/* Enhanced header frosted glass */
.site-header {
  background: rgba(8,8,14,0.72) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 1px 24px rgba(0,0,0,0.35);
}

/* Glass card footer */
.card-footer {
  background: linear-gradient(to top, rgb(21 21 42 / 90%) 0%, rgba(8, 8, 14, 0.65) 100%);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 10px 12px;
}

/* Glass dropdown menus */
.dropdown-menu, .user-dropdown .dropdown-menu {
  background: rgba(18,18,30,0.80) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Glass search bar */
.search-input-wrap {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
}
.search-input {
  background: transparent !important;
}



/* Glass section/panel */
.panel {
  background: rgba(18,18,28,0.75) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.07) !important;
}

/* Glass wallpaper card */
.wallpaper-card {
  background: rgba(16,16,26,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Glass hero section overlay */
.hero-section {
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
/* ── Featured wallpaper hero — full-bleed vivid background ── */
.hero-has-bg {
  background: #06060f;
  border-bottom-color: transparent;
  padding-top: 110px;
  padding-bottom: 100px;
}

/* Blurred vivid wallpaper — full hero coverage */
.hero-has-bg::after {
  content: '';
  position: absolute; inset: -6%;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center center;
  filter: blur(18px) brightness(0.62) saturate(1.3);
  z-index: 0;
}

/* Dark gradient scrim for text readability */
.hero-has-bg::before {
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.50) 0%,
    rgba(0,0,0,0.26) 50%,
    rgba(0,0,0,0.50) 100%
  ) !important;
  z-index: 1 !important;
}

/* Content — no card, just text over the blurred bg */
.hero-has-bg .hero-inner {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: 780px;
  margin: 0 auto;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-has-bg .hero-title { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,0.55); }
.hero-has-bg .gradient-text {
  background: linear-gradient(135deg, #a5b4fc, #c4b5fd, #f9a8d4);
  -webkit-background-clip: text; background-clip: text;
}
.hero-has-bg .hero-subtitle {
  color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}
.hero-has-bg .hero-search-wrap {
  background: rgba(8,8,18,0.68);
  border-color: rgba(255,255,255,0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.hero-has-bg .hero-search-input { color: #fff; }
.hero-has-bg .hero-search-input::placeholder { color: rgba(255,255,255,0.36); }
.hero-has-bg .hero-tags { color: rgba(255,255,255,0.55); }
.hero-has-bg .hero-tags a {
  background: rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-has-bg .hero-tags a:hover { border-color: var(--accent); color: #a5b4fc; background: rgba(99,102,241,0.22); }
/* Featured banner pill */
.hero-featured-link {
  display: inline-flex; align-items: center; gap: 10px;
  position: absolute; top: 18px; right: 24px;
  background: rgba(99,102,241,0.18);
  border: 1px solid rgba(99,102,241,0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: 13px; color: #e0e0f0;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  z-index: 3;
}
.hero-featured-link:hover { background: rgba(99,102,241,0.35); border-color: rgba(99,102,241,0.65); color: #fff; }
.hero-featured-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #f0c040;
}
.hero-feat-icon { color: #f0c040; flex-shrink: 0; }
.hero-featured-title {
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-left: 1px solid rgba(255,255,255,0.2); padding-left: 10px;
}
/* ── Username level badge ── */
.uname-colored { font-weight: inherit; }
.uname-icon { font-style: normal; font-size: 0.88em; margin-left: 2px; line-height: 1; }
.card-author .uname-colored { color: inherit; transition: color 0.15s; }
.card-author:hover .uname-colored { opacity: 0.85; }
.profile-username .uname-colored { font-size: inherit; font-weight: 800; }
.profile-username .uname-icon { font-size: 0.8em; }
@media (max-width: 600px) {
  .hero-has-bg .hero-inner { padding: 36px 24px; border-radius: 20px; }
}

/* Glass search suggestions */
.search-suggestions {
  background: rgba(16,16,26,0.90) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

/* Glass collection dropdown */
.collection-dropdown {
  background: rgba(16,16,26,0.90) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

/* Glass badge */
.card-badge {
  background: rgba(8,8,14,0.62) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.10);
}
.badge-live { background: rgba(220,38,38,0.75) !important; }
.badge-gif  { background: rgba(124,58,237,0.75) !important; }
.badge-res  { background: rgba(8,8,14,0.70) !important; }

/* Glass modal */
.modal-overlay {
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-box {
  background: rgba(16,16,26,0.88);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 16px 64px rgba(0,0,0,0.6);
}

/* Glass flash messages */
.flash {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(34,197,94,0.12) !important;
  border: 1px solid rgba(34,197,94,0.25) !important;
}
.flash-error {
  background: rgba(239,68,68,0.12) !important;
  border-color: rgba(239,68,68,0.25) !important;
}

/* Glass toast */
#toast-container .toast {
  background: rgba(16,16,26,0.90) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

/* Feed page */
.page-header-bar {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px 20px; gap: 16px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}
.empty-icon { color: var(--text-muted); opacity: 0.5; }
.empty-state h3 { font-size: 22px; font-weight: 600; color: var(--text-primary); }
.empty-state p { color: var(--text-muted); max-width: 360px; }
.pagination-info { color: var(--text-secondary); font-size: 14px; padding: 8px 16px; }


/* =====================================================
   AUTH STANDALONE PAGES (Login / Register)
   DeviantArt-inspired split-panel design
   ===================================================== */

/* Full-screen body */
.auth-standalone-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #080c14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  overflow: hidden;
  position: relative;
}

/* ── Meteor / shooting-star background ── */
.auth-scene {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 0;
}

.auth-meteors {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-meteor {
  position: absolute;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(99,102,241,0), #6366f1 40%, #06b6d4 70%, rgba(6,182,212,0));
  transform: rotate(-35deg);
  transform-origin: left center;
  animation: meteorShoot linear infinite;
  filter: blur(0.5px);
}

@keyframes meteorShoot {
  0%   { transform: rotate(-35deg) translateX(-60px); opacity: 0; }
  5%   { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: rotate(-35deg) translateX(calc(100vw + 200px)); opacity: 0; }
}

/* ── Main split-panel card ── */
.auth-modal {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 920px;
  min-height: 560px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06);
  animation: authModalIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes authModalIn {
  from { opacity:0; transform: translateY(28px) scale(0.97); }
  to   { opacity:1; transform: none; }
}

/* ── Left: Art panel ── */
.auth-art-panel {
  flex: 0 0 42%;
  min-height: 560px;
  background: linear-gradient(135deg, #1a1d2e 0%, #0e1225 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.auth-art-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,12,20,0.55) 0%,
    rgba(8,12,20,0.25) 40%,
    rgba(8,12,20,0.75) 80%,
    rgba(8,12,20,0.92) 100%
  );
  z-index: 0;
}

.auth-art-inner {
  position: relative;
  z-index: 1;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.auth-art-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.auth-art-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}

.auth-art-desc {
  font-size: 13.5px;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
  margin: 12px 0 0;
  max-width: 260px;
}

.auth-art-credit {
  margin-top: auto;
  padding-top: 28px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
}

.auth-art-credit strong {
  color: rgba(255,255,255,0.85);
  font-weight: 800;
  display: block;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.auth-art-level {
  font-size: 15px;
  margin-left: 4px;
}

/* ── Right: Form panel ── */
.auth-form-panel {
  flex: 1;
  background: #10131f;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0;
}

.auth-back-link {
  position: absolute;
  top: 20px;
  left: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  z-index: 2;
}
.auth-back-link:hover {
  background: rgba(99,102,241,0.15);
  color: var(--accent);
  border-color: var(--accent);
}

.auth-form-inner {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  justify-content: center;
}

.auth-form-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

.auth-form-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.auth-form-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* Alert boxes */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.45;
}
.auth-alert svg { flex-shrink: 0; margin-top: 1px; }
.auth-alert-error   { background: rgba(239,68,68,0.12);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }
.auth-alert-success { background: rgba(34,197,94,0.12);  color: #86efac; border: 1px solid rgba(34,197,94,0.2); }

/* Form fields */
.auth-form-fields { display: flex; flex-direction: column; gap: 16px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.auth-input-wrap { position: relative; }

.auth-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: var(--font-sans);
}
.auth-input-wrap .auth-input { padding-right: 42px; }

.auth-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.auth-input:focus {
  border-color: var(--accent);
  background: rgba(99,102,241,0.05);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.auth-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 0;
  transition: color 0.2s;
}
.auth-toggle-pw:hover { color: var(--text-secondary); }

.auth-field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Remember me */
.auth-remember-row { display: flex; align-items: center; justify-content: space-between; }
.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.auth-checkbox {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* CTA button */
.auth-cta {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
  margin-top: 4px;
}
.auth-cta:hover  { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 28px rgba(99,102,241,0.45); }
.auth-cta:active { transform: translateY(0); opacity: 0.85; }

/* Footer links */
.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 18px 0 0;
}
.auth-switch a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-terms {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  opacity: 0.6;
  margin: 10px 0 0;
  line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .auth-scene { padding: 0; align-items: stretch; }
  .auth-modal {
    flex-direction: column;
    border-radius: 0;
    min-height: 100vh;
    max-width: 100%;
    box-shadow: none;
  }
  .auth-art-panel {
    flex: 0 0 220px;
    min-height: 220px;
  }
  .auth-art-title { font-size: 22px; }
  .auth-art-desc  { display: none; }
  .auth-form-inner { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .auth-form-inner { padding: 28px 18px; }
  .auth-form-title { font-size: 22px; }
}

/* Honeypot (anti-bot hidden field) */
.auth-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* ═══════════════════════════════════════════════
   LEGAL / STATIC PAGES
═══════════════════════════════════════════════ */
.legal-page { min-height: 60vh; }

.legal-hero {
  background: linear-gradient(135deg, #0f0f16 0%, #16162a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 64px 0 48px;
  text-align: center;
}
.legal-hero h1 {
  font-size: 36px;
  font-weight: 900;
  color: #f0f0f8;
  margin: 0 0 12px;
}
.legal-hero p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}
.legal-hero-warning {
  background: linear-gradient(135deg, #160f0f 0%, #231414 100%);
  border-bottom-color: rgba(239,68,68,0.15);
}

.legal-body { padding: 48px 0 80px; }
.legal-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) {
  .legal-grid { grid-template-columns: 1fr; }
  .legal-sidebar { display: none; }
}

.legal-content { min-width: 0; }
.legal-content h2 {
  font-size: 20px;
  font-weight: 800;
  color: #f0f0f8;
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: #e0e0f0;
  margin: 22px 0 10px;
}
.legal-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 14px;
}
.legal-content ul, .legal-content ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.legal-content li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 6px;
}
.legal-content a { color: #818cf8; }
.legal-content a:hover { color: #a5b4fc; }
.legal-intro {
  font-size: 16px !important;
  color: #c0c0d0 !important;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 24px !important;
}
.legal-ol { padding-left: 22px; counter-reset: item; }
.legal-ol li {
  display: block;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 8px;
  padding-left: 8px;
}
.legal-ol li::before {
  content: counter(item) ". ";
  counter-increment: item;
  color: #818cf8;
  font-weight: 700;
}

/* Sidebar */
.legal-sidebar { display: flex; flex-direction: column; gap: 16px; }
.legal-sidebar-card {
  background: #16161e;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 20px;
}
.legal-sidebar-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: #f0f0f8;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 14px;
}
.legal-sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-sidebar-links li { font-size: 13px; color: var(--text-secondary); }
.legal-sidebar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color .2s;
}
.legal-sidebar-links a:hover { color: #818cf8; }

/* About page */
.about-mission { margin-bottom: 32px; }
.about-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0 36px;
}
@media (max-width: 600px) { .about-stats-row { grid-template-columns: repeat(2,1fr); } }
.about-stat {
  background: #16161e;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}
.about-stat-num {
  display: block;
  font-size: 26px;
  font-weight: 900;
  color: #818cf8;
  margin-bottom: 4px;
}
.about-stat-label { font-size: 12px; color: var(--text-secondary); }
.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0 28px;
}
@media (max-width: 600px) { .about-features { grid-template-columns: 1fr; } }
.about-feature {
  background: #16161e;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 22px 18px;
}
.about-feature-icon { font-size: 28px; margin-bottom: 12px; }
.about-feature h3 { font-size: 15px; font-weight: 700; color: #f0f0f8; margin: 0 0 8px; }
.about-feature p { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.6; }

/* Contact page */
.contact-info-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
@media (max-width: 600px) { .contact-info-row { grid-template-columns: 1fr; } }
.contact-info-card {
  background: #16161e;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
}
.contact-info-icon { font-size: 28px; margin-bottom: 10px; }
.contact-info-card h3 { font-size: 15px; font-weight: 700; color: #f0f0f8; margin: 0 0 6px; }
.contact-info-card p { font-size: 13px; color: #818cf8; margin: 0 0 6px; }
.contact-response-time { font-size: 11px; color: var(--text-secondary); }
.contact-form { margin-top: 16px; }
.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 540px) { .contact-form-row { grid-template-columns: 1fr; } }
.contact-textarea { min-height: 160px; resize: vertical; }

/* Alerts */
.page-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
}
.page-alert-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  color: #4ade80;
}
.page-alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
}

/* FAQ */
.faq-search-wrap { margin-bottom: 32px; }
.faq-group { margin-bottom: 36px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: #16161e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item:hover { border-color: rgba(99,102,241,0.3); }
.faq-item.open { border-color: rgba(99,102,241,0.4); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  text-align: left;
  color: #e0e0f0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-question::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: #818cf8;
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  display: none;
  padding: 0 20px 16px;
}
.faq-item.open .faq-answer { display: block; }
.faq-answer p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.7; }
.faq-answer a { color: #818cf8; }
.faq-still-need {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  margin-top: 40px;
}
.faq-still-need h3 { font-size: 18px; color: #f0f0f8; margin: 0 0 8px; }
.faq-still-need p { color: var(--text-secondary); margin: 0 0 16px; }

/* DMCA */
.dmca-declaration { margin-top: 4px; }
.checkbox-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.checkbox-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; accent-color: #6366f1; }
.dmca-warning-card { border-color: rgba(239,68,68,0.2) !important; }

/* Cookie Settings */
.cookie-saved-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  color: #4ade80;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
}
.cookie-category {
  background: #16161e;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  gap: 20px;
}
.cookie-category-info { flex: 1; }
.cookie-category-info h3 { font-size: 15px; font-weight: 700; color: #f0f0f8; margin: 0 0 4px; }
.cookie-category-info p { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.cookie-toggle-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.cookie-toggle {
  width: 44px;
  height: 24px;
  background: #2d2d40;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  transition: background .2s, border-color .2s;
  display: flex;
  align-items: center;
  padding: 2px;
}
.cookie-toggle.active {
  background: #6366f1;
  border-color: #6366f1;
}
.cookie-toggle-disabled {
  opacity: .5;
  cursor: not-allowed;
}
.cookie-toggle-knob {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  pointer-events: none;
}
.cookie-toggle.active .cookie-toggle-knob { transform: translateX(20px); }
.cookie-toggle-status { font-size: 11px; color: #9ca3af; font-weight: 600; }
.cookie-category-details {
  padding: 0 22px 18px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 16px;
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cookie-table th {
  color: #8888a4;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 6px 10px 8px 0;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.cookie-table td {
  padding: 8px 10px 8px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cookie-table tr:last-child td { border-bottom: none; }
.cookie-table td:first-child { font-family: monospace; color: #818cf8; font-size: 12px; }
.cookie-actions {
  display: flex;
  gap: 10px;
  margin: 28px 0;
  flex-wrap: wrap;
}

/* required field asterisk */
.required { color: #f87171; }

/* form-hint */
.form-hint { font-size: 12px; color: var(--text-secondary); display: block; margin-top: 4px; }
