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

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

:root {
  --bg: #07060D;
  --surface: rgba(255,255,255,0.035);
  --surface-solid: #15131F;
  --surface-2: rgba(255,255,255,0.025);
  --surface-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.09);
  --border-light: rgba(255,255,255,0.05);
  --text: #F5F4FA;
  --text-muted: #9b97b2;
  --text-dim: #65617c;
  --accent: #007FFF;
  --accent-hover: #0066d6;
  --accent-blue: #4f8cff;
  --accent-glow: rgba(0, 127, 255,0.45);
  --grad: linear-gradient(120deg, #4f8cff 0%, #007FFF 60%, #2e9bff 100%);
  --grad-text: linear-gradient(120deg, #9db4ff 0%, #7db4ff 100%);
  --accent-green: #10B981;
  --accent-green-hover: #059669;
  --accent-red: #ef4444;
  --font: 'Golos Text', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* BACKGROUND: grid + glow (Remakeit signature) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 110% 70% at 50% -5%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 110% 70% at 50% -5%, #000 25%, transparent 78%);
}
body::after {
  content: "";
  position: fixed; top: -260px; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 640px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, rgba(79,140,255,0.12) 38%, transparent 70%);
  filter: blur(8px);
}

/* CONTAINER */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* NAVBAR — floating pill */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1rem 1rem 0; background: transparent; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1.5rem; max-width: 1120px; margin: 0 auto; padding: 0 0.7rem 0 1.6rem; background: rgba(20,18,30,0.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,0.09); border-radius: 999px; box-shadow: 0 8px 40px rgba(0,0,0,0.4); }
.nav-logo { font-size: 1.2rem; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.nav-logo span { background: var(--grad-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 0.6rem; align-items: center; }

/* BUTTONS — pill shaped */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1.3rem; border-radius: 999px; font-family: var(--font); font-size: 0.875rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all 0.2s ease; white-space: nowrap; letter-spacing: -0.01em; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 20px rgba(0, 127, 255,0.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(0, 127, 255,0.5); filter: brightness(1.08); }
.btn-green { background: var(--accent-green); color: #fff; }
.btn-green:hover { background: var(--accent-green-hover); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(16,185,129,0.3); }
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: #fff; background: rgba(0, 127, 255,0.12); }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-lg { padding: 0.9rem 1.9rem; font-size: 1rem; border-radius: 999px; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; border-radius: 999px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* SECTION LABELS / PILL BADGES */
.section-label { display: inline-block; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); color: #7db4ff; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; padding: 0.35rem 0.95rem; border-radius: 999px; margin-bottom: 1.25rem; }
.section-title { font-size: clamp(1.85rem, 4.5vw, 3rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 1rem; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* FORMS */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }
.form-input { width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 0.75rem; padding: 0.8rem 1rem; color: var(--text); font-family: var(--font); font-size: 0.95rem; transition: border-color 0.2s, box-shadow 0.2s; }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 127, 255,0.2); }
.form-input::placeholder { color: var(--text-dim); }
.form-textarea { resize: vertical; min-height: 100px; }

/* CARDS */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.75rem; backdrop-filter: blur(12px); }
.card-sm { padding: 1.25rem; }

/* AUTH LAYOUT */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.auth-box { width: 100%; max-width: 440px; }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo a { font-size: 1.75rem; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.auth-logo a span { background: var(--grad-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-card { background: rgba(20,18,30,0.6); border: 1px solid var(--border); border-radius: 1.5rem; padding: 2.5rem; backdrop-filter: blur(20px); box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.auth-card p.auth-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.875rem; color: var(--text-muted); }
.auth-footer a { color: #7db4ff; text-decoration: none; font-weight: 600; }

/* ALERTS */
.alert { padding: 0.875rem 1rem; border-radius: 0.75rem; font-size: 0.875rem; margin-bottom: 1rem; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: #34d399; }

/* SPINNER */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* SIDEBAR LAYOUT */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex-shrink: 0; background: rgba(16,14,24,0.7); backdrop-filter: blur(18px); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 1.5rem; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 50; }
.sidebar-logo { font-size: 1.35rem; font-weight: 800; margin-bottom: 2.5rem; padding: 0.5rem 0; letter-spacing: -0.02em; }
.sidebar-logo span { background: var(--grad-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.375rem; }
.nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 999px; text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: all 0.2s; cursor: pointer; border: none; background: none; width: 100%; font-family: var(--font); }
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.active { background: rgba(0, 127, 255,0.18); color: #9db4ff; font-weight: 600; }
.nav-item-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-footer { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.main-content { margin-left: 260px; flex: 1; padding: 2rem; min-height: 100vh; max-width: calc(100vw - 260px); }

/* MOBILE NAV TOGGLE */
.mobile-nav-toggle { display: none; position: fixed; top: 1rem; left: 1rem; z-index: 200; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 999px; padding: 0.6rem; cursor: pointer; color: var(--text); font-size: 1.25rem; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-inner { padding: 0 0.6rem 0 1.2rem; }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; max-width: 100vw; padding: 1rem; padding-top: 4rem; }
  .mobile-nav-toggle { display: flex; align-items: center; justify-content: center; }
}

/* CHECKBOX */
.checkbox-label { display: flex; align-items: center; gap: 0.625rem; cursor: pointer; font-size: 0.9rem; user-select: none; }
.checkbox-label input[type="checkbox"] { display: none; }
.checkbox-custom { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
.checkbox-label input:checked + .checkbox-custom { background: var(--accent); border-color: var(--accent); }
.checkbox-label input:checked + .checkbox-custom::after { content: "✓"; color: #fff; font-size: 0.75rem; font-weight: 700; }

/* RADIO */
.radio-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.radio-option { position: relative; }
.radio-option input[type="radio"] { display: none; }
.radio-option label { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1.125rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-size: 0.875rem; transition: all 0.2s; }
.radio-option input:checked + label { border-color: var(--accent); background: rgba(0, 127, 255,0.18); color: #9db4ff; }

/* TOASTS */
.toast-host { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.625rem; max-width: 360px; }
.toast { display: flex; align-items: center; gap: 0.625rem; padding: 0.875rem 1.1rem; border-radius: 0.75rem; background: var(--surface-solid); border: 1px solid var(--border); color: var(--text); font-size: 0.875rem; font-weight: 500; box-shadow: 0 12px 40px rgba(0,0,0,0.45); opacity: 0; transform: translateX(20px); transition: opacity 0.28s ease, transform 0.28s ease; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: #fff; }
.toast-success { border-color: rgba(16,185,129,0.4); }
.toast-success .toast-icon { background: var(--accent-green); }
.toast-error { border-color: rgba(239,68,68,0.4); }
.toast-error .toast-icon { background: var(--accent-red); }
.toast-info .toast-icon { background: var(--accent); }
@media(max-width: 480px) { .toast-host { left: 1rem; right: 1rem; max-width: none; } }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(7,6,13,0.7); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.25s ease; }
.modal-overlay.show { opacity: 1; }
.modal { width: 100%; max-width: 420px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.75rem; transform: translateY(12px) scale(0.98); transition: transform 0.25s ease; }
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.625rem; }
.modal-message { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.55; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
.btn-danger { background: var(--accent-red); color: #fff; border: 1px solid var(--accent-red); }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

/* COOKIE CONSENT BANNER */
.cookie-banner { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; z-index: 9999; max-width: 460px; margin: 0 auto; background: rgba(20,18,30,0.94); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border: 1px solid var(--border); border-radius: 1.1rem; padding: 1.25rem 1.4rem; box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03); transform: translateY(180%); opacity: 0; transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease; }
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner h4 { font-size: 0.95rem; font-weight: 700; margin: 0 0 0.45rem; display: flex; align-items: center; gap: 0.5rem; }
.cookie-banner p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 1.1rem; }
.cookie-banner p a { color: #9db4ff; }
.cookie-actions { display: flex; gap: 0.6rem; }
.cookie-actions .btn { flex: 1; text-align: center; justify-content: center; padding: 0.6rem 1rem; font-size: 0.85rem; }
@media (max-width: 520px) { .cookie-actions { flex-direction: column-reverse; } }

/* LEGAL PAGES */
.legal-page { max-width: 800px; margin: 0 auto; padding: 7rem 1.5rem 4rem; }
.legal-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.4rem; }
.legal-updated { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 2.5rem; }
.legal-page h2 { font-size: 1.2rem; font-weight: 700; margin: 2.5rem 0 0.75rem; }
.legal-page h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.legal-page p, .legal-page li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.75; }
.legal-page ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; }
.legal-page li { margin-bottom: 0.4rem; }
.legal-page a { color: #9db4ff; }
.legal-back { display: inline-block; margin-top: 2.5rem; }
.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.88rem; }
.legal-table th, .legal-table td { text-align: left; padding: 0.6rem 0.75rem; border: 1px solid var(--border); color: var(--text-muted); vertical-align: top; }
.legal-table th { color: var(--text); font-weight: 600; background: var(--surface); }

/* FOOTER LINKS */
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; margin-top: 1rem; }
.footer-links a { color: var(--text-muted); font-size: 0.82rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* PREMIUM LOCKS & UPSELL */
.coach-locked { display: flex; align-items: flex-start; gap: 1rem; }
.coach-locked-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.premium-lock { text-align: center; max-width: 540px; margin: 2rem auto; background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(0,127,255,0.08)); border: 1px solid rgba(124,58,237,0.3); border-radius: 1.5rem; padding: 2.5rem 2rem; }
.premium-lock-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.premium-lock h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.5rem; }
.premium-lock p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1.25rem; }
.premium-lock-list { list-style: none; padding: 0; margin: 0 auto 1.5rem; max-width: 360px; text-align: left; display: flex; flex-direction: column; gap: 0.5rem; }
.premium-lock-list li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.premium-lock-list li::before { content: "✓"; color: #a78bfa; font-weight: 700; }
.history-premium-note { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(0,127,255,0.08)); border: 1px solid rgba(124,58,237,0.3); border-radius: 1.125rem; padding: 1rem 1.25rem; margin-bottom: 1rem; font-size: 0.875rem; }
.history-premium-note span { color: var(--text-muted); }
