/* ============================================
   MediaRating — Premium Design System v2
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  /* Colors - Refined dark theme */
  --bg-primary: #060a14;
  --bg-secondary: #0c1222;
  --bg-tertiary: #131b2e;
  --bg-card: rgba(16, 23, 42, 0.7);
  --bg-card-solid: #10172a;
  --bg-card-hover: rgba(22, 30, 50, 0.9);
  --bg-input: rgba(15, 23, 42, 0.8);
  --bg-overlay: rgba(0, 0, 0, 0.75);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --accent: #00e0c6;
  --accent-hover: #2cf5e0;
  --accent-glow: rgba(0, 224, 198, 0.25);
  --accent-subtle: rgba(0, 224, 198, 0.08);
  --accent-border: rgba(0, 224, 198, 0.2);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.12);

  --border: rgba(148, 163, 184, 0.08);
  --border-light: rgba(148, 163, 184, 0.15);
  --border-accent: rgba(0, 224, 198, 0.2);

  /* Rating colors */
  --rating-excellent: #10b981;
  --rating-good: #22c55e;
  --rating-average: #f59e0b;
  --rating-poor: #f97316;
  --rating-bad: #ef4444;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 24px var(--accent-glow);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);

  /* Spacing */
  --container-max: 1200px;
  --header-height: 64px;

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 224, 198, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

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

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

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.main-content {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding-top: var(--header-height);
}

/* ---- Page Transitions ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

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

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50% { box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0, 224, 198, 0.1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.page-enter {
  animation: fadeInUp 0.4s ease both;
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(6, 10, 20, 0.8);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(6, 10, 20, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo:hover {
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.4rem;
  animation: float 3s ease-in-out infinite;
}

.logo-accent {
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Notification dot for admin */
.nav-link .notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ---- Mobile Menu ---- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: rgba(12, 18, 34, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 16px 20px;
}

.mobile-menu.open {
  display: block;
  animation: slideDown 0.3s ease;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  color: var(--text-secondary);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  display: block;
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.mobile-auth-buttons {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-base);
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  color: var(--text-inverse);
  border-color: transparent;
  font-weight: 700;
}

.btn-primary:hover {
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow), 0 4px 12px rgba(0, 224, 198, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-light);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  border-color: transparent;
}

.btn-danger:hover {
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

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

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

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

/* ---- Forms ---- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  outline: none;
  backdrop-filter: blur(8px);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 16px rgba(0, 224, 198, 0.1);
  background: rgba(15, 23, 42, 0.9);
}

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

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

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%2394a3b8'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

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

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Password strength indicator */
.password-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-tertiary);
  margin-top: 8px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.password-strength-text {
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 600;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-light);
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px rgba(0, 224, 198, 0.08);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Skeleton Loader ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(30, 41, 59, 0.8) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-lg);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-text-sm {
  height: 10px;
  margin-bottom: 6px;
  width: 60%;
}

.skeleton-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
}

.skeleton-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---- Rating Badge ---- */
.rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  padding: 0 8px;
  position: relative;
  overflow: hidden;
}

