/* ========================================
   STYLE.CSS - Main Styles
   ======================================== */

/* ----- ROOT VARIABLES ----- */
:root {
    --bg: #0B0F1A;
    --surface: #121826;
    --surface-2: #1A2233;
    --border: #262F44;
    --accent: #FF5A2E;
    --accent-dim: #4A2717;
    --accent2: #38D98A;
    --accent2-dim: #173626;
    --text: #F4F1E9;
    --text-muted: #8C93A8;
    --text-faint: #5B6377;
    --font-d: 'Space Grotesk', sans-serif;
    --font-b: 'Inter', sans-serif;
    --font-m: 'JetBrains Mono', monospace;
    --shadow-glow: 0 8px 32px rgba(255, 90, 46, 0.15);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- RESET & BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-b);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse 900px 500px at 15% -5%, rgba(255, 90, 46, 0.10), transparent 60%),
        radial-gradient(ellipse 700px 500px at 90% 10%, rgba(56, 217, 138, 0.06), transparent 55%);
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

::selection {
    background: var(--accent);
    color: #1a0a04;
}

:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ----- SCROLLBAR ----- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}

/* ==========================================
   AUTH / USER MENU
   ========================================== */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent2-dim);
    border: 2px solid var(--accent2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent2);
    transition: all var(--transition);
}

.user-avatar:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 12px 16px;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.dropdown-name {
    font-weight: 600;
    font-size: 14px;
}

.dropdown-email {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 14px;
    transition: all var(--transition);
}

.user-dropdown a:hover {
    background: var(--surface-2);
    color: var(--text);
}

.user-dropdown a i {
    width: 18px;
    font-size: 14px;
}

/* ==========================================
   AUTH MODAL
   ========================================== */
.auth-modal .modal-card {
    min-height: 520px;
}

.auth-modal .modal-front,
.auth-modal .modal-back {
    padding: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.toggle-password:hover {
    color: var(--text);
}

.password-strength {
    margin-top: 6px;
}

.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: background var(--transition);
}

.strength-bar.weak { background: #FF5A2E; width: 33%; }
.strength-bar.medium { background: #EF9F27; width: 66%; }
.strength-bar.strong { background: var(--accent2); width: 100%; }

.strength-text {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 4px;
    display: block;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    accent-color: var(--accent2);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link {
    color: var(--text-muted);
    transition: color var(--transition);
}

.forgot-link:hover {
    color: var(--accent2);
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.auth-switch {
    color: var(--accent2);
    font-weight: 600;
    transition: color var(--transition);
}

.auth-switch:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ==========================================
   FLIP CARD ANIMATION
   ========================================== */
.flip-card {
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    min-height: 280px;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: 24px;
}

.flip-card-front {
    background: var(--surface);
    border: 1px solid var(--border);
    z-index: 2;
}

.flip-card-back {
    background: var(--surface-2);
    border: 1px solid var(--accent2);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(56, 217, 138, 0.06);
}

.flip-content {
    width: 100%;
}

.flip-content h3 {
    font-family: var(--font-d);
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent2);
}

.flip-content h3 i {
    font-size: 20px;
}

.insight-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.insight-item:last-child {
    border-bottom: none;
}

.insight-item i {
    color: var(--accent2);
    font-size: 16px;
    margin-top: 3px;
    flex-shrink: 0;
}

.insight-item strong {
    display: block;
    font-size: 13px;
    color: var(--text);
}

.insight-item p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.readiness-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 4px;
    margin-top: 6px;
    overflow: hidden;
}

.readiness-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 4px;
    transition: width 1s ease-out;
}

.flip-hint {
    text-align: center;
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 8px;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.flip-hint i {
    margin-right: 4px;
}

/* ==========================================
   MODAL / FORM STYLES
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(11, 15, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    perspective: 1000px;
}

.modal-card {
    position: relative;
    width: 100%;
    min-height: 500px;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.modal-card.flipped {
    transform: rotateY(180deg);
}

.modal-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.modal-front {
    z-index: 2;
}

.modal-back {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text);
    background: var(--surface-2);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 1px solid var(--accent);
}

.modal-icon i {
    font-size: 24px;
    color: var(--accent);
}

.modal-header h2 {
    font-family: var(--font-d);
    font-size: 24px;
    margin-bottom: 4px;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ----- FORM STYLES ----- */
.launch-form,
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: var(--accent2);
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-family: var(--font-b);
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(56, 217, 138, 0.1);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-faint);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent2);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check label {
    font-size: 13px;
    color: var(--text-muted);
}

