@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── Variables ──────────────────────────────────────── */
:root {
  --bg: #080a0e;
  --bg2: #0e1117;
  --bg3: #141820;
  --surface: #1a1f2e;
  --surface2: #222840;
  --border: #ffffff0f;
  --border2: #ffffff18;
  --text: #e8eaf0;
  --text2: #8b90a0;
  --text3: #555d70;
  --accent: #6c63ff;
  --accent2: #a78bfa;
  --accent-glow: #6c63ff33;
  --gold: #f5c842;
  --danger: #ff4757;
  --success: #2ed573;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

/* ── Layout ──────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.page-content { padding-top: 80px; min-height: 100vh; }

/* ── Navbar ──────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(8, 10, 14, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
#navbar.scrolled { background: rgba(8, 10, 14, 0.97); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.nav-logo span { color: var(--accent); -webkit-text-fill-color: var(--accent); }
.nav-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.nav-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 9px 20px 9px 44px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.nav-search input:focus { border-color: var(--accent); background: var(--surface2); box-shadow: 0 0 0 3px var(--accent-glow); }
.nav-search input::placeholder { color: var(--text3); }
.nav-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none;
}
.nav-links { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text2);
  transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); }
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
  cursor: pointer;
  transition: var(--transition);
}
.nav-avatar:hover { border-color: var(--accent); }
.btn-upload-nav {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-upload-nav:hover { background: var(--accent2); transform: translateY(-1px); }

/* ── Dropdown Menu ───────────────────────────────────── */
.user-menu { position: relative; }
.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  min-width: 180px;
  padding: 8px;
  display: none;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.user-dropdown.open { display: block; animation: dropIn 0.15s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text2);
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--surface2); color: var(--text); }
.dropdown-item.danger:hover { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* ── Hero ─────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-bottom: 60px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 120%, var(--accent-glow) 0%, transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title { margin-bottom: 20px; letter-spacing: -1px; }
.hero-title em { font-style: normal; color: var(--accent2); }
.hero-subtitle { font-size: 1.1rem; color: var(--text2); margin-bottom: 40px; font-weight: 300; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}
.hero-stat-label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #7c75ff; transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-secondary {
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.btn-ghost { color: var(--text2); }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #ff6b6b; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Section Headers ─────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}
.section-link { font-size: 13px; color: var(--accent); font-weight: 500; }
.section-link:hover { color: var(--accent2); }

/* ── Filter Bar ──────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.filter-tab {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  transition: var(--transition);
}
.filter-tab.active {
  background: var(--accent);
  color: #fff;
}
.filter-tab:hover:not(.active) { color: var(--text2); }
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.category-pill {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.category-pill:hover { border-color: var(--accent); color: var(--accent2); }
.category-pill.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent2); }

/* ── Wallpaper Grid ──────────────────────────────────── */
#wallpaper-grid {
  columns: 5;
  column-gap: 16px;
  margin-bottom: 48px;
}
@media (max-width: 1400px) { #wallpaper-grid { columns: 4; } }
@media (max-width: 1100px) { #wallpaper-grid { columns: 3; } }
@media (max-width: 720px) { #wallpaper-grid { columns: 2; } }
@media (max-width: 480px) { #wallpaper-grid { columns: 1; } }

.wallpaper-card {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  group: true;
}
.wallpaper-card:hover .card-overlay { opacity: 1; }
.wallpaper-card:hover .card-img { transform: scale(1.04); }
.card-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface2);
  min-height: 100px;
}
.card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}
.card-user-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface2);
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-btn {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
}
.card-btn:hover { background: rgba(255,255,255,0.2); }
.card-btn.liked { background: rgba(255, 71, 87, 0.4); border-color: var(--danger); color: var(--danger); }
.card-featured-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.card-res-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  color: rgba(255,255,255,0.8);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

/* ── Load More ───────────────────────────────────────── */
.load-more-container { text-align: center; padding: 24px 0 48px; }
.load-more-btn {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 14px 48px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.load-more-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--accent); }

/* ── Wallpaper Detail Modal ───────────────────────────── */
#detail-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#detail-modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
}
.modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(16px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 10;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--surface2); color: var(--text); }
.modal-layout { display: grid; grid-template-columns: 1fr 380px; }
@media (max-width: 900px) { .modal-layout { grid-template-columns: 1fr; } }
.modal-image-section {
  position: relative;
  background: #000;
  border-radius: 20px 0 0 20px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 900px) { .modal-image-section { border-radius: 20px 20px 0 0; min-height: 300px; } }
