/* ============================================
   GSD NAVIGATOR V2 - UNIFIED DESIGN SYSTEM
   Fixes A3: Single CSS variables + resets
   Fixes C8: Consistent design across ALL pages
   ============================================ */

:root {
    /* Brand colors - ONE green, everywhere */
    --m: #00ff41;
    --md: #00cc33;
    --ms: #003300;
    --mb: #0a0a0a;
    --mc: #111;
    --mt: #0d0d0d;

    /* Text */
    --txt: #c0c0c0;
    --dim: #888;
    --dim2: #666;
    --dim3: #444;

    /* Status */
    --warn: #ff6600;
    --err: #ff3333;
    --ok: #00ff41;
    --info: #00bfff;

    /* ADHD mode */
    --adh: #a78bfa;
    --adhd: #8b5cf6;
    --adhbg: #1a1625;

    /* Spacing + Shape */
    --rad: 2px;
    --sp: 12px;
    --safe-area-bottom: env(safe-area-inset-bottom);

    /* Typography - monospace everywhere (the brand identity) */
    --font: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 13px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--mb);
    color: var(--txt);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--m); text-decoration: none; }
a:hover { color: #fff; }

::selection { background: rgba(0, 255, 65, .25); color: #fff; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--ms); }
::-webkit-scrollbar-thumb { background: var(--md); }

/* ── Shared Components ── */

/* Buttons */
.btn {
    padding: 12px 16px;
    min-height: 44px;
    background: transparent;
    border: 1px solid var(--m);
    color: var(--m);
    cursor: pointer;
    font-family: var(--font);
    font-size: .75rem;
    letter-spacing: 1px;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn:hover { background: var(--m); color: #000; }
.btn:disabled { opacity: .3; cursor: not-allowed; }
.btn-fill { background: var(--m); color: #000; }
.btn-fill:hover { background: var(--md); }

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--m);
    color: #000;
    border: none;
    border-radius: var(--rad);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: transparent;
    color: var(--dim);
    border: 1px solid #222;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: var(--rad);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}
.btn-secondary:hover { border-color: var(--dim); color: var(--txt); }

.btn-danger {
    background: transparent;
    color: var(--err);
    border: 1px solid var(--err);
    padding: 0.875rem 1.5rem;
    border-radius: var(--rad);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}
.btn-danger:hover { background: var(--err); color: #fff; }

.btn-google {
    width: 100%;
    padding: 0.875rem;
    background: var(--mb);
    border: 1px solid #222;
    border-radius: var(--rad);
    color: var(--txt);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-family: var(--font);
}
.btn-google:hover { border-color: var(--dim); background: #1a1a1a; }
.btn-google svg { width: 18px; height: 18px; }

/* CTA - marketing pages */
.cta {
    display: inline-block;
    padding: 16px 44px;
    font-family: var(--font);
    font-size: .85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: var(--m);
    color: #000;
    border: none;
    cursor: pointer;
    transition: all .3s;
    font-weight: 800;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
    transition: left .5s ease;
}
.cta:hover {
    background: var(--md);
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0,255,65,.5), 0 0 80px rgba(0,255,65,.15);
    color: #000;
}
.cta:hover::before { left: 100%; }

/* Cards */
.card {
    background: var(--mc);
    border: 1px solid #222;
    border-radius: var(--rad);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.card-title {
    font-size: 0.75rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.75rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--mb);
    border: 1px solid #222;
    border-radius: var(--rad);
    color: var(--txt);
    font-size: 1rem;
    font-family: var(--font);
    transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--m); }
.form-input::placeholder { color: var(--dim2); }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--rad);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}
.alert.show { display: block; }
.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--err);
    color: var(--err);
}
.alert-success {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--m);
    color: var(--m);
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.badge-free { background: #333; color: var(--dim); }
.badge-premium { background: var(--m); color: #000; }

/* Feature list (reusable) */
.features-list {
    list-style: none;
    margin-bottom: 1.5rem;
    padding: 0;
}
.features-list li {
    padding: 0.5rem 0;
    color: var(--dim);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.features-list li::before {
    content: '>';
    color: var(--m);
    font-weight: bold;
}

/* Pricing */
.price-tag .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--m);
}
.price-tag .period {
    color: var(--dim2);
    font-size: 0.9rem;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Loading skeleton (fixes C2) */
.skeleton-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--mb);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
.skeleton-screen.loaded {
    opacity: 0;
    pointer-events: none;
}
.skeleton-logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--m);
    letter-spacing: 4px;
    margin-bottom: 1rem;
}
.skeleton-bar {
    width: 200px;
    height: 3px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
}
.skeleton-bar-fill {
    height: 100%;
    background: var(--m);
    animation: skeletonLoad 1.5s ease-in-out infinite;
    width: 0%;
}
@keyframes skeletonLoad {
    0% { width: 0%; margin-left: 0; }
    50% { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--rad);
    font-size: 0.85rem;
    font-family: var(--font);
    z-index: 99999;
    transition: bottom 0.3s ease;
    border: 1px solid;
}
.toast.show { bottom: 24px; }
.toast.success { background: var(--mc); color: var(--m); border-color: var(--m); }
.toast.error { background: var(--mc); color: var(--err); border-color: var(--err); }

/* Responsive */
@media (max-width: 768px) {
    html { font-size: 12px; }
}
@media (max-width: 480px) {
    html { font-size: 11px; }
}

/* Hidden utility */
.hidden { display: none !important; }