.terms-link {
    color: var(--accent2);
    text-decoration: underline;
    transition: color var(--transition);
}

.terms-link:hover {
    color: var(--text);
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
    position: relative;
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

.btn-submit.loading .btn-loader {
    display: inline-block;
}

/* ----- SUCCESS STATE ----- */
.success-content {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent2-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 2px solid var(--accent2);
}

.success-icon i {
    font-size: 32px;
    color: var(--accent2);
}

.success-content h2 {
    font-family: var(--font-d);
    font-size: 24px;
    margin-bottom: 8px;
}

.success-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.success-details {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.success-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.success-stat i {
    color: var(--accent2);
    width: 20px;
}

/* ==========================================
   NAVIGATION (Updated for user menu)
   ========================================== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-dim);
    transition: box-shadow var(--transition);
}

.logo:hover .dot {
    box-shadow: 0 0 0 8px var(--accent-dim);
}

.logo-badge {
    font-size: 10px;
    font-weight: 600;
    background: var(--accent2-dim);
    color: var(--accent2);
    padding: 2px 10px;
    border-radius: 100px;
    border: 1px solid #21503a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a i {
    font-size: 13px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--text);
    border-radius: 4px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 16px 0 20px;
    border-top: 1px solid var(--border);
    width: 100%;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    padding: 10px 6px;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-nav a:hover {
    background: var(--surface);
    color: var(--text);
}

.mobile-nav .btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

/* ----- BUTTONS ----- */
.btn {
    font-family: var(--font-b);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s, background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn:active {
    transform: scale(0.96);
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background: var(--accent);
    color: #1a0a04;
    box-shadow: 0 4px 16px rgba(255, 90, 46, 0.3);
}

.btn-primary:hover {
    background: #ff6c44;
    box-shadow: 0 6px 24px rgba(255, 90, 46, 0.45);
    transform: translateY(-2px);
}

.btn-ghost {
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--text-faint);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

/* ==========================================
   REST OF THE STYLES (Keep from previous version)
   ========================================== */

/* ----- HERO SECTION ----- */
.hero {
    padding: 60px 0 48px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(255, 90, 46, 0.06), transparent 60%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeSlideUp 0.8s ease-out;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-m);
    font-size: 12px;
    color: var(--accent2);
    background: var(--accent2-dim);
    border: 1px solid #21503a;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
    animation: fadeSlideDown 0.6s ease-out;
}

.eyebrow .pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent2);
    animation: pulse 1.6s ease-in-out infinite, pulse-ring 2s infinite;
}

h1 {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 52px;
    line-height: 1.06;
    letter-spacing: -0.015em;
    margin-bottom: 18px;
    animation: fadeSlideUp 0.7s ease-out 0.1s both;
}

h1 em {
    font-style: normal;
    color: var(--accent);
    animation: glowPulse 3s ease-in-out infinite;
}

.hero .lede {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 28px;
    animation: fadeSlideUp 0.7s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-bottom: 36px;
    flex-wrap: wrap;
    animation: fadeSlideUp 0.7s ease-out 0.3s both;
}

.hero-stats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    animation: fadeSlideUp 0.7s ease-out 0.4s both;
}

.stat b {
    display: block;
    font-family: var(--font-m);
    font-size: 22px;
    font-weight: 500;
    transition: color var(--transition);
}

.stat:hover b {
    color: var(--accent2);
}

.stat span {
    font-size: 13px;
    color: var(--text-faint);
}

/* ----- TRAJECTORY CARD (Updated with flip) ----- */
/* ==========================================
   TRAJECTORY CARD - Graph Fix
   ========================================== */

.traj-card {
    min-height: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
}

.traj-card:hover {
    border-color: var(--accent2);
    box-shadow: 0 8px 40px rgba(56, 217, 138, 0.06);
}

