/* ============================================================
   JinnieLoad — Main Stylesheet
   Theme: Dark with soft purple/pink accents
   ============================================================ */

:root {
  --bg:          #0d0d14;
  --bg2:         #13131f;
  --bg3:         #1a1a2e;
  --surface:     #1e1e30;
  --surface2:    #252540;
  --border:      rgba(168,85,247,0.15);
  --border2:     rgba(255,255,255,0.06);

  --purple:      #a855f7;
  --purple-d:    #7c3aed;
  --purple-l:    #c084fc;
  --pink:        #ec4899;
  --pink-l:      #f472b6;

  --text:        #f0f0ff;
  --text-2:      #a0a0c0;
  --text-3:      #606080;

  --grad:        linear-gradient(135deg, #a855f7, #ec4899);
  --grad-soft:   linear-gradient(135deg, rgba(168,85,247,0.12), rgba(236,72,153,0.08));
  --glow:        0 0 40px rgba(168,85,247,0.25);
  --glow-sm:     0 0 15px rgba(168,85,247,0.2);

  --radius:      14px;
  --radius-sm:   8px;
  --radius-lg:   20px;

  --transition:  0.25s cubic-bezier(0.4,0,0.2,1);
  --font:        'Inter', system-ui, sans-serif;
  --font-display:'Space Grotesk', 'Inter', sans-serif;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input { font-family: inherit; }
img, svg { display: block; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--purple-d); border-radius: 3px; }

/* ── Cookie Banner ────────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  z-index: 9999; width: min(520px, calc(100vw - 32px));
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), var(--glow-sm);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.cookie-banner.visible { transform: translateX(-50%) translateY(0); }
.cookie-content { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cookie-content > span { flex: 1; min-width: 180px; font-size: 13px; color: var(--text-2); }
.cookie-actions { display: flex; gap: 8px; }
.btn-cookie-accept {
  background: var(--grad); color: white; border-radius: var(--radius-sm);
  padding: 7px 16px; font-size: 13px; font-weight: 500; transition: var(--transition);
}
.btn-cookie-accept:hover { opacity: 0.85; }
.btn-cookie-decline {
  background: var(--surface2); color: var(--text-2); border-radius: var(--radius-sm);
  padding: 7px 14px; font-size: 13px; transition: var(--transition);
}
.btn-cookie-decline:hover { color: var(--text); }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; gap: 16px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
}
.logo-accent { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-center { flex: 1; }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.btn-login {
  background: var(--grad); color: white;
  border-radius: 50px; padding: 8px 22px;
  font-size: 14px; font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(168,85,247,0.3);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(168,85,247,0.45); }

.nav-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--purple); }
.nav-avatar-link { display: block; }
.nav-avatar-placeholder {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}

/* ── Lang Dropdown ────────────────────────────────────────── */
.lang-dropdown { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text-2); font-size: 13px; transition: var(--transition);
}
.lang-btn:hover { color: var(--text); border-color: var(--border); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px;
  min-width: 160px; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: var(--transition);
}
.lang-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.lang-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-2); transition: var(--transition);
}
.lang-item:hover, .lang-item.active { background: var(--surface2); color: var(--text); }
.lang-item.active { color: var(--purple-l); }

/* ── Modals ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
  padding: 16px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  width: 100%; max-width: 440px; position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34,1.2,0.64,1);
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  color: var(--text-3); padding: 6px; border-radius: 50%;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--surface2); }

/* Auth Modal */
.auth-tabs { display: flex; gap: 4px; background: var(--surface); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 28px; }
.auth-tab {
  flex: 1; padding: 9px; border-radius: 6px; font-size: 14px; font-weight: 500;
  color: var(--text-2); transition: var(--transition);
}
.auth-tab.active { background: var(--surface2); color: var(--purple-l); }
.auth-panel { display: none; animation: fadeSlideUp 0.3s ease; }
.auth-panel.active { display: block; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-modal h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--text-2); font-size: 14px; margin-bottom: 24px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 7px; }
.form-group input {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  padding: 11px 14px; color: var(--text); font-size: 14px;
  transition: var(--transition); outline: none;
}
.form-group input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,0.12); }
.form-error { color: #f87171; font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.btn-submit {
  width: 100%; background: var(--grad); color: white;
  border-radius: var(--radius-sm); padding: 13px;
  font-size: 15px; font-weight: 600; transition: var(--transition);
  box-shadow: 0 4px 20px rgba(168,85,247,0.3);
}
.btn-submit:hover { opacity: 0.88; transform: translateY(-1px); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); transition: var(--transition); }
.eye-btn:hover { color: var(--text-2); }