.rating-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.rating-badge-sm {
  min-width: 36px;
  height: 36px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.rating-badge-lg {
  min-width: 72px;
  height: 72px;
  font-size: 1.6rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.rating-excellent { background: linear-gradient(135deg, #059669, var(--rating-excellent)); }
.rating-good { background: linear-gradient(135deg, #16a34a, var(--rating-good)); }
.rating-average { background: linear-gradient(135deg, #d97706, var(--rating-average)); }
.rating-poor { background: linear-gradient(135deg, #ea580c, var(--rating-poor)); }
.rating-bad { background: linear-gradient(135deg, #dc2626, var(--rating-bad)); }

.rating-none {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px dashed var(--border-light);
}

/* ---- Tags / Badges ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  transition: all var(--transition-fast);
}

.tag-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.tag-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.tag-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.tag-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: rgba(59, 130, 246, 0.2);
}

/* Reputation badges */
.rep-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.rep-bronze { background: rgba(205, 127, 50, 0.15); color: #cd7f32; }
.rep-silver { background: rgba(192, 192, 192, 0.15); color: #c0c0c0; }
.rep-gold { background: rgba(255, 215, 0, 0.15); color: #ffd700; }
.rep-diamond { background: rgba(0, 224, 198, 0.15); color: var(--accent); }

/* ---- Media Type Icon ---- */
.media-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  font-size: 0.8rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ---- Rating Slider ---- */
.rating-slider-container {
  padding: 20px 0;
}

.rating-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  outline: none;
  transition: all var(--transition-fast);
}

.rating-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: all var(--transition-fast);
  border: 3px solid var(--bg-card-solid);
}

.rating-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 24px var(--accent-glow);
}

.rating-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--bg-card-solid);
  box-shadow: 0 0 12px var(--accent-glow);
}

.rating-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rating-display {
  text-align: center;
  margin-bottom: 16px;
}

.rating-display-score {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rating-display-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---- Distribution Chart ---- */
.distribution-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.distribution-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.distribution-label {
  width: 60px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
  font-weight: 600;
}

.distribution-bar-bg {
  flex: 1;
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: 5px;
  overflow: hidden;
}

.distribution-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  position: relative;
}

.distribution-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15));
}

.distribution-count {
  width: 36px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 600;
}

/* ---- Page Hero ---- */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(0, 224, 198, 0.12) 0%, rgba(6, 182, 212, 0.05) 30%, transparent 70%);
  opacity: 1;
  pointer-events: none;
  animation: pulse 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 740px;
  margin: 0 auto;
  z-index: 1;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 20px;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 52px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
  animation: countUp 0.6s ease both;
}

.hero-stat:nth-child(2) { animation-delay: 0.1s; }
.hero-stat:nth-child(3) { animation-delay: 0.2s; }
.hero-stat:nth-child(4) { animation-delay: 0.3s; }

.hero-stat-value {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Live Activity Feed ---- */
.activity-feed {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.activity-feed::-webkit-scrollbar {
  width: 4px;
}

.activity-feed::-webkit-scrollbar-track {
  background: transparent;
}

.activity-feed::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
  font-size: 0.85rem;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-score {
  flex-shrink: 0;
}

/* ---- Section ---- */
.section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ---- Media Grid ---- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.media-card {
  cursor: pointer;
}

.media-card-inner {
  display: flex;
  gap: 16px;
}

.media-card-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.media-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card-info {
  flex: 1;
  min-width: 0;
}

.media-card-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.media-card-stat {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Filters Bar ---- */
.filters-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.search-input-wrapper {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-input-wrapper::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-base);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

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

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover, .filter-chip.active {
  background: var(--accent-subtle);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  padding: 16px 0;
}

.pagination-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-subtle);
}

.pagination-btn.active {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---- Table ---- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.table tbody tr {
  transition: background var(--transition-fast);
}

.table tbody tr:hover {
  background: rgba(0, 224, 198, 0.03);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  position: relative;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 6px;
  padding: 0 6px;
}

/* ---- Dropdown ---- */
.dropdown {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}

.user-menu-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.user-menu-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-inverse);
}

.user-menu-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  display: none;
  z-index: 100;
  animation: slideDown 0.2s ease;
  backdrop-filter: blur(20px);
}

.dropdown-menu.open {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-align: left;
}

.dropdown-item:hover {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ---- Auth Pages ---- */
.auth-page {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

/* ---- Profile ---- */
.profile-header {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 40px 0 32px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-inverse);
  box-shadow: 0 0 24px var(--accent-glow);
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
}

.profile-username {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.profile-stat {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.profile-stat strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ---- Comments ---- */
.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-inverse);
  flex-shrink: 0;
}

.comment-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-left: 42px;
}

.comment-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  margin-left: 42px;
}

.comment-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.comment-vote-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.comment-vote-btn.active-up {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}

.comment-vote-btn.active-down {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

/* ---- Stats Grid ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #06b6d4);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.stat-card-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.empty-state-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state-text {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 16px);
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideDown 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 420px;
}

.toast-success {
  border-left: 3px solid var(--success);
  background: linear-gradient(90deg, var(--success-bg), var(--bg-card-solid));
}

.toast-error {
  border-left: 3px solid var(--danger);
  background: linear-gradient(90deg, var(--danger-bg), var(--bg-card-solid));
}

.toast-warning {
  border-left: 3px solid var(--warning);
  background: linear-gradient(90deg, var(--warning-bg), var(--bg-card-solid));
}

.toast-info {
  border-left: 3px solid var(--info);
  background: linear-gradient(90deg, var(--info-bg), var(--bg-card-solid));
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
}

/* ---- Footer ---- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 48px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-powered {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-inverse);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-glow);
  cursor: pointer;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 32px var(--accent-glow);
}

/* ---- Share Button ---- */
.share-btn-container {
  display: flex;
  gap: 8px;
}

/* ---- Admin Specific ---- */
.admin-card-pending {
  border-left: 3px solid var(--warning);
}

.admin-card-rejected {
  border-left: 3px solid var(--danger);
}

.admin-card-approved {
  border-left: 3px solid var(--success);
}

.admin-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-batch-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  animation: slideDown 0.2s ease;
}

.admin-batch-bar span {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---- Utility Classes ---- */

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-bold { font-weight: 700; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.hidden { display: none !important; }

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.glass {
  background: rgba(16, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

/* ---- Responsive ---- */
@media (max-width: 968px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav, .auth-buttons {
    display: none;
  }

  .hero-title {
    font-size: 2rem;
  }

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

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

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

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

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .tabs {
    gap: 0;
  }

  .tab {
    padding: 10px 14px;
    font-size: 0.8rem;
  }

  .outlet-detail-grid {
    grid-template-columns: 1fr !important;
  }
  
  .toast {
    min-width: unset;
    max-width: calc(100vw - 40px);
  }
}

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

  .hero-actions .btn-lg {
    width: 100%;
  }

  .hero-stats {
    gap: 16px;
  }

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

  .stat-card {
    padding: 16px;
  }

  .stat-card-value {
    font-size: 1.5rem;
  }
}