.traj-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.traj-head .label {
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-m);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.traj-head .label i {
    color: var(--accent);
}

.traj-head .name {
    font-family: var(--font-d);
    font-weight: 600;
    font-size: 18px;
    margin-top: 2px;
    color: var(--text);
}

.maker-tag {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.traj-count {
    text-align: right;
}

.traj-count b {
    font-family: var(--font-m);
    font-size: 28px;
    font-weight: 500;
    color: var(--accent2);
    display: block;
    transition: color var(--transition);
}

.traj-count span {
    font-size: 11px;
    color: var(--text-faint);
}

.momentum-badge {
    font-size: 11px;
    color: var(--accent2);
    background: var(--accent2-dim);
    padding: 2px 10px;
    border-radius: 100px;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #21503a;
}

.traj-svg-wrap {
    margin-top: 12px;
    position: relative;
}

.traj-svg-wrap svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ----- Graph Colors based on Theme ----- */
.traj-line {
    stroke: var(--accent2);
    stroke-width: 2.5;
    fill: none;
    stroke-dasharray: 340;
    stroke-dashoffset: 340;
    animation: drawLine 1.6s ease-out 0.4s forwards;
}

.traj-fill {
    fill: url(#trajGrad);
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

.traj-dot {
    fill: var(--accent2);
    animation: dotPulse 1.8s ease-in-out infinite 1.6s;
}

.traj-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.traj-foot span {
    font-size: 10.5px;
    color: var(--text-faint);
    font-family: var(--font-m);
}

.traj-prediction {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
}

.traj-prediction i {
    color: var(--accent2);
}

/* ----- Animation Keyframes ----- */
@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes dotPulse {
    0%, 100% { r: 5; opacity: 1; }
    50% { r: 8; opacity: 0.6; }
}

/* ==========================================
   THEME TRANSITION FOR ALL ELEMENTS
   ========================================== */

* {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Theme transition for card */
.traj-card,
.flip-card-front,
.flip-card-back,
.stat-card,
.analytics-card,
.settings-card,
.modal-card {
    transition: background-color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}
/* ----- FILTER BAR ----- */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-b);
}

.filter-btn:hover {
    border-color: var(--text-faint);
    color: var(--text);
}

.filter-btn.active {
    background: var(--accent);
    color: #1a0a04;
    border-color: var(--accent);
}

/* ----- SECTIONS ----- */
section {
    padding: 56px 0;
}

.sec-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: wrap;
}

.sec-head h2 {
    font-family: var(--font-d);
    font-weight: 600;
    font-size: 28px;
    letter-spacing: -0.01em;
}

.sec-head p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 440px;
}

.sec-tag {
    font-family: var(--font-m);
    font-size: 11.5px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-indicator {
    font-size: 12px;
    color: var(--accent2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent2-dim);
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid #21503a;
}

.live-indicator i {
    font-size: 8px;
    animation: pulse 1.6s ease-in-out infinite;
}

/* ----- LEADERBOARD ----- */
.board {
    border-top: 1px solid var(--border);
}

.board-row {
    display: grid;
    grid-template-columns: 34px 40px 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 6px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), transform 0.2s;
    animation: fadeSlideUp 0.5s ease-out both;
    border-radius: var(--radius-sm);
}

.board-row:hover {
    background: var(--surface);
    transform: translateX(4px);
}

.rank {
    font-family: var(--font-m);
    color: var(--text-faint);
    font-size: 14px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-d);
    font-weight: 600;
    font-size: 14px;
    color: #1a0a04;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.board-row:hover .avatar {
    transform: scale(1.05) rotate(-2deg);
}

.p-name {
    font-weight: 600;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-badge {
    font-size: 9px;
    background: var(--accent2-dim);
    color: var(--accent2);
    padding: 1px 8px;
    border-radius: 100px;
    border: 1px solid #21503a;
    text-transform: uppercase;
    font-weight: 600;
}

.p-tag {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 1px;
}

.p-topics {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    font-size: 10.5px;
    color: var(--text-faint);
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 100px;
    transition: all var(--transition);
    cursor: default;
}

.chip:hover {
    border-color: var(--accent2);
    color: var(--text);
}

.vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    background: var(--surface);
    cursor: pointer;
    min-width: 54px;
    transition: border-color var(--transition), background var(--transition), transform 0.15s, box-shadow var(--transition);
}

