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

/* ─── Variables ───────────────────────────────────────────── */
:root {
  --bg:          #080808;
  --surface:     #0f0f0f;
  --surface-2:   #161616;
  --surface-3:   #1c1c1c;
  --border:      #1f1f1f;
  --border-2:    #2a2a2a;
  --accent:      #818cf8;
  --accent-2:    #6366f1;
  --accent-glow: rgba(129, 140, 248, 0.18);
  --accent-soft: rgba(129, 140, 248, 0.08);
  --text:        #f1f5f9;
  --text-dim:    #94a3b8;
  --text-muted:  #475569;
  --success:     #10b981;
  --error:       #ef4444;
  --warning:     #f59e0b;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --transition:  0.2s ease;
}

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

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Navigation ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}
.hero-brand-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 24px rgba(129, 140, 248, 0.3));
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); }
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-2);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }
.btn-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.btn-success:hover { background: rgba(16, 185, 129, 0.25); }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ─── Form elements ───────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0.04em; text-transform: uppercase; }
.form-input, .form-textarea, .form-select {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--surface-3); }

/* ─── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ─── Video grid card ─────────────────────────────────────── */
.video-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}
.video-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
}
.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .video-card-thumb img { transform: scale(1.05); }
.video-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
}
.video-card-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}
.video-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}
.video-card:hover .video-card-overlay { opacity: 1; }
.video-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.video-card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.video-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: auto;
}

/* ─── Grid layouts ────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* ─── Page wrapper ────────────────────────────────────────── */
.page { padding-top: 64px; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 3rem 0; }

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(129, 140, 248, 0.06) 0%, transparent 50%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 20%, rgba(0,0,0,0.5) 80%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(129, 140, 248, 0.3);
  background: rgba(129, 140, 248, 0.08);
  padding: 0.35rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.hero-title span {
  background: linear-gradient(135deg, var(--accent) 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Section headers ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-sub { font-size: 0.875rem; color: var(--text-dim); margin-top: 0.25rem; }

/* ─── Tags ────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text-dim);
}
.tag-accent {
  background: var(--accent-soft);
  border-color: rgba(129, 140, 248, 0.25);
  color: var(--accent);
}
.tags-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ─── Category filters ────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.45rem 1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-dim);
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ─── Search bar ──────────────────────────────────────────── */
.search-bar {
  position: relative;
  max-width: 420px;
  width: 100%;
}
.search-bar input {
  padding-left: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border-2);
}
.search-bar svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ─── Video detail page ───────────────────────────────────── */
.video-detail { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; align-items: start; }
.gallery { display: flex; flex-direction: column; gap: 0.75rem; }
.gallery-main {
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: zoom-in;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}
.gallery-thumb {
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-info { display: flex; flex-direction: column; gap: 1rem; }
.video-info-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.video-info-meta { display: flex; gap: 1rem; color: var(--text-muted); font-size: 0.8rem; }

/* ─── Purchase card ───────────────────────────────────────── */
.purchase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 80px;
}
.purchase-price {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.currency-picker { display: flex; flex-direction: column; gap: 0.5rem; }
.currency-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.currency-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.8rem;
  font-weight: 600;
}
.currency-option:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.currency-option.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.currency-option .symbol { font-size: 1rem; }

/* ─── Payment modal ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 460px;
  width: 100%;
  transform: translateY(16px);
  transition: transform var(--transition);
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.payment-address-box {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  word-break: break-all;
}
.payment-address-text { font-size: 0.8rem; font-family: monospace; color: var(--text-dim); flex: 1; }
.payment-amount {
  text-align: center;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
}
.payment-amount .amount { font-size: 1.75rem; font-weight: 800; }
.payment-amount .label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.payment-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-dot.waiting { background: var(--warning); box-shadow: 0 0 8px var(--warning); animation: pulse 2s infinite; }
.status-dot.confirmed { background: var(--success); box-shadow: 0 0 8px var(--success); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ─── Dashboard ───────────────────────────────────────────── */
.purchase-list { display: flex; flex-direction: column; gap: 1rem; }
.purchase-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  transition: border-color var(--transition);
}
.purchase-item:hover { border-color: var(--border-2); }
.purchase-item-thumb {
  width: 80px;
  height: 45px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
.purchase-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.purchase-item-info { flex: 1; min-width: 0; }
.purchase-item-title { font-weight: 600; font-size: 0.9rem; }
.purchase-item-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border-2); }

/* ─── Auth pages ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% -30%, rgba(99, 102, 241, 0.12) 0%, transparent 60%);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.auth-logo img {
  height: 44px;
  width: auto;
}
.auth-sub { text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }
.auth-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1.5rem;
}
.auth-divider a { color: var(--accent); }
.auth-divider a:hover { text-decoration: underline; }
.form-error {
  font-size: 0.8rem;
  color: var(--error);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
}

/* ─── Admin panel ─────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px); }
.admin-sidebar {
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.admin-nav-item:hover { background: var(--surface-2); color: var(--text); }
.admin-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.admin-content { padding: 2rem; overflow-y: auto; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.stat-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.5rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-value.accent { color: var(--accent); }

/* ─── Table ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }
.td-title { color: var(--text); font-weight: 500; }

/* ─── Upload area ─────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-preview { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.upload-thumb {
  position: relative;
  width: 80px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-2);
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb-remove {
  position: absolute;
  top: 2px; right: 2px;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  color: #fff;
  width: 16px; height: 16px;
  border-radius: 50%;
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ─── Lightbox ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
}

/* ─── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.page-btn:disabled { opacity: 0.3; pointer-events: none; }

/* ─── Empty / loading states ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; color: var(--text-dim); margin-bottom: 0.5rem; }
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; align-items: center; padding: 4rem; }

/* ─── Toast notifications ─────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 360px;
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Dividers ────────────────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); }

/* ─── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
footer a { color: var(--text-dim); }
footer a:hover { color: var(--accent); }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .video-detail { grid-template-columns: 1fr; }
  .purchase-card { position: static; }
}
@media (max-width: 768px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero-title { font-size: 2.2rem; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .currency-options { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .modal { padding: 1.5rem; }
  .container { padding: 0 1rem; }
}

/* ─── Utilities ───────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
