/* ============================
   common.css - Design System (Mobile-First, Gold/Amber Dark Theme)
   ============================ */

:root {
    /* Slate dark palette */
    --bg-dark: #020617;
    --bg-surface: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Gold / Amber accents */
    --accent-gold: #f59e0b;
    --accent-amber: #fbbf24;
    --accent-amber-dim: rgba(251, 191, 36, 0.15);
    --accent-amber-border: rgba(251, 191, 36, 0.3);
    --accent-amber-glow: rgba(251, 191, 36, 0.4);

    /* Functional colors (kept for backward compat) */
    --accent-blue: #60a5fa;
    --accent-red: #f87171;
    --accent-green: #4ade80;
    --accent-purple: #a78bfa;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-card: linear-gradient(135deg, rgba(251,191,36,0.08) 0%, rgba(15,23,42,0.8) 100%);
}

* { box-sizing: border-box; }

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

/* Subtle radial gradient background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(251,191,36,0.06) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(96,165,250,0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Navbar */
.navbar {
    background: rgba(2, 6, 23, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    color: var(--text-primary) !important;
}

.navbar-brand i {
    color: var(--accent-gold);
}

.nav-user-chip {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-user-chip:hover {
    background: rgba(255,255,255,0.12);
}

/* Buttons */
.btn { border-radius: 10px; font-weight: 600; transition: all 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }

/* Toast */
.toast {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}

/* Form controls for dark theme */
.form-control, .form-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    border-radius: 10px;
}

.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--accent-gold);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(245,158,11,0.15);
}

.form-select option { background: #1e293b; color: var(--text-primary); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== Share Modal ===== */
.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}
.share-modal {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
}
.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-weight: 700;
    font-size: 0.9rem;
}
.share-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
}
.share-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.share-btn:hover { transform: translateY(-1px); }
.share-reddit {
    background: #ff4500;
    color: #fff;
}
.share-reddit:hover { background: #e03d00; color: #fff; }
.share-copy {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-primary);
}
.share-copy:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

/* ===== PWA Install Banner ===== */
.pwa-install-banner {
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    z-index: 85;
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(245,158,11,0.3);
    padding: 10px 16px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}
.pwa-install-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 400px;
    margin: 0 auto;
    gap: 10px;
}
.pwa-banner-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}
.pwa-banner-btn {
    background: var(--accent-gold);
    color: #0f172a;
    border: none;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.pwa-banner-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 2px;
}