.vote-btn:hover {
    border-color: var(--accent);
    transform: scale(1.04);
    box-shadow: 0 0 20px rgba(255, 90, 46, 0.08);
}

.vote-btn:active {
    transform: scale(0.94);
}

.vote-btn.voted {
    background: var(--accent-dim);
    border-color: var(--accent);
    box-shadow: 0 0 24px rgba(255, 90, 46, 0.15);
}

.vote-btn .arrow {
    font-size: 11px;
    color: var(--accent);
    transition: transform var(--transition);
}

.vote-btn.voted .arrow {
    transform: scale(1.2);
}

.vote-btn .n {
    font-family: var(--font-m);
    font-size: 13px;
    font-weight: 500;
}

/* ----- MAKER SPOTLIGHT ----- */
.maker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.maker-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all var(--transition);
    animation: fadeSlideUp 0.6s ease-out both;
}

.maker-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.maker-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 24px;
    color: #1a0a04;
}

.maker-name {
    font-weight: 600;
    font-size: 16px;
}

.maker-handle {
    color: var(--text-muted);
    font-size: 13px;
}

.maker-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-faint);
}

.maker-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.maker-stats i {
    color: var(--accent2);
}

/* ----- FEATURES GRID ----- */
.feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.feat {
    background: var(--bg);
    padding: 28px 24px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background var(--transition), transform 0.3s;
    animation: fadeSlideUp 0.6s ease-out both;
}

.feat:hover {
    background: var(--surface);
    transform: translateY(-4px);
}

.feat .num {
    font-family: var(--font-m);
    font-size: 12px;
    color: var(--text-faint);
}

.feat h3 {
    font-family: var(--font-d);
    font-weight: 600;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feat h3 i {
    color: var(--accent2);
    font-size: 16px;
}

.feat p {
    font-size: 13.5px;
    color: var(--text-muted);
    flex: 1;
}

.feat .badge {
    align-self: flex-start;
    font-size: 10.5px;
    font-family: var(--font-m);
    padding: 3px 10px;
    border-radius: 100px;
    margin-top: 4px;
}

.badge-new {
    background: var(--accent2-dim);
    color: var(--accent2);
    border: 1px solid #21503a;
}

.badge-popular {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid #4A2717;
}

/* ----- FLOW ----- */
.flow {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}

.flow-step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    border-radius: var(--radius-sm);
    padding-left: 6px;
    animation: slideInLeft 0.6s ease-out both;
}

.flow-step:hover {
    background: var(--surface);
    transform: translateX(6px);
}

.flow-step .fnum {
    font-family: var(--font-m);
    font-size: 20px;
    color: var(--text-faint);
    transition: color var(--transition);
}

.flow-step:hover .fnum {
    color: var(--accent2);
}

.flow-step h4 {
    font-family: var(--font-d);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-step h4 i {
    color: var(--accent2);
    font-size: 14px;
}

.flow-step p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 560px;
}

/* ----- CTA BAND ----- */
.cta-band {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    transition: border-color var(--transition), box-shadow var(--transition);
    animation: fadeSlideUp 0.7s ease-out;
}

.cta-band:hover {
    border-color: var(--accent2);
    box-shadow: 0 8px 48px rgba(56, 217, 138, 0.05);
}

.cta-band h2 {
    font-family: var(--font-d);
    font-size: 26px;
    font-weight: 600;
    max-width: 420px;
}

.cta-band p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
}

.cta-features {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.cta-features span {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cta-features i {
    color: var(--accent2);
}

.cta-sub {
    font-size: 12px !important;
    color: var(--text-faint) !important;
    margin-top: 8px !important;
}

/* ----- FOOTER ----- */
footer {
    border-top: 1px solid var(--border);
    padding: 36px 0 52px;
    margin-top: 12px;
}

.foot-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.foot-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
    max-width: 200px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}

.social-links a:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-2px);
}