.password-strength { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.strength-bar { flex: 1; height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.strength-fill { height: 100%; width: 0; border-radius: 2px; transition: width 0.4s, background 0.4s; }
.strength-label { font-size: 12px; color: var(--text-3); white-space: nowrap; }

.pass-rules { list-style: none; margin-top: 8px; }
.pass-rules li { font-size: 12px; color: var(--text-3); padding: 2px 0; padding-left: 18px; position: relative; transition: color 0.2s; }
.pass-rules li::before { content: '✗'; position: absolute; left: 0; color: #f87171; }
.pass-rules li.ok { color: #34d399; }
.pass-rules li.ok::before { content: '✓'; color: #34d399; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-3); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border2); }

.btn-tg {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 12px;
  font-size: 14px; font-weight: 500; color: var(--text); transition: var(--transition);
}
.btn-tg:hover { border-color: #229ED9; background: rgba(34,158,217,0.08); }

/* Code input */
.verify-icon { font-size: 48px; text-align: center; margin-bottom: 12px; }
.code-inputs { display: flex; gap: 10px; justify-content: center; margin: 24px 0; }
.code-digit {
  width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 700;
  background: var(--surface); border: 2px solid var(--border2);
  border-radius: var(--radius-sm); color: var(--text); outline: none;
  transition: var(--transition);
}
.code-digit:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,0.15); }

/* ── Main Content ─────────────────────────────────────────── */
main { min-height: calc(100vh - 64px - 120px); }

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  text-align: center; padding: 80px 24px 60px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(168,85,247,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(168,85,247,0.1); border: 1px solid rgba(168,85,247,0.2);
  border-radius: 50px; padding: 6px 16px; font-size: 13px;
  color: var(--purple-l); margin-bottom: 24px;
  animation: fadeSlideUp 0.5s ease both;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(32px, 6vw, 64px);
  font-weight: 700; line-height: 1.15; margin-bottom: 16px;
  animation: fadeSlideUp 0.5s 0.1s ease both;
}
.hero h1 .grad-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p {
  font-size: clamp(15px, 2vw, 18px); color: var(--text-2);
  max-width: 560px; margin: 0 auto 40px;
  animation: fadeSlideUp 0.5s 0.2s ease both;
}

/* ── Download Box ─────────────────────────────────────────── */
.download-box {
  max-width: 700px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), var(--glow);
  animation: fadeSlideUp 0.5s 0.3s ease both;
}
.dl-input-row {
  display: flex; gap: 12px; margin-bottom: 16px;
  flex-wrap: wrap;
}
.dl-input {
  flex: 1; min-width: 200px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 14px 18px;
  color: var(--text); font-size: 15px; outline: none;
  transition: var(--transition);
}
.dl-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,0.12); }
.dl-input::placeholder { color: var(--text-3); }
.btn-dl {
  background: var(--grad); color: white;
  border-radius: var(--radius-sm); padding: 14px 28px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: var(--transition); box-shadow: 0 4px 20px rgba(168,85,247,0.35);
}
.btn-dl:hover { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(168,85,247,0.5); }
.btn-dl:active { transform: translateY(0); }

/* Media info card */
.media-card {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 18px;
  display: none; gap: 16px; margin-bottom: 16px;
  animation: fadeSlideUp 0.3s ease;
}
.media-card.visible { display: flex; }
.media-thumb {
  width: 120px; height: 80px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0; background: var(--surface2);
}
.media-info { flex: 1; overflow: hidden; }
.media-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-platform { font-size: 13px; color: var(--purple-l); margin-bottom: 8px; }
.media-meta { font-size: 12px; color: var(--text-3); }

/* Quality/Type selector */
.dl-options { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.option-group { display: flex; gap: 6px; flex-wrap: wrap; }
.option-label { font-size: 12px; color: var(--text-3); align-self: center; margin-right: 4px; }
.opt-btn {
  padding: 7px 14px; border-radius: 50px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border2); color: var(--text-2); transition: var(--transition);
}
.opt-btn:hover { border-color: var(--purple); color: var(--purple-l); }
.opt-btn.active { background: rgba(168,85,247,0.15); border-color: var(--purple); color: var(--purple-l); }
.opt-btn.premium { position: relative; }
.opt-btn.premium::after {
  content: '⭐'; position: absolute; top: -8px; right: -4px; font-size: 10px;
}

/* Download action buttons */
.dl-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-action {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; transition: var(--transition);
  border: 1px solid var(--border2);
}
.btn-action.primary { background: var(--grad); border: none; color: white; box-shadow: 0 4px 16px rgba(168,85,247,0.3); }
.btn-action.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(168,85,247,0.45); }
.btn-action.secondary { color: var(--text-2); }
.btn-action.secondary:hover { color: var(--text); border-color: var(--purple); }

