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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-hover: #222240;
  --text-primary: #e8e8f0;
  --text-secondary: #9090a8;
  --text-muted: #606078;
  --accent: #e50914;
  --accent-hover: #ff1a1a;
  --gold: #f5a623;
  --border: #2a2a40;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --max-width: 1400px;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }
code { background: var(--bg-secondary); padding: 2px 6px; border-radius: 4px; font-size: .875em; }

/* ── Header ── */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.nav-links { display: flex; gap: 8px; }
.nav-link {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  transition: all .15s;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.nav-premium { color: var(--gold); font-weight: 600; }
.nav-register { background: var(--accent); color: #fff; font-weight: 600; }
.nav-register:hover { background: var(--accent-hover); color: #fff; }
.nav-admin { color: #4fc3f7; }
.nav-search { flex: 1; max-width: 400px; }
.nav-auth { display: flex; gap: 8px; align-items: center; margin-left: auto; }

.search-input {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: .875rem;
  outline: none;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--accent); }

.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; padding: 8px; }

/* ── Main ── */
.main-content { flex: 1; max-width: var(--max-width); margin: 0 auto; padding: 24px 16px; width: 100%; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 48px 16px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, transparent 100%);
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 8px; }
.hero-subtitle { color: var(--text-secondary); font-size: 1.125rem; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-accent { background: var(--gold); color: #000; }
.btn-accent:hover { background: #ffb840; color: #000; }
.btn-secondary { background: var(--bg-hover); color: var(--text-primary); }
.btn-secondary:hover { background: var(--border); }
.btn-large { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Video Grid ── */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.section-header h2 { font-size: 1.25rem; }
.section-sort { display: flex; gap: 4px; }
.sort-link {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .8125rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  transition: all .15s;
}
.sort-link.active, .sort-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-icon {
  font-size: 3rem;
  color: var(--accent);
  opacity: .6;
}
.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.8);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .8125rem;
  font-weight: 600;
}

.video-info { padding: 12px; }
.video-info h3 {
  font-size: .9375rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-info h3 a { color: var(--text-primary); }
.video-info h3 a:hover { color: var(--accent); }
.video-meta { font-size: .8125rem; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.video-category { color: var(--accent); font-weight: 500; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.page-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: .875rem;
  transition: all .15s;
}
.page-link.active, .page-link:hover { background: var(--accent); color: #fff; }

/* ── Auth Pages ── */
.auth-page, .age-verify-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 24px 16px;
}
.auth-card, .age-verify-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
}
.auth-card h1, .age-verify-card h1 { text-align: center; margin-bottom: 8px; }
.auth-link { text-align: center; margin-top: 16px; font-size: .875rem; color: var(--text-secondary); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: .875rem; color: var(--text-secondary); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: .9375rem;
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus { border-color: var(--accent); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .875rem; }
.alert-error { background: rgba(229,9,20,.15); color: var(--accent); border: 1px solid var(--accent); }
.alert-success { background: rgba(76,175,80,.15); color: #4caf50; border: 1px solid #4caf50; }

/* ── Age Verify ── */
.age-verify-overlay { text-align: center; }
.av-icon { font-size: 4rem; margin-bottom: 16px; }
.av-subtitle { color: var(--text-secondary); margin-bottom: 24px; }
.av-notice { background: rgba(245,166,35,.1); border: 1px solid var(--gold); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 16px; font-size: .875rem; }
.av-success { margin: 24px 0; }
.av-form { margin: 24px 0; }
.av-form p { font-size: .875rem; color: var(--text-secondary); margin-bottom: 16px; }
.av-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.av-disclaimer { font-size: .75rem; color: var(--text-muted); margin-top: 16px; }
.av-link { color: var(--text-muted); text-decoration: underline; }
.av-2257 { font-size: .75rem; color: var(--text-muted); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ── Account ── */
.account-page { max-width: 800px; margin: 0 auto; }
.account-page h1 { margin-bottom: 24px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 640px) { .account-grid { grid-template-columns: 1fr; } }
.account-card { background: var(--bg-card); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.account-card h2 { font-size: 1.125rem; margin-bottom: 12px; }
.account-card p { font-size: .875rem; color: var(--text-secondary); margin-bottom: 4px; }
.account-card strong { color: var(--text-primary); }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .8125rem; font-weight: 600; }
.status-active { background: rgba(76,175,80,.15); color: #4caf50; }
.status-inactive { background: rgba(158,158,158,.15); color: #9e9e9e; }

.premium-creds { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 16px; margin-top: 12px; }
.premium-creds code { font-size: 1.125rem; }

.payments-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.payments-table th, .payments-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.payments-table th { color: var(--text-muted); font-weight: 600; }
.status-completed { color: #4caf50; }
.status-pending { color: var(--gold); }
.status-failed { color: var(--accent); }

/* ── Premium ── */
.premium-page { text-align: center; }
.premium-hero { padding: 48px 16px; }
.premium-hero h1 { font-size: 2.5rem; margin-bottom: 8px; }
.premium-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 800px; margin: 0 auto 32px; }
.plan-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.plan-card:hover { border-color: var(--accent); }
.plan-featured { border-color: var(--gold); position: relative; }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #000;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: .8125rem;
  font-weight: 700;
}
.plan-price { font-size: 2rem; font-weight: 800; color: var(--gold); margin: 16px 0; }
.plan-features { list-style: none; margin-bottom: 24px; }
.plan-features li { padding: 8px 0; color: var(--text-secondary); font-size: .875rem; }
.plan-features li::before { content: '✓ '; color: #4caf50; font-weight: 700; }
.plan-status { color: var(--text-muted); font-size: .875rem; }

.paypal-button-container { margin-top: 16px; }

/* ── Crypto ── */
.crypto-section { margin-top: 32px; padding: 24px; background: var(--bg-card); border-radius: var(--radius); max-width: 600px; margin-left: auto; margin-right: auto; }
.crypto-section h2 { margin-bottom: 16px; }
.crypto-carousel { overflow-x: auto; }
.crypto-coins { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.crypto-coin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  min-width: 72px;
}
.crypto-coin:hover { border-color: var(--coin-color); }
.coin-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--coin-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 0 16px color-mix(in srgb, var(--coin-color) 40%, transparent);
}
.coin-name { font-size: .75rem; color: var(--text-secondary); }
.crypto-address { margin-top: 16px; padding: 16px; background: var(--bg-secondary); border-radius: var(--radius-sm); }
.crypto-address code { display: block; word-break: break-all; font-size: .8125rem; padding: 8px; margin: 8px 0; background: var(--bg-primary); }
.crypto-note { font-size: .75rem; color: var(--text-muted); }

/* ── Video Player ── */
.video-page { max-width: 1000px; margin: 0 auto; }
.video-player-container {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.video-player { width: 100%; display: block; max-height: 70vh; }
.player-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.overlay-content { text-align: center; }
.overlay-content h2 { font-size: 1.5rem; margin-bottom: 8px; }
.overlay-content p { color: var(--text-secondary); margin-bottom: 20px; }
.overlay-content .btn { margin: 4px; }

.video-details { margin-bottom: 32px; }
.video-title { font-size: 1.25rem; margin-bottom: 8px; }
.video-stats { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: .875rem; color: var(--text-secondary); margin-bottom: 8px; }
.stat-premium { color: var(--gold); font-weight: 600; padding: 2px 8px; border: 1px solid var(--gold); border-radius: 4px; font-size: .75rem; }
.stat-category { color: var(--accent); font-weight: 500; }
.video-description { background: var(--bg-card); border-radius: var(--radius-sm); padding: 16px; margin: 12px 0; font-size: .875rem; color: var(--text-secondary); line-height: 1.6; }
.video-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  padding: 4px 12px;
  background: var(--bg-card);
  border-radius: 20px;
  font-size: .8125rem;
  color: var(--text-secondary);
  transition: all .15s;
}
.tag:hover { background: var(--accent); color: #fff; }

/* ── Categories ── */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.category-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  transition: all .15s;
}
.category-card:hover { background: var(--bg-hover); transform: translateY(-2px); }
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.category-info h3 { font-size: 1rem; color: var(--text-primary); }
.category-count { font-size: .8125rem; color: var(--text-muted); }

/* ── Credential Reveal ── */
.credential-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 24px 16px;
}
.credential-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.credential-display { margin-top: 24px; }
.credential-field { margin-bottom: 20px; }
.credential-field label { display: block; font-size: .8125rem; color: var(--text-muted); margin-bottom: 4px; }
.credential-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  user-select: all;
}
.credential-timer { margin-top: 24px; }
.credential-timer p { font-size: .875rem; color: var(--text-secondary); }
.countdown {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
}
.credential-note { font-size: .8125rem; color: var(--gold); font-weight: 600; }
.credential-expired { margin-top: 24px; }
.credential-expired p { color: var(--text-muted); margin-bottom: 16px; }

/* ── Admin ── */
.admin-page { max-width: 1200px; margin: 0 auto; }
.admin-page h1 { margin-bottom: 24px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 24px; text-align: center; }
.stat-card h3 { font-size: .8125rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.stat-number { font-size: 1.75rem; font-weight: 800; }

.admin-sections { display: grid; gap: 24px; }
.admin-card { background: var(--bg-card); border-radius: var(--radius); padding: 24px; overflow-x: auto; }
.admin-card h2 { font-size: 1.125rem; margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table th, .admin-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { color: var(--text-muted); font-weight: 600; }
.admin-table tr:hover td { background: var(--bg-hover); }

/* ── Upload Form ── */
.upload-form { max-width: 600px; }
.upload-form select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-primary); font-size: .9375rem; }
.upload-form textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-primary); font-size: .9375rem; resize: vertical; min-height: 80px; }
.upload-form input[type="file"] { width: 100%; padding: 10px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); }

/* ── Footer ── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  text-align: center;
  margin-top: auto;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: .875rem; }
.footer-links a:hover { color: var(--text-primary); }
.footer-legal { font-size: .75rem; color: var(--text-muted); line-height: 1.8; }

/* ── Empty State ── */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 64px 16px; color: var(--text-muted); }

/* ── Error ── */
.error-page { text-align: center; padding: 80px 16px; }
.error-page h1 { font-size: 5rem; color: var(--accent); margin-bottom: 8px; }

/* ── Category Page ── */
.category-header { margin-bottom: 24px; }
.category-header h1 { font-size: 1.5rem; }

/* ── Search Page ── */
.search-page h1 { font-size: 1.25rem; margin-bottom: 8px; }
.search-count { color: var(--text-muted); font-size: .875rem; margin-bottom: 16px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nav-search { max-width: 280px; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .premium-hero h1 { font-size: 1.75rem; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .nav-links, .nav-auth, .nav-search { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-container.mobile-open .nav-links,
  .nav-container.mobile-open .nav-auth,
  .nav-container.mobile-open .nav-search {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .nav-container.mobile-open .nav-search { order: -1; max-width: none; margin-bottom: 8px; }
  .nav-container.mobile-open .nav-links { flex-direction: column; gap: 4px; }
  .nav-container.mobile-open .nav-auth { flex-direction: row; }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}

/* ── TV / Large Screen ── */
@media (min-width: 1920px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .hero h1 { font-size: 3rem; }
}

/* ── Android TV / Fire TV ── */
@media (hover: none) and (pointer: coarse) {
  .video-card { transform: none !important; }
  .video-card:hover { transform: none; }
  .nav-link { padding: 12px 20px; }
}
