/* ============================================
   NIGHT OWLS — Main Stylesheet
   Dark theme with glassmorphism & animations
   ============================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  /* Colors */
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: rgba(26, 26, 60, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.08);

  --purple-deep: #1a1a3e;
  --purple-main: #6c63ff;
  --purple-light: #8b83ff;
  --purple-glow: rgba(108, 99, 255, 0.3);

  --accent-orange: #f5a623;
  --accent-orange-glow: rgba(245, 166, 35, 0.3);
  --accent-teal: #00d4aa;
  --accent-red: #ff4757;
  --accent-red-glow: rgba(255, 71, 87, 0.15);
  --accent-green: #2ed573;

  --text-primary: #e8e6f0;
  --text-secondary: #9896a8;
  --text-muted: #5d5b6e;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow-purple: 0 0 30px rgba(108, 99, 255, 0.2);
  --shadow-glow-orange: 0 0 30px rgba(245, 166, 35, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animated background gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(108, 99, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(245, 166, 35, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(0, 212, 170, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--purple-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-orange);
}

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}

input, textarea, select {
  font-family: var(--font-body);
  outline: none;
}

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: all var(--transition-base);
}

.navbar.scrolled {
  padding: var(--space-sm) 0;
  background: rgba(10, 10, 26, 0.95);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.nav-brand:hover {
  transform: scale(1.02);
}

.nav-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  filter: drop-shadow(0 0 8px var(--purple-glow));
  transition: filter var(--transition-base);
}

.nav-brand:hover .nav-logo {
  filter: drop-shadow(0 0 14px var(--purple-glow));
}

/* Hero logo */
.hero-owl-img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  margin: 0 auto var(--space-lg);
  animation: owlFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 24px var(--purple-glow));
  position: relative;
  z-index: 1;
}

/* Auth page logo */
.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin: 0 auto var(--space-md);
  display: block;
  animation: owlFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 16px var(--purple-glow));
}

.nav-brand h1 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-light), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-link {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  background: none;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-link.active {
  color: var(--purple-light);
  background: rgba(108, 99, 255, 0.1);
}

.nav-link.admin-link {
  color: var(--accent-orange);
}

.nav-link.admin-link:hover {
  background: rgba(245, 166, 35, 0.1);
}

/* Auth buttons in nav */
.nav-auth {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--purple-main), var(--accent-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  text-transform: uppercase;
}

.nav-username {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.mobile-toggle {
  display: none;
  background: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: var(--space-xs);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left var(--transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-main), #7c74ff);
  color: #fff;
  box-shadow: var(--shadow-glow-purple);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(108, 99, 255, 0.35);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-orange), #ffb84d);
  color: #1a1a2e;
  box-shadow: var(--shadow-glow-orange);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(245, 166, 35, 0.35);
}

.btn-danger {
  background: rgba(255, 71, 87, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 71, 87, 0.25);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ── Hero Section ── */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: heroPulse 6s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.hero-owl {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  animation: owlFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--purple-glow));
  position: relative;
  z-index: 1;
}

@keyframes owlFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.hero h2 .gradient-text {
  background: linear-gradient(135deg, var(--purple-light), var(--accent-orange), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto var(--space-xl);
  position: relative;
  z-index: 1;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  position: relative;
  z-index: 1;
}

.hero-stat {
  text-align: center;
}

.hero-stat .stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-light), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ── Search & Filter Bar ── */
.search-bar-wrapper {
  margin: var(--space-xl) 0 var(--space-2xl);
  position: relative;
  z-index: 1;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  backdrop-filter: blur(12px);
  transition: border-color var(--transition-base);
}

.search-bar:focus-within {
  border-color: var(--purple-main);
  box-shadow: var(--shadow-glow-purple);
}

.search-bar .search-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: var(--space-sm);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.filter-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.filter-tab.active {
  color: #fff;
  background: var(--purple-main);
  border-color: var(--purple-main);
  box-shadow: var(--shadow-glow-purple);
}

.sort-select {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
}

.sort-select:focus {
  border-color: var(--purple-main);
}

.sort-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ── Mod/Plugin Cards Grid ── */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
  position: relative;
  z-index: 1;
}

.mod-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mod-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108, 99, 255, 0.3);
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
}

.mod-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple-main), var(--accent-orange));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.mod-card:hover::after {
  opacity: 1;
}

