/* ============================================
   AURORA CORE - Variables, reset, base layout
   and shared components for frontend + admin
   ============================================ */

:root {
  --shell-max-width: 1400px;
  --shell-padding-x: 24px;
  --shell-nav-padding-top: 20px;
  --bg: #0d1117;
  --bg-card: rgba(20, 26, 38, 0.85);
  --bg-card-hover: rgba(25, 32, 46, 0.9);
  --bg-input: rgba(13, 17, 23, 0.8);
  --bg-section: rgba(16, 22, 32, 0.6);
  --bg-glass: rgba(20, 22, 35, 0.6);

  --border: rgba(0, 212, 255, 0.1);
  --border-hover: rgba(0, 212, 255, 0.25);
  --border-focus: rgba(0, 212, 255, 0.4);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(0, 212, 255, 0.3);

  --cyan: #00d4ff;
  --purple: #8b5cf6;
  --green: #10b981;
  --green-light: #34d399;
  --orange: #f59e0b;
  --orange-light: #fbbf24;
  --red: #ef4444;
  --red-light: #f87171;
  --pink: #ff2d55;
  --gold: #fbbf24;

  --text: #e6edf3;
  --text-secondary: #b0c4de;
  --text-muted: #7a8fa5;
  --text-dim: #5a6f82;

  --sysop: #ff2d55;
  --sysop-color: #ff2d55;
  --admin-color: #ef4444;
  --mod-color: #00d4ff;
  --uploader-color: #8b5cf6;
  --vip-color: #f59e0b;
  --power-color: #10b981;
  --user-color: #94a3b8;

  /* Accent aliases */
  --accent-cyan: var(--cyan);
  --accent-purple: var(--purple);
  --accent-green: var(--green);
  --accent-pink: var(--pink);
  --accent-blue: var(--cyan);
  --accent-amber: var(--orange);
  --accent-orange: var(--orange);
  --accent-red: var(--red);
  --accent-gold: var(--gold);

  /* Legacy aliases used by page-profile.css and others */
  --bg-primary: var(--bg);
  --bg-secondary: var(--bg-card);
  --text-primary: var(--text);
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.4);
  --glow-purple: 0 0 20px rgba(139, 92, 246, 0.4);

  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 45, 85, 0.03) 0%, transparent 50%);
  overflow: hidden;
}

.aurora-bg::before,
.aurora-bg::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: 0.72;
}

.aurora-bg::before {
  background-image:
    radial-gradient(circle, rgba(0, 212, 255, 0.85) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(0, 212, 255, 0.55) 0 1.4px, transparent 2px),
    radial-gradient(circle, rgba(139, 92, 246, 0.45) 0 1px, transparent 1.8px);
  background-size: 180px 180px, 260px 260px, 320px 320px;
  background-position: 0 0, 40px 90px, 120px 30px;
  animation: auroraParticlesDriftA 42s linear infinite;
}

.aurora-bg::after {
  background-image:
    radial-gradient(circle, rgba(0, 212, 255, 0.38) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(255, 255, 255, 0.22) 0 0.9px, transparent 1.6px);
  background-size: 240px 240px, 340px 340px;
  background-position: 20px 50px, 160px 120px;
  opacity: 0.48;
  animation: auroraParticlesDriftB 58s linear infinite;
}

@keyframes auroraParticlesDriftA {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-90px, 70px, 0);
  }
}

@keyframes auroraParticlesDriftB {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(70px, -85px, 0);
  }
}

/* Ambient background stays behind content and never participates in page layout. */
.ambient-background {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  contain: strict !important;
}

.ambient-background .aurora-bg,
.ambient-background__canvas,
.ambient-background__grid {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  pointer-events: none !important;
}

.ambient-background__canvas {
  z-index: 1;
}

.ambient-background__grid {
  z-index: 2;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.18) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 88%);
}

.ambient-background--subtle .ambient-background__grid {
  opacity: 0.05;
  background-size: 140px 140px;
}