.foot-cols {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.foot-col h5 {
    font-size: 13px;
    color: var(--text-faint);
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.foot-col a {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    transition: color var(--transition), transform 0.2s;
}

.foot-col a:hover {
    color: var(--text);
    transform: translateX(4px);
}

.foot-bottom {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    color: var(--text-faint);
    font-size: 12.5px;
    flex-wrap: wrap;
    gap: 10px;
}

.foot-bottom a {
    margin-left: 16px;
    transition: color var(--transition);
}

.foot-bottom a:hover {
    color: var(--text);
}

/* ----- KEYFRAMES (additional) ----- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ----- RESPONSIVE OVERRIDES ----- */
@media (max-width: 700px) {
    .user-menu {
        display: none;
    }
    
    .auth-modal .modal-front,
    .auth-modal .modal-back {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
/* ----- FORM VALIDATION ----- */
.input-error {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(255, 90, 46, 0.15) !important;
}

.input-error:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(255, 90, 46, 0.25) !important;
}

.form-error {
    color: var(--accent);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.form-error-global {
    padding: 10px 14px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 14px;
    text-align: center;
    margin-bottom: 12px;
}

.form-group .form-error {
    margin-top: 4px;
    padding: 0;
}

.password-strength {
    margin-top: 6px;
}

.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: background var(--transition);
}

.strength-bar.weak { background: #FF5A2E; width: 33%; }
.strength-bar.medium { background: #EF9F27; width: 66%; }
.strength-bar.strong { background: var(--accent2); width: 100%; }

.strength-text {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 4px;
    display: block;
}
/* ==========================================
   IMPROVED SIGN UP UI
   ========================================== */

/* ----- AUTH MODAL IMPROVEMENTS ----- */
.auth-modal .modal-card {
    min-height: 600px;
}

.auth-modal .modal-front,
.auth-modal .modal-back {
    padding: 36px 32px;
}

/* ----- FORM GROUP IMPROVEMENTS ----- */
.auth-form .form-group {
    margin-bottom: 6px;
}

.auth-form .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.auth-form .form-group label i {
    color: var(--accent2);
    font-size: 13px;
    width: 16px;
}

.auth-form .form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-b);
    font-size: 14px;
    transition: all var(--transition);
}

.auth-form .form-group input:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(56, 217, 138, 0.1);
    outline: none;
}

.auth-form .form-group input::placeholder {
    color: var(--text-faint);
}

.auth-form .form-group .form-hint {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 4px;
    display: block;
}

/* ----- PASSWORD WRAPPER ----- */
.auth-form .password-wrapper {
    position: relative;
}

.auth-form .password-wrapper input {
    padding-right: 44px;
}

.auth-form .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 4px;
    transition: all var(--transition);
    font-size: 14px;
}

.auth-form .toggle-password:hover {
    color: var(--text);
}

/* ----- PASSWORD STRENGTH ----- */
.auth-form .password-strength {
    margin-top: 8px;
}

.auth-form .strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-form .strength-bar.weak {
    background: #FF5A2E;
    width: 33%;
}

.auth-form .strength-bar.medium {
    background: #EF9F27;
    width: 66%;
}

.auth-form .strength-bar.strong {
    background: var(--accent2);
    width: 100%;
}

.auth-form .strength-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.auth-form .strength-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-faint);
}

.auth-form .strength-text.weak { color: #FF5A2E; }
.auth-form .strength-text.medium { color: #EF9F27; }
.auth-form .strength-text.strong { color: var(--accent2); }

.auth-form .strength-hint {
    font-size: 10.5px;
    color: var(--text-faint);
}

/* ----- FORM OPTIONS ----- */
.auth-form .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 4px 0 8px;
}

.auth-form .remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.auth-form .remember-me input[type="checkbox"] {
    accent-color: var(--accent2);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auth-form .forgot-link {
    color: var(--text-muted);
    transition: color var(--transition);
    font-size: 13px;
}

.auth-form .forgot-link:hover {
    color: var(--accent2);
}

/* ----- FORM CHECK (Terms) ----- */
.auth-form .form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
}

.auth-form .form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent2);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-form .form-check label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    cursor: pointer;
}