/* Progress bar */
.dl-progress { display: none; }
.dl-progress.visible { display: block; }
.progress-text { font-size: 13px; color: var(--text-2); margin-bottom: 8px; display: flex; justify-content: space-between; }
.progress-bar { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.progress-fill {
  height: 100%; background: var(--grad); border-radius: 3px;
  width: 0; transition: width 0.4s ease;
}

/* ── Platforms Section ────────────────────────────────────── */
.platforms-section { padding: 60px 24px; }
.section-title {
  text-align: center; font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 32px); font-weight: 700; margin-bottom: 8px;
}
.section-sub { text-align: center; color: var(--text-2); margin-bottom: 40px; font-size: 15px; }
.platforms-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px; max-width: 900px; margin: 0 auto;
}
.platform-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 24px 16px; text-align: center;
  transition: var(--transition); cursor: default;
}
.platform-card:hover {
  border-color: var(--border); background: var(--surface2);
  transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.platform-icon { font-size: 32px; margin-bottom: 10px; }
.platform-name { font-size: 13px; font-weight: 500; color: var(--text-2); }

/* ── Player Page ──────────────────────────────────────────── */
.player-page { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.player-header { margin-bottom: 24px; }
.player-platform { font-size: 13px; color: var(--purple-l); margin-bottom: 8px; font-weight: 500; }
.player-title { font-family: var(--font-display); font-size: clamp(20px, 4vw, 28px); font-weight: 700; margin-bottom: 16px; }
.player-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.video-container {
  background: #000; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 16/9;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.video-container video, .video-container audio { width: 100%; height: 100%; }
.audio-player-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; text-align: center;
}

/* ── Cabinet ──────────────────────────────────────────────── */
.cabinet-page { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.cabinet-header { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border2); }
.cabinet-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--purple); }
.cabinet-avatar-ph {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center;
  justify-content: center; font-size: 32px; font-weight: 700; flex-shrink: 0;
}
.cabinet-name { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.cabinet-meta { font-size: 13px; color: var(--text-2); }
.premium-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.3);
  border-radius: 50px; padding: 4px 12px; font-size: 12px; color: var(--purple-l);
  margin-top: 6px;
}
.btn-logout {
  margin-left: auto; padding: 9px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border2); color: var(--text-2); font-size: 14px; transition: var(--transition);
}
.btn-logout:hover { border-color: #f87171; color: #f87171; }

.downloads-table { width: 100%; border-collapse: collapse; }
.downloads-table th {
  text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 500;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border2);
}
.downloads-table td { padding: 14px 16px; border-bottom: 1px solid var(--border2); font-size: 14px; }
.downloads-table tr:hover td { background: var(--surface); }
.dl-title-cell { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platform-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 50px; font-size: 12px;
  background: rgba(168,85,247,0.1); color: var(--purple-l);
}
.btn-delete-dl { color: var(--text-3); transition: var(--transition); padding: 4px; border-radius: 4px; }
.btn-delete-dl:hover { color: #f87171; background: rgba(248,113,113,0.1); }

/* ── Error Pages ──────────────────────────────────────────── */
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100px 24px; text-align: center; }
.error-code { font-family: var(--font-display); font-size: 120px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.error-title { font-size: 24px; font-weight: 600; margin: 16px 0 8px; }
.error-desc { color: var(--text-2); margin-bottom: 32px; }
.btn-home { background: var(--grad); color: white; border-radius: 50px; padding: 12px 28px; font-weight: 600; transition: var(--transition); }
.btn-home:hover { transform: translateY(-2px); }

/* ── Footer ───────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border2); padding: 40px 24px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-brand p { color: var(--text-3); font-size: 13px; margin-top: 8px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); font-size: 14px; transition: var(--transition); }
.footer-links a:hover { color: var(--purple-l); }
.footer-copy { text-align: center; color: var(--text-3); font-size: 12px; }

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; }
  .dl-input-row { flex-direction: column; }
  .btn-dl { width: 100%; }
  .download-box { padding: 20px; }
  .hero { padding: 48px 16px 40px; }
  .cabinet-header { flex-direction: column; text-align: center; }
  .btn-logout { margin: 8px auto 0; }
  .downloads-table td:nth-child(3), .downloads-table th:nth-child(3) { display: none; }
  .modal { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .platforms-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 32px 24px 24px; }
  .hero h1 { font-size: 28px; }
  .modal { max-height: 95vh; }
}