.modal-wallpaper-img {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
}
.modal-info-section {
  padding: 28px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: 90vh;
}
@media (max-width: 900px) { .modal-info-section { border-left: none; border-top: 1px solid var(--border); max-height: none; } }
.modal-title { font-size: 1.4rem; margin-bottom: 4px; }
.modal-author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text2);
  font-size: 14px;
}
.modal-author img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface2);
}
.modal-stats {
  display: flex;
  gap: 20px;
}
.modal-stat {
  text-align: center;
}
.modal-stat-num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}
.modal-stat-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent2); }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-actions .btn { width: 100%; justify-content: center; }
.modal-meta-info { font-size: 12px; color: var(--text3); }
.modal-meta-info span { display: block; margin-bottom: 4px; }

/* ── Comments ─────────────────────────────────────────── */
.comments-section { border-top: 1px solid var(--border); padding-top: 20px; }
.comment-form { margin-bottom: 20px; }
.comment-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  resize: none;
  outline: none;
  transition: var(--transition);
  min-height: 72px;
}
.comment-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.comment-input::placeholder { color: var(--text3); }
.comment { display: flex; gap: 10px; margin-bottom: 16px; }
.comment-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface2);
  flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-username { font-size: 13px; font-weight: 600; }
.comment-time { font-size: 11px; color: var(--text3); }
.comment-text { font-size: 13px; color: var(--text2); line-height: 1.5; }
.comment-actions { display: flex; gap: 12px; margin-top: 6px; }
.comment-action { font-size: 12px; color: var(--text3); cursor: pointer; transition: var(--transition); }
.comment-action:hover { color: var(--text2); }
.comment-replies { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--border); }

/* ── Upload Modal ────────────────────────────────────── */
#upload-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#upload-modal.open { display: flex; }
.upload-modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.upload-drop-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 24px;
  position: relative;
}
.upload-drop-zone:hover, .upload-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.upload-drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon { font-size: 3rem; margin-bottom: 12px; }
.upload-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  display: none;
}
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text2); }
.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: var(--text3); }
select.form-input { cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-progress {
  height: 4px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 16px;
  display: none;
}
.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s ease;
}

/* ── Auth Modal ──────────────────────────────────────── */
#auth-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#auth-modal.open { display: flex; }
.auth-modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
.auth-logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.auth-tabs {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text3);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-error {
  background: rgba(255, 71, 87, 0.12);
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-radius: var(--radius-sm);
  color: var(--danger);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ── Categories Page ─────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.category-card:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface2); }
.category-card.active { border-color: var(--accent); background: var(--accent-glow); }
.category-icon { font-size: 2.4rem; margin-bottom: 10px; }
.category-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.category-count { font-size: 12px; color: var(--text3); }

/* ── Toast Notifications ─────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: none; } }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast-icon.success { color: var(--success); }
.toast-icon.error { color: var(--danger); }

/* ── Footer ──────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .nav-logo { font-size: 1.4rem; }
.footer-desc { font-size: 14px; color: var(--text3); margin-top: 12px; line-height: 1.7; }
.footer-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 14px; color: var(--text2); transition: var(--transition); }
.footer-link:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 13px; color: var(--text3); }
.footer-socials { display: flex; gap: 12px; }
.footer-social {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  font-size: 16px;
  transition: var(--transition);
}
.footer-social:hover { background: var(--surface2); color: var(--text); border-color: var(--accent); }

/* ── Ad Slots ────────────────────────────────────────── */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
}
.ad-slot-leaderboard { width: 100%; height: 90px; margin-bottom: 32px; }
.ad-slot-rectangle { width: 300px; height: 250px; }
.ad-slot-sidebar { width: 160px; height: 600px; }

/* ── Loading ──────────────────────────────────────────── */
.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 0;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text3);
}
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state-text { font-size: 1.1rem; color: var(--text2); }

/* ── Profile Page ────────────────────────────────────── */
.profile-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 60px 0 40px;
  margin-bottom: 40px;
}
.profile-info {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}
.profile-name { font-size: 1.8rem; margin-bottom: 6px; }
.profile-bio { color: var(--text2); font-size: 14px; max-width: 400px; }
.profile-stats { display: flex; gap: 32px; margin-top: 16px; flex-wrap: wrap; }
.profile-stat span { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.profile-stat label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-search { display: none; }
  .nav-link { display: none; }
  .nav-link.mobile-show { display: block; }
  .container { padding: 0 16px; }
  .hero-stats { gap: 24px; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
}