.auth-form .form-check .terms-link {
    color: var(--accent2);
    text-decoration: underline;
    transition: color var(--transition);
}

.auth-form .form-check .terms-link:hover {
    color: var(--text);
}

/* ----- SUBMIT BUTTON ----- */
.auth-form .btn-submit {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
    margin-top: 4px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.auth-form .btn-submit i {
    font-size: 15px;
}

.auth-form .btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-form .btn-submit .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

.auth-form .btn-submit.loading .btn-loader {
    display: inline-block;
}

/* ----- AUTH FOOTER ----- */
.auth-form .auth-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.auth-form .auth-switch {
    color: var(--accent2);
    font-weight: 600;
    transition: color var(--transition);
    cursor: pointer;
}

.auth-form .auth-switch:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ==========================================
   RESPONSIVE AUTH MODAL
   ========================================== */
@media (max-width: 768px) {
    .auth-modal .modal-front,
    .auth-modal .modal-back {
        padding: 24px 20px;
    }
    
    .auth-modal .modal-header h2 {
        font-size: 20px;
    }
    
    .auth-modal .modal-header p {
        font-size: 13px;
    }
    
    .auth-form .form-group label {
        font-size: 12px;
    }
    
    .auth-form .form-group input {
        font-size: 13px;
        padding: 9px 12px;
    }
    
    .auth-form .strength-hint {
        display: none;
    }
    
    .auth-form .form-options {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .auth-form .btn-submit {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .auth-modal .modal-front,
    .auth-modal .modal-back {
        padding: 20px 16px;
    }
    
    .auth-modal .modal-icon {
        width: 48px;
        height: 48px;
    }
    
    .auth-modal .modal-icon i {
        font-size: 20px;
    }
    
    .auth-modal .modal-header h2 {
        font-size: 18px;
    }
    
    .auth-form .form-group input {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .auth-form .form-check label {
        font-size: 12px;
    }
}
/* ==========================================
   FIXED SIGN UP UI STYLES
   ========================================== */

/* ----- AUTH MODAL CONTAINER ----- */
.auth-modal .modal-card {
    min-height: 600px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* ----- MODAL FACES ----- */
.auth-modal .modal-front,
.auth-modal .modal-back {
    padding: 32px 28px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
    min-height: 580px;
    display: flex;
    flex-direction: column;
}

/* ----- MODAL HEADER ----- */
.auth-modal .modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-modal .modal-header h2 {
    font-family: var(--font-d);
    font-size: 24px;
    margin-bottom: 4px;
    color: var(--text);
}

.auth-modal .modal-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ----- FORM GROUPS ----- */
.auth-modal .form-group {
    margin-bottom: 12px;
}

.auth-modal .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.auth-modal .form-group label i {
    color: var(--accent2);
    font-size: 13px;
    width: 16px;
}

.auth-modal .form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-b);
    font-size: 14px;
    transition: all var(--transition);
}

.auth-modal .form-group input:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(56, 217, 138, 0.1);
    outline: none;
}

.auth-modal .form-group input::placeholder {
    color: var(--text-faint);
}

.auth-modal .form-group .form-hint {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 4px;
    display: block;
}

/* ----- PASSWORD WRAPPER ----- */
.auth-modal .password-wrapper {
    position: relative;
}

.auth-modal .password-wrapper input {
    padding-right: 44px;
}

.auth-modal .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 4px;
    transition: all var(--transition);
    font-size: 14px;
}

.auth-modal .toggle-password:hover {
    color: var(--text);
}

/* ----- PASSWORD STRENGTH ----- */
.auth-modal .password-strength {
    margin-top: 6px;
}

.auth-modal .strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-modal .strength-bar.weak {
    background: #FF5A2E;
    width: 33%;
}

.auth-modal .strength-bar.medium {
    background: #EF9F27;
    width: 66%;
}

.auth-modal .strength-bar.strong {
    background: var(--accent2);
    width: 100%;
}

.auth-modal .strength-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.auth-modal .strength-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-faint);
}

