:root {
    --bg-dark: #07090e;
    --bg-card: #10141f;
    --neon-cyan: #00f0ff;
    --neon-purple: #a855f7;
    --neon-red: #ff2a54;
    --neon-gold: #f59e0b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-image: radial-gradient(circle at 50% 0%, #1a103c 0%, #07090e 65%);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(7, 9, 14, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding: 1rem 5%;
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem; font-weight: 900;
    letter-spacing: 3px; color: #fff;
    text-shadow: 0 0 12px var(--neon-red);
    text-decoration: none;
}
nav { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
nav a {
    color: var(--text-main); text-decoration: none;
    font-size: 0.9rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    transition: color 0.2s;
}
nav a:hover, nav a.active { color: var(--neon-cyan); text-shadow: 0 0 8px rgba(0,240,255,0.4); }

.hud-badge {
    display: inline-block;
    border: 1px solid var(--neon-red);
    background: rgba(255, 42, 84, 0.12);
    color: #ff6b88;
    font-family: 'Orbitron', sans-serif;
    padding: 6px 14px; font-size: 0.8rem;
    border-radius: 4px; margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(255, 42, 84, 0.25);
}

.hero {
    padding: 4.5rem 5% 3.5rem;
    max-width: 1300px; margin: 0 auto;
    display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center;
}
.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem; line-height: 1.15; margin-bottom: 1.2rem;
    background: linear-gradient(90deg, #00f0ff, #fff, #a855f7);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.8rem; }

.btn {
    display: inline-block; padding: 11px 22px;
    font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 0.85rem;
    text-decoration: none; border-radius: 4px; cursor: pointer;
    transition: all 0.25s; border: none;
}
.btn-primary {
    background: var(--neon-cyan); color: #000;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}
.btn-primary:hover { background: #fff; box-shadow: 0 0 25px var(--neon-cyan); }
.btn-outline {
    border: 1px solid var(--neon-purple); color: #fff;
    background: rgba(168, 85, 247, 0.15);
}
.btn-outline:hover { background: var(--neon-purple); }
.btn-coffee {
    background: var(--neon-gold); color: #000;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}
.btn-coffee:hover { background: #fbbf24; transform: translateY(-2px); }

.hero-covers { display: flex; gap: 1.2rem; justify-content: center; }
.hero-covers img {
    width: 48%; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.85), 0 0 15px rgba(0, 240, 255, 0.2);
    transition: transform 0.3s;
}
.hero-covers img:hover { transform: translateY(-6px) scale(1.02); }

section { padding: 3.5rem 5%; max-width: 1300px; margin: 0 auto; width: 100%; }
.section-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.section-title {
    font-family: 'Orbitron', sans-serif; font-size: 1.8rem;
    color: #fff; border-left: 4px solid var(--neon-cyan); padding-left: 15px;
}
.section-sub { color: var(--text-muted); padding-left: 19px; font-size: 0.95rem; margin-top: 0.3rem; }

/* Grid Layouts */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 2rem; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(0, 240, 255, 0.4); }
.card-img { width: 100%; height: 320px; object-fit: cover; object-position: top; }
.book-img { height: 430px; object-position: center; }
.card-body { padding: 1.4rem; display: flex; flex-direction: column; flex-grow: 1; }
.tag { font-size: 0.72rem; font-family: 'Orbitron', sans-serif; color: var(--neon-cyan); text-transform: uppercase; margin-bottom: 0.4rem; }
.card h3 { font-family: 'Orbitron', sans-serif; font-size: 1.25rem; margin-bottom: 0.6rem; color: #fff; }
.card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1.2rem; flex-grow: 1; }

/* Language Badges for Books */
.lang-bar { display: flex; gap: 6px; margin-bottom: 1rem; flex-wrap: wrap; }
.lang-badge {
    font-size: 0.7rem; font-family: 'Orbitron', sans-serif;
    padding: 3px 8px; border-radius: 3px;
    background: rgba(255,255,255,0.06); color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}
.lang-badge.active {
    background: rgba(0, 240, 255, 0.15); color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

/* Filter Controls (for Wiki & Gallery) */
.controls-bar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
    background: var(--bg-card); padding: 1rem 1.4rem; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
}
.filter-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.filter-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main); padding: 7px 14px; border-radius: 4px;
    font-family: 'Orbitron', sans-serif; font-size: 0.75rem; cursor: pointer;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--neon-purple); border-color: var(--neon-purple); color: #fff;
}
.search-input {
    padding: 8px 14px; border-radius: 4px;
    border: 1px solid rgba(0,240,255,0.3); background: #07090e;
    color: #fff; min-width: 240px;
}

/* Subscribe & Coffee Box */
.sub-box {
    background: linear-gradient(135deg, rgba(16,20,31,0.95), rgba(32,17,54,0.9));
    border: 1px solid var(--neon-cyan); border-radius: 12px;
    padding: 2.8rem; text-align: center;
}
.sub-form { display: flex; max-width: 500px; margin: 1.5rem auto 0; gap: 0.8rem; }
.sub-form input {
    flex: 1; padding: 12px 16px; border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2); background: #07090e; color: #fff;
}

/* Lightbox Modal */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.92); align-items: center; justify-content: center;
    padding: 2rem; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 80vh; border-radius: 8px; border: 1px solid var(--neon-cyan); }
.lightbox p { margin-top: 1rem; color: #fff; font-size: 1.05rem; text-align: center; max-width: 700px; }

footer {
    margin-top: auto; text-align: center; padding: 2.5rem 5%;
    color: var(--text-muted); border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.88rem;
}

@media (max-width: 850px) {
    .hero { grid-template-columns: 1fr; text-align: center; }
    .grid-2 { grid-template-columns: 1fr; }
    .sub-form { flex-direction: column; }
}