/* Layout wrappers */
.navbars-wrapper {
  position: relative;
  z-index: 40;
  width: min(100%, var(--shell-max-width));
  margin: 0 auto;
  padding: var(--shell-nav-padding-top) var(--shell-padding-x) 0;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 12px;
}

.main-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  width: 100%;
  flex: 1 0 auto;
}

/* Section / page header */
.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title svg { flex-shrink: 0; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}

/* Public legal-information pages */
.legal-page {
  width: min(100%, 1020px);
  margin: 2px auto 0;
}
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(0, 212, 255, 0.17);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 18%, rgba(0, 212, 255, 0.16), transparent 31%),
    radial-gradient(circle at 4% 100%, rgba(139, 92, 246, 0.15), transparent 38%),
    linear-gradient(135deg, rgba(18, 30, 45, 0.94), rgba(13, 18, 29, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 20px 50px rgba(0, 0, 0, 0.18);
}
.legal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0 48%, rgba(255, 255, 255, 0.035) 50%, transparent 52%);
  transform: translateX(-52%);
  animation: legalHeroSheen 12s ease-in-out infinite;
}
.legal-hero-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}
.legal-hero-signal {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.1), 0 0 20px rgba(0, 212, 255, 0.72);
}
.legal-hero h1 {
  margin: 0;
  font-size: clamp(25px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--text);
}
.legal-updated {
  position: relative;
  z-index: 1;
  margin: 14px 0 0 23px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.045em;
  color: var(--text-muted);
}
.legal-updated:empty { display: none; }
.legal-intro {
  position: relative;
  z-index: 2;
  margin: -1px 18px 0;
  padding: 20px 24px;
  border: 1px solid rgba(151, 175, 205, 0.11);
  border-top-color: rgba(0, 212, 255, 0.26);
  border-radius: 0 0 17px 17px;
  background: rgba(10, 16, 26, 0.8);
  color: var(--text-secondary);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.14);
}
.legal-intro p:last-child,
.legal-section-body p:last-child,
.legal-section-body ul:last-child,
.legal-section-body ol:last-child { margin-bottom: 0; }
.legal-sections {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.legal-section {
  position: relative;
  overflow: hidden;
  padding: 22px 24px 23px;
  border: 1px solid rgba(151, 175, 205, 0.1);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(20, 27, 39, 0.86), rgba(13, 18, 28, 0.83));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}
.legal-section::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), rgba(139, 92, 246, 0.22));
  opacity: 0.56;
}
.legal-section:hover {
  border-color: rgba(0, 212, 255, 0.2);
  background: linear-gradient(135deg, rgba(21, 34, 48, 0.9), rgba(14, 20, 31, 0.88));
  transform: translateY(-1px);
}
.legal-section h2 {
  margin: 0 0 13px;
  padding-left: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.025em;
  color: var(--cyan);
}
.legal-section-body {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.72;
}
.legal-section-body p { margin: 0 0 14px; }
.legal-section-body ul,
.legal-section-body ol {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding-left: 20px;
}
.legal-section-body li::marker { color: var(--cyan); }
.legal-page a.altlink,
.legal-section-body a {
  color: var(--cyan);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.32);
}
.legal-page a.altlink:hover,
.legal-section-body a:hover {
  color: var(--text);
  border-bottom-color: var(--cyan);
}
.legal-section-body code {
  padding: 2px 6px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.1);
  color: #d5c7ff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: white;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); }

.btn-success {
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(52,211,153,0.2));
  border: 1px solid rgba(16,185,129,0.4);
  color: var(--green-light);
}
.btn-success:hover { background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(52,211,153,0.3)); box-shadow: 0 0 20px rgba(16,185,129,0.2); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
}
.btn-ghost:hover {
  border-color: var(--border-glow);
  color: var(--text);
  background: rgba(0, 212, 255, 0.05);
}