.auth-modal .strength-text.weak { color: #FF5A2E; }
.auth-modal .strength-text.medium { color: #EF9F27; }
.auth-modal .strength-text.strong { color: var(--accent2); }

.auth-modal .strength-hint {
    font-size: 10.5px;
    color: var(--text-faint);
}

/* ----- FORM OPTIONS ----- */
.auth-modal .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin: 4px 0 8px;
}

.auth-modal .remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.auth-modal .remember-me input[type="checkbox"] {
    accent-color: var(--accent2);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auth-modal .forgot-link {
    color: var(--text-muted);
    transition: color var(--transition);
    font-size: 13px;
}

.auth-modal .forgot-link:hover {
    color: var(--accent2);
}

/* ----- FORM CHECK (Terms) ----- */
.auth-modal .form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    margin: 4px 0;
}

.auth-modal .form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent2);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-modal .form-check label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    cursor: pointer;
}

.auth-modal .form-check .terms-link {
    color: var(--accent2);
    text-decoration: underline;
    transition: color var(--transition);
}

.auth-modal .form-check .terms-link:hover {
    color: var(--text);
}

/* ----- SUBMIT BUTTON ----- */
.auth-modal .btn-submit {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.auth-modal .btn-submit i {
    font-size: 15px;
}

.auth-modal .btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-modal .btn-submit .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

.auth-modal .btn-submit.loading .btn-loader {
    display: inline-block;
}

/* ----- AUTH FOOTER ----- */
.auth-modal .auth-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.auth-modal .auth-switch {
    color: var(--accent2);
    font-weight: 600;
    transition: color var(--transition);
    cursor: pointer;
}

.auth-modal .auth-switch:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ==========================================
   FIXED MODAL OVERLAY
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(11, 15, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    perspective: 1000px;
}

/* ----- MODAL CARD ----- */
.modal-card {
    position: relative;
    width: 100%;
    min-height: 500px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.modal-card.flipped {
    transform: rotateY(180deg);
}

.modal-face {
    position: absolute;
    width: 100%;
    min-height: 500px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.modal-front {
    z-index: 2;
}

.modal-back {
    transform: rotateY(180deg);
}

/* ----- MODAL CLOSE ----- */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    z-index: 10;
}

.modal-close:hover {
    color: var(--text);
    background: var(--surface-2);
}

/* ----- MODAL ICON ----- */
.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 1px solid var(--accent);
}

.modal-icon i {
    font-size: 24px;
    color: var(--accent);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .auth-modal .modal-front,
    .auth-modal .modal-back {
        padding: 24px 20px;
        min-height: 500px;
    }
    
    .auth-modal .modal-header h2 {
        font-size: 20px;
    }
    
    .auth-modal .modal-header p {
        font-size: 13px;
    }
    
    .auth-modal .form-group label {
        font-size: 12px;
    }
    
    .auth-modal .form-group input {
        font-size: 13px;
        padding: 9px 12px;
    }
    
    .auth-modal .strength-hint {
        display: none;
    }
    
    .auth-modal .form-options {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .auth-modal .btn-submit {
        font-size: 14px;
        padding: 10px;
    }
    
    .modal-container {
        max-width: 100%;
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .auth-modal .modal-front,
    .auth-modal .modal-back {
        padding: 20px 16px;
        min-height: 460px;
    }
    
    .auth-modal .modal-icon {
        width: 48px;
        height: 48px;
    }
    
    .auth-modal .modal-icon i {
        font-size: 20px;
    }
    
    .auth-modal .modal-header h2 {
        font-size: 18px;
    }
    
    .auth-modal .form-group input {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .auth-modal .form-check label {
        font-size: 12px;
    }
    
    .auth-modal .auth-footer {
        font-size: 13px;
    }
}
/* ========================================
   STYLE.CSS - Main Styles
   ======================================== */

/* ----- THEME VARIABLES ----- */
:root {
    /* Dark Theme (Default) */
    --bg: #0B0F1A;
    --surface: #121826;
    --surface-2: #1A2233;
    --border: #262F44;
    --accent: #FF5A2E;
    --accent-dim: #4A2717;
    --accent2: #38D98A;
    --accent2-dim: #173626;
    --text: #F4F1E9;
    --text-muted: #8C93A8;
    --text-faint: #5B6377;
    --font-d: 'Space Grotesk', sans-serif;
    --font-b: 'Inter', sans-serif;
    --font-m: 'JetBrains Mono', monospace;
    --shadow-glow: 0 8px 32px rgba(255, 90, 46, 0.15);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] {
    --bg: #F0F2F5;
    --surface: #FFFFFF;
    --surface-2: #E8EAED;
    --border: #D1D5DB;
    --text: #1A1A2E;
    --text-muted: #4A4A6A;
    --text-faint: #8A8AA8;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ----- RESET & BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-b);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse 900px 500px at 15% -5%, rgba(255, 90, 46, 0.10), transparent 60%),
        radial-gradient(ellipse 700px 500px at 90% 10%, rgba(56, 217, 138, 0.06), transparent 55%);
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

[data-theme="light"] body {
    background-image:
        radial-gradient(ellipse 900px 500px at 15% -5%, rgba(255, 90, 46, 0.06), transparent 60%),
        radial-gradient(ellipse 700px 500px at 90% 10%, rgba(56, 217, 138, 0.04), transparent 55%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

::selection {
    background: var(--accent);
    color: #1a0a04;
}

:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ----- SCROLLBAR ----- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}

/* ==========================================
   AUTH / USER MENU
   ========================================== */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent2-dim);
    border: 2px solid var(--accent2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent2);
    transition: all var(--transition);
}

.user-avatar:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 12px 16px;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.dropdown-name {
    font-weight: 600;
    font-size: 14px;
}

.dropdown-email {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 14px;
    transition: all var(--transition);
}

.user-dropdown a:hover {
    background: var(--surface-2);
    color: var(--text);
}

.user-dropdown a i {
    width: 18px;
    font-size: 14px;
}

/* ==========================================
   THEME TOGGLE & NOTIFICATIONS
   ========================================== */

.header-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 6px 8px;
    transition: all var(--transition);
    border-radius: var(--radius-sm);
    position: relative;
}

.header-btn:hover {
    color: var(--text);
    background: var(--surface-2);
}

.theme-toggle {
    font-size: 18px;
}

.theme-toggle:hover i {
    transform: rotate(30deg);
}

.notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.6s ease-in-out infinite;
}

/* ==========================================
   NOTIFICATION MODAL
   ========================================== */

.notification-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(4px);
}

.notification-overlay.active {
    display: block;
}

.notification-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.notification-modal.open {
    right: 0;
}

.notification-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.notification-modal-header h3 {
    font-family: var(--font-d);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-modal-header h3 i {
    color: var(--accent2);
}

.notification-modal-header .close-notif {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.notification-modal-header .close-notif:hover {
    color: var(--text);
}

.notification-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--surface-2);
}

.notification-item.unread {
    border-left: 3px solid var(--accent);
}

.notification-item .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.notification-item .notif-icon.success {
    background: var(--accent2-dim);
    color: var(--accent2);
}

.notification-item .notif-icon.info {
    background: var(--surface-2);
    color: var(--text-muted);
}

.notification-item .notif-icon.error {
    background: var(--accent-dim);
    color: var(--accent);
}

.notification-item .notif-content {
    flex: 1;
}

.notification-item .notif-title {
    font-weight: 600;
    font-size: 14px;
}

.notification-item .notif-message {
    font-size: 13px;
    color: var(--text-muted);
}

.notification-item .notif-time {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 2px;
}

.notification-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.notification-empty i {
    font-size: 48px;
    color: var(--text-faint);
    display: block;
    margin-bottom: 12px;
}

/* ----- REST OF THE STYLES (Keep from your existing style.css) ----- */
/* ... all your existing styles for hero, leaderboard, features, etc. ... */

/* ==========================================
   HEADER NAVIGATION (Updated)
   ========================================== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.92);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ----- KEYFRAMES ----- */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(0.92);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================
   RESPONSIVE OVERRIDES
   ========================================== */
@media (max-width: 700px) {
    .user-menu {
        display: none;
    }
    
    .auth-modal .modal-front,
    .auth-modal .modal-back {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .notification-modal {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .notification-modal {
        width: 100%;
        right: -100%;
    }
}