.mod-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.mod-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.mod-card-tag {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.mod-card-tag.plugin {
  background: rgba(108, 99, 255, 0.15);
  color: var(--purple-light);
  border: 1px solid rgba(108, 99, 255, 0.3);
}

.mod-card-tag.mod {
  background: rgba(0, 212, 170, 0.15);
  color: var(--accent-teal);
  border: 1px solid rgba(0, 212, 170, 0.3);
}

.mod-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.mod-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.mod-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-glass);
}

.download-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Mod Detail Page ── */
.mod-detail {
  padding: 7rem 0 4rem;
  position: relative;
  z-index: 1;
}

.mod-detail-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.mod-detail-back:hover {
  color: var(--purple-light);
}

.mod-detail-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.mod-detail-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-main));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow-purple);
}

.mod-detail-info h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.mod-detail-info .meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.mod-detail-info .meta-row span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.mod-detail-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-2xl);
}

.mod-detail-desc {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
}

.mod-detail-desc h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.mod-detail-desc p {
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.mod-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.mod-detail-download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
  text-align: center;
}

.mod-detail-download-card .btn {
  width: 100%;
  margin-bottom: var(--space-md);
}

.mod-detail-download-card .download-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mod-detail-stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
}

.mod-detail-stats-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: var(--space-md);
  font-size: 1rem;
}

.detail-stat-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.9rem;
}

.detail-stat-row:last-child {
  border-bottom: none;
}

.detail-stat-row .label {
  color: var(--text-muted);
}

.detail-stat-row .value {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Auth Pages ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  backdrop-filter: blur(16px);
  animation: authSlideIn 0.5s ease forwards;
}

@keyframes authSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card .auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-card .auth-header .owl-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: block;
  animation: owlFloat 4s ease-in-out infinite;
}

.auth-card .auth-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.auth-card .auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── Form Styles ── */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--purple-main);
  background: rgba(108, 99, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.form-input.error {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px var(--accent-red-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-error {
  font-size: 0.8rem;
  color: var(--accent-red);
  margin-top: var(--space-xs);
  display: none;
}

.form-error.show {
  display: block;
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-select:focus {
  border-color: var(--purple-main);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a,
.auth-footer .auth-switch {
  color: var(--purple-light);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.auth-footer a:hover,
.auth-footer .auth-switch:hover {
  color: var(--accent-orange);
}

.form-message {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
  display: none;
}

.form-message.error {
  background: var(--accent-red-glow);
  color: var(--accent-red);
  border: 1px solid rgba(255, 71, 87, 0.3);
  display: block;
}

.form-message.success {
  background: rgba(46, 213, 115, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(46, 213, 115, 0.3);
  display: block;
}

/* ── Admin Dashboard ── */
.admin-page {
  padding: 7rem 0 4rem;
  position: relative;
  z-index: 1;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.admin-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
}

.admin-header h2 span {
  color: var(--accent-orange);
}

/* Admin Stats Cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(108, 99, 255, 0.2);
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-light), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* Admin Table */
.admin-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-glass);
}

.admin-table-header h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-glass);
}

.admin-table td {
  padding: var(--space-md) var(--space-lg);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table .actions {
  display: flex;
  gap: var(--space-sm);
}

/* ── Admin Form (Add/Edit Mod) ── */
.admin-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  backdrop-filter: blur(12px);
  max-width: 700px;
  margin: 0 auto;
}

.admin-form-wrapper h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 440px;
  width: 90%;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-base);
  text-align: center;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal .modal-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.modal h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.modal p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
}

.modal .modal-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 280px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.4s ease forwards;
  backdrop-filter: blur(12px);
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.toast.success {
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid rgba(46, 213, 115, 0.3);
  color: var(--accent-green);
}

.toast.error {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--accent-red);
}

.toast.info {
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--purple-light);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  font-size: 0.9rem;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border-glass);
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer .footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple-light), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer .footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.footer .footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer .footer-links a:hover {
  color: var(--purple-light);
}

/* ── Page Transition ── */
.page-content {
  animation: pageIn 0.4s ease forwards;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--purple-deep);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--purple-main);
}

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-glass) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    var(--bg-glass) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .hero-stat .stat-number {
    font-size: 1.5rem;
  }

  .mods-grid {
    grid-template-columns: 1fr;
  }

  .mod-detail-body {
    grid-template-columns: 1fr;
  }

  .mod-detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-glass);
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }

  .admin-table-wrapper {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 600px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .mod-detail-info h2 {
    font-size: 1.5rem;
  }

  .search-bar {
    flex-direction: column;
  }

  .auth-card {
    padding: var(--space-xl);
  }

  .modal .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero h2 {
    font-size: 1.6rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-md);
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--space-md);
  }
}
