/* ═══════════════════════════════════════════════════════════
   LITECOIN HORIZON — MASTER STYLESHEET
   ═══════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
    --bg-page: #e6e8eb;
    --bg-window: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-light: #f3f4f6;
    --blue-primary: #1d4ed8;
    --cyan-primary: #06b6d4;
    --shadow-window: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.theme-dark {
    --bg-page: #0f172a;
    --bg-window: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: #334155;
    --blue-primary: #3b82f6;
    --cyan-primary: #22d3ee;
}
.theme-dark .comic-card,
.theme-dark .video-archive-card,
.theme-dark .donate-card { background: #1e293b; }
.theme-dark .comic-page-canvas { background: #0f172a; }

/* ─── Base Reset ──────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, sans-serif; }
body { background-color: var(--bg-page); color: var(--text-main); min-height: 100vh; padding: 2rem; display: flex; justify-content: center; }
a { text-decoration: none; color: inherit; }

/* ─── App Window ──────────────────────────────────────────── */
.app-window {
    background: var(--bg-window);
    width: 100%; max-width: 1300px;
    border-radius: 12px;
    box-shadow: var(--shadow-window);
    overflow: hidden;
    display: flex; flex-direction: column;
}

/* ─── Header ──────────────────────────────────────────────── */
.app-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; border-radius: 50%; }
.logo-symbol {
    width: 36px; height: 36px; border-radius: 50%;
    background: #000; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.2rem;
}
.theme-dark .logo-symbol { background: #fff; color: #000; }
.logo-text { font-size: 1.1rem; font-weight: 800; line-height: 1; letter-spacing: -0.5px; }

.app-nav { display: flex; gap: 2rem; font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.app-nav a:hover, .app-nav a.active { color: var(--blue-primary); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    font-size: 1.5rem; color: var(--text-main);
    padding: 4px 8px; border-radius: 6px;
    line-height: 1;
}
.nav-toggle:hover { background: var(--border-light); }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn-primary {
    background: var(--blue-primary); color: white; padding: 8px 16px;
    border-radius: 6px; font-weight: 600; font-size: 0.9rem;
    transition: 0.2s; border: none; cursor: pointer;
}
.btn-primary:hover { opacity: 0.9; }

/* ─── Dashboard 2-Column Layout ──────────────────────────── */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 3rem;
    padding: 3rem 2.5rem;
}

/* ─── Comic Grid (Left Column) ────────────────────────────── */
.page-title { font-size: 2.5rem; font-weight: 900; letter-spacing: -1px; text-transform: uppercase; margin-bottom: 0.5rem; }
.page-subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }

.comic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.comic-card {
    border: 1px solid var(--border-light); border-radius: 12px; padding: 0.75rem;
    transition: 0.2s; background: #ffffff;
}
.comic-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }

.comic-cover {
    border-radius: 8px; overflow: hidden; aspect-ratio: 2 / 3; background: #0f172a;
    display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.cover-placeholder { color: white; font-weight: 800; font-size: 1rem; text-align: center; }

.comic-card-title { font-size: 0.95rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.2rem; }
.comic-creator { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.4rem; }

.btn-read {
    display: block; width: 100%; text-align: center;
    background: #06b6d4; color: white; border-radius: 4px; padding: 8px 0;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    min-height: 44px; display: flex; align-items: center; justify-content: center;
}
.btn-read:hover { background: #0891b2; }

/* ─── Sidebar (Right Column) ──────────────────────────────── */
.sidebar-title {
    font-size: 1.1rem; font-weight: 800; text-transform: uppercase;
    margin-bottom: 1.5rem; letter-spacing: -0.5px;
}
.sidebar-section { margin-bottom: 2.5rem; }

.view-all-link { display: block; font-size: 0.8rem; font-weight: 800; color: var(--blue-primary); margin-bottom: 3rem; text-transform: uppercase; }

/* ─── Donate Cards ────────────────────────────────────────── */
.donate-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.donate-card {
    flex: 1; min-width: 200px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    display: flex; flex-direction: column;
    color: #f8fafc;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}
.donate-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 100%;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.15), transparent 70%);
    pointer-events: none;
}
.donate-card:last-child::before {
    background: radial-gradient(circle at top right, rgba(247, 147, 26, 0.15), transparent 70%);
}
.donate-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    border-color: #475569;
}
.donate-header { display: flex; align-items: center; gap: 15px; margin-bottom: 1.25rem; z-index: 1; }
.donate-icon {
    width: 38px; height: 38px; border-radius: 50%; background: #06b6d4; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.3rem;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4); flex-shrink: 0;
}
.donate-header-text { z-index: 1; }
.donate-header-text h4 { font-size: 1.1rem; font-weight: 900; line-height: 1.1; letter-spacing: 0.05em; color: #fff; }
.donate-header-text span { font-size: 0.8rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; }

.donate-desc { padding: 0 0 1rem; font-size: 0.85rem; color: #94a3b8; line-height: 1.5; z-index: 1; }
.donate-inputs { z-index: 1; }

.btn-donate {
    border: none; border-radius: 8px; padding: 14px 0;
    font-weight: 800; font-size: 0.95rem; cursor: pointer;
    color: white; display: block; width: 100%;
    transition: all 0.2s; z-index: 1;
    min-height: 44px;
}
.cyan-btn { background: #06b6d4; }
.cyan-btn:hover { background: #0891b2; }
.blue-btn { background: var(--blue-primary); }
.blue-btn:hover { background: #1e3a8a; }

/* ─── Video Archive (videos.php) ──────────────────────────── */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.video-archive-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-date-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

/* ─── Footer ──────────────────────────────────────────────── */
.app-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5rem 2.5rem; border-top: 1px solid var(--border-light);
    font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
}
.footer-left a { margin-left: 10px; }
.footer-socials { display: flex; gap: 15px; font-weight: 800; color: var(--text-main); font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤1024px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }
    .donate-grid { flex-direction: row; }
    .comic-grid { grid-template-columns: repeat(3, 1fr); }
    .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤768px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Full-bleed on mobile — no padding, no rounded window */
    body { padding: 0; }
    .app-window { border-radius: 0; max-width: 100%; }

    /* Header: logo row + hamburger, nav collapses below */
    .app-header {
        flex-wrap: wrap;
        padding: 1rem 1.25rem;
        gap: 0;
    }
    .logo { flex: 1; }
    .header-actions { order: 2; }
    .nav-toggle { display: flex; order: 3; margin-left: 0.5rem; }

    /* Nav collapses by default, opens with .nav-open */
    .app-nav {
        display: none;
        width: 100%;
        order: 4;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--border-light);
        padding: 0.5rem 0;
        margin-top: 0.75rem;
    }
    .app-nav.nav-open { display: flex; }
    .app-nav a {
        padding: 0.85rem 0;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-light);
        min-height: 44px;
        display: flex; align-items: center;
    }
    .app-nav a:last-child { border-bottom: none; }

    /* Dashboard */
    .dashboard-layout { padding: 1.5rem 1rem; gap: 1.5rem; }
    .page-title { font-size: 1.75rem; }
    .page-subtitle { font-size: 0.95rem; }

    /* Comics grid */
    .comic-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

    /* Donate cards */
    .donate-grid { flex-direction: column; }
    .donate-card { min-width: unset; }

    /* Archive grid */
    .archive-grid { grid-template-columns: 1fr; gap: 20px; }

    /* Footer */
    .app-footer {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 1.25rem 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤480px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .comic-grid { grid-template-columns: 1fr; }
    .dashboard-layout { padding: 1rem; }
}