/* Shared user identity */
.user-avatar-shell {
  --user-avatar-size: 34px;
  --user-avatar-font-size: 12px;
  --user-avatar-ring-width: 0.8px;
  --user-rank-color: #7a8fa5;
  --user-avatar-glow: rgba(122, 143, 165, 0.24);
  width: var(--user-avatar-size);
  height: var(--user-avatar-size);
  min-width: var(--user-avatar-size);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  text-decoration: none;
  background: color-mix(in srgb, var(--user-rank-color) 16%, rgba(13, 17, 23, 0.88));
  border: var(--user-avatar-ring-width) solid color-mix(in srgb, var(--user-rank-color) 72%, rgba(255,255,255,0.12));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--user-rank-color) 18%, transparent), 0 0 22px var(--user-avatar-glow);
}
.user-avatar-shell::after {
  content: '';
  position: absolute;
  inset: calc(var(--user-avatar-ring-width) * -1.6);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--user-rank-color) 22%, transparent);
  opacity: 0.9;
  pointer-events: none;
}
.user-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.user-avatar-letter {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--user-avatar-font-size);
  font-weight: 700;
  line-height: 1;
  color: color-mix(in srgb, var(--user-rank-color) 82%, white);
  text-shadow: 0 0 10px color-mix(in srgb, var(--user-rank-color) 30%, transparent);
}
.user-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.user-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.user-identity.is-vertical {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.user-identity-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.user-identity-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.user-identity-name {
  min-width: 0;
}
.user-identity-title {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

/* Forms */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.form-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}
.form-card-header svg { width: 16px; height: 16px; color: var(--cyan); }
.form-card-body { padding: 24px; }

.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08), 0 0 20px rgba(0, 212, 255, 0.05);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a8fa5' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-select option { background: var(--bg); color: var(--text); }

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

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}
.form-check input { accent-color: var(--cyan); }

/* Toggle row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-glass);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row-info { flex: 1; }
.toggle-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.toggle-row-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Alerts */
.alert, .profile-alert {
  margin-bottom: 20px;
  border-radius: 14px;
  padding: 16px 20px;
  font-weight: 700;
}
.alert-success, .profile-alert.success {
  background: rgba(52, 211, 153, 0.09);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--green-light);
}
.alert-info, .profile-alert.info {
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--cyan);
}
.alert-error, .profile-alert.error {
  background: rgba(239, 68, 68, 0.09);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--red-light);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(0, 212, 255, 0.14);
  background:
    radial-gradient(ellipse 52% 120% at 50% 120%, rgba(0, 212, 255, 0.075), transparent 72%),
    linear-gradient(180deg, rgba(9, 13, 20, 0.7), rgba(7, 10, 16, 0.94));
  backdrop-filter: blur(20px);
  margin-top: auto;
  flex: 0 0 auto;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(42vw, 520px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.72), transparent);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.72);
  transform: translateX(-50%);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 7px;
  border: 1px solid rgba(151, 175, 205, 0.11);
  border-radius: 18px;
  background: rgba(8, 13, 21, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 14px 34px rgba(0, 0, 0, 0.16);
}
.footer-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.025em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  padding: 8px 13px 8px 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.008));
}
.footer-links a::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(122, 143, 165, 0.7);
  box-shadow: 0 0 0 3px rgba(122, 143, 165, 0.07);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.footer-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.38);
  border-color: rgba(0, 212, 255, 0.24);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(139, 92, 246, 0.055));
  box-shadow: 0 8px 18px rgba(0, 212, 255, 0.09);
  transform: translateY(-2px);
}
.footer-links a:hover::before {
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1), 0 0 10px rgba(0, 212, 255, 0.72);
}
.footer-links a:focus-visible {
  color: var(--text);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.footer-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.025em;
  color: var(--text-dim);
  width: 100%;
  text-align: center;
  margin-top: 0;
  padding-top: 15px;
  border-top: 1px solid rgba(151, 175, 205, 0.07);
}
.footer-copy::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scanline {
  0% { left: -50%; }
  100% { left: 150%; }
}
@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}
@keyframes legalHeroSheen {
  0%, 45% { transform: translateX(-54%); }
  65%, 100% { transform: translateX(54%); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.2); border-radius: 3px; }

/* Legacy tables (begin_table / main frame) */
table.main {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 16px 0;
}
table.main td,
table.main th {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text);
}
table.main th,
table.main td.heading,
table.main td.colhead {
  background: rgba(10,14,20,0.8);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
table.main tr:hover td { background: rgba(0,212,255,0.03); }

/* Utilities */
.icon-cyan    { color: var(--accent-cyan); }
.icon-purple  { color: var(--accent-purple); }
.icon-green   { color: var(--accent-green); }
.icon-pink    { color: var(--accent-pink); }
.icon-blue    { color: var(--accent-blue); }
.icon-amber   { color: var(--accent-amber); }
.icon-red     { color: var(--accent-red); }
.icon-gold    { color: var(--accent-gold); }

.nav-badge-unread { color: var(--red); font-weight: 700; }

.ring-fill {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 220;
  transition: stroke-dashoffset 0.6s ease;
}

.nav-icon { width: 14px; height: 14px; vertical-align: middle; margin-right: 4px; }

.jc-end { justify-content: flex-end; }
.jc-start { justify-content: flex-start; }
.jc-center { justify-content: center; }
.jc-between { justify-content: space-between; }
.ai-center { align-items: center; }
.mt-20 { margin-top: 20px; }

/* Responsive */
@media (max-width: 768px) {
  .main-container { padding: 20px 12px 40px; }
  .navbars-wrapper { padding: 12px 12px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; padding: 6px; border-radius: 15px; }
  .footer-links a { min-height: 34px; padding: 7px 10px; }
  .legal-page { margin-top: 0; }
  .legal-hero { padding: 26px 21px 28px; border-radius: 18px; }
  .legal-intro { margin-right: 8px; margin-left: 8px; padding: 18px; }
  .legal-section { padding: 19px 19px 20px; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 460px) {
  .footer-inner { padding: 20px 12px 18px; }
  .footer-links { gap: 5px; width: 100%; }
  .footer-links a { flex: 1 1 calc(50% - 5px); justify-content: center; }
}

/* Recommendations section */
.recommendations-section { margin: 24px 0; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title svg { color: var(--gold); }
.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.recommendation-card {
  background: linear-gradient(145deg, rgba(15,23,42,0.95), rgba(10,15,30,0.95));
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: 10px;
  padding: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.recommendation-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,212,255,0.35);
}
.recommendation-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.rec-cat-icon { width: 20px; height: 20px; object-fit: contain; }
.rec-score {
  font-size: 0.75rem;
  color: var(--gold);
  background: rgba(255,215,0,0.08);
  padding: 2px 6px;
  border-radius: 12px;
}
.rec-name {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 8px;
  text-decoration: none;
}
.rec-name:hover { color: var(--cyan); }
.rec-reason {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(139,92,246,0.08);
  padding: 2px 6px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.rec-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.rec-seeders { color: var(--green); }
.rec-leechers { color: var(--amber); }

.recommendations-sidebar .recommendations-list { list-style: none; margin: 0; padding: 0; }
.recommendations-list li { margin-bottom: 12px; }
.recommendations-list li:last-child { margin-bottom: 0; }
.rec-list-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
}
.rec-list-link:hover { color: var(--cyan); }
.rec-list-icon { width: 16px; height: 16px; object-fit: contain; opacity: 0.85; }
.rec-list-name { flex: 1; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-list-score {
  font-size: 0.7rem;
  color: var(--gold);
  background: rgba(255,215,0,0.08);
  padding: 1px 5px;
  border-radius: 10px;
}
.rec-list-reason {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  padding-left: 24px;
}

/* Admin shell compatibility dimensions.
   Detailed admin layout rules live in admin-aurora.css. */
body.admin-shell {
  --shell-max-width: 1400px;
  --shell-padding-x: 24px;
  --shell-nav-padding-top: 20px;
  --admin-content-width: calc(var(--shell-max-width) - (var(--shell-padding-x) * 2));
}

body.admin-shell .navbars-wrapper {
  width: min(100%, var(--shell-max-width));
  max-width: var(--shell-max-width);
  box-sizing: border-box;
}
