/* ============================================
   LivroManiaJA — Design System
   Theme: Cyberpunk Neon Futurista
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-input: #16162a;
    --text-primary: #f0f0f5;
    --text-secondary: #8888aa;
    --text-muted: #555570;
    --neon-cyan: #00f0ff;
    --neon-orange: #ff6b00;
    --neon-gold: #ffd700;
    --neon-green: #00ff88;
    --danger: #ff3355;
    --success: #00ff88;
    --warning: #ffd700;
    --border-color: #2a2a44;
    --border-glow: rgba(0, 240, 255, 0.3);
    --shadow-neon: 0 0 20px rgba(0, 240, 255, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--neon-cyan); border-radius: 3px; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.75rem); }

a { color: var(--neon-cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--neon-orange); }

img { max-width: 100%; height: auto; display: block; }

/* Container */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; font-family: var(--font-heading); font-size: 0.95rem;
    font-weight: 600; border: 2px solid transparent; border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition); text-decoration: none;
    position: relative; overflow: hidden; letter-spacing: 0.5px;
}
.btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    transform: translateX(-100%); transition: 0.6s;
}
.btn:hover::before { transform: translateX(100%); }

.btn--primary {
    background: linear-gradient(135deg, var(--neon-cyan), #0088aa);
    color: var(--bg-primary); border-color: var(--neon-cyan);
}
.btn--primary:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}
.btn--secondary {
    background: transparent; color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}
.btn--secondary:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}
.btn--orange {
    background: linear-gradient(135deg, var(--neon-orange), #cc5500);
    color: #fff; border-color: var(--neon-orange);
}
.btn--orange:hover {
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.4);
    transform: translateY(-2px);
}
.btn--danger {
    background: var(--danger); color: #fff; border-color: var(--danger);
}
.btn--sm { padding: 8px 16px; font-size: 0.8rem; }
.btn--lg { padding: 16px 40px; font-size: 1.1rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Cards */
.card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 24px;
    transition: var(--transition); position: relative;
}
.card:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-neon);
    transform: translateY(-4px);
}
.card--glow { border-color: var(--neon-cyan); box-shadow: var(--shadow-neon); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 0.85rem; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 6px;
    font-family: var(--font-heading);
}
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 12px 16px; background: var(--bg-input);
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: var(--font-body);
    font-size: 0.95rem; transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 4px; }

/* Flash Messages */
.flash {
    padding: 14px 20px; border-radius: var(--radius-md); margin-bottom: 20px;
    font-size: 0.9rem; animation: slideDown 0.3s ease;
}
.flash--success { background: rgba(0,255,136,0.1); border: 1px solid var(--success); color: var(--success); }
.flash--error { background: rgba(255,51,85,0.1); border: 1px solid var(--danger); color: var(--danger); }
.flash--warning { background: rgba(255,215,0,0.1); border: 1px solid var(--warning); color: var(--warning); }
.flash--info { background: rgba(0,240,255,0.1); border: 1px solid var(--neon-cyan); color: var(--neon-cyan); }

/* Grid */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Nav */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 10, 15, 0.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px; height: 64px;
}
.nav__inner {
    max-width: var(--max-width); margin: 0 auto; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
    font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-orange));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav__links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav__links a {
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
    transition: var(--transition); padding: 8px 0;
    border-bottom: 2px solid transparent;
}
.nav__links a:hover, .nav__links a.active {
    color: var(--neon-cyan); border-bottom-color: var(--neon-cyan);
}
.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__hamburger {
    display: none; background: none; border: none; color: var(--text-primary);
    font-size: 1.5rem; cursor: pointer;
}

/* Mobile Nav */
@media (max-width: 768px) {
    .nav__hamburger { display: block; }
    .nav__links {
        display: none; position: absolute; top: 64px; left: 0; right: 0;
        background: var(--bg-secondary); flex-direction: column;
        padding: 20px; gap: 12px; border-bottom: 1px solid var(--border-color);
    }
    .nav__links.open { display: flex; }
    .nav__actions { display: none; }
    .nav__actions.open { display: flex; position: absolute; top: 64px; right: 20px; }
}

/* Hero */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    position: relative; overflow: hidden; padding-top: 64px;
}
.hero__bg {
    position: absolute; inset: 0; z-index: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(0,240,255,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(255,107,0,0.06) 0%, transparent 50%),
                var(--bg-primary);
}
.hero__content { position: relative; z-index: 1; max-width: 700px; }
.hero__badge {
    display: inline-block; padding: 6px 16px; font-size: 0.75rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
    border: 1px solid var(--neon-cyan); color: var(--neon-cyan);
    border-radius: var(--radius-sm); margin-bottom: 24px;
}
.hero__title {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--neon-cyan) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero__desc { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.8; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__stats {
    display: flex; gap: 48px; margin-top: 56px; padding-top: 32px;
    border-top: 1px solid var(--border-color);
}
.hero__stat-num {
    font-family: var(--font-heading); font-size: 2rem; font-weight: 700;
    color: var(--neon-cyan);
}
.hero__stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* Sections */
.section { padding: 80px 0; }
.section__header { text-align: center; margin-bottom: 48px; }
.section__subtitle {
    color: var(--neon-orange); font-size: 0.85rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px;
}

/* Book Card */
.book-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: var(--transition); cursor: pointer;
}
.book-card:hover {
    border-color: var(--neon-cyan); transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 240, 255, 0.12);
}
.book-card__cover {
    height: 280px; overflow: hidden; position: relative;
    background: var(--bg-secondary);
}
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__badge {
    position: absolute; top: 12px; right: 12px; padding: 4px 10px;
    font-size: 0.7rem; font-weight: 600; border-radius: var(--radius-sm);
    background: var(--neon-orange); color: #fff;
}
.book-card__body { padding: 16px; }
.book-card__title {
    font-family: var(--font-heading); font-size: 1rem; font-weight: 600;
    margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.book-card__author { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.book-card__meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.75rem; color: var(--text-secondary);
}
.book-card__category {
    padding: 2px 8px; background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2); border-radius: var(--radius-sm);
    color: var(--neon-cyan); font-size: 0.7rem;
}

/* Plan Cards */
.plan-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 32px; text-align: center;
    transition: var(--transition); position: relative;
}
.plan-card:hover { border-color: var(--neon-cyan); box-shadow: var(--shadow-neon); }
.plan-card--featured {
    border-color: var(--neon-orange);
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.15);
}
.plan-card__badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    padding: 4px 16px; background: var(--neon-orange); color: #fff;
    font-size: 0.75rem; font-weight: 600; border-radius: var(--radius-sm);
}
.plan-card__name { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 16px; }
.plan-card__price {
    font-family: var(--font-heading); font-size: 3rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 4px;
}
.plan-card__price span { font-size: 1rem; color: var(--text-muted); }
.plan-card__original {
    text-decoration: line-through; color: var(--text-muted);
    font-size: 0.9rem; margin-bottom: 20px;
}
.plan-card__features { list-style: none; text-align: left; margin: 24px 0; }
.plan-card__features li {
    padding: 8px 0; font-size: 0.9rem; color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.plan-card__features li::before { content: '✓ '; color: var(--neon-green); font-weight: 700; }

/* Category Chips */
.categories { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 0; }
.category-chip {
    padding: 8px 18px; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 0.85rem;
    color: var(--text-secondary); cursor: pointer;
    transition: var(--transition); display: flex; align-items: center; gap: 6px;
}
.category-chip:hover, .category-chip.active {
    border-color: var(--neon-cyan); color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
}

/* Footer */
.footer {
    background: var(--bg-secondary); border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer__brand { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; color: var(--neon-cyan); margin-bottom: 12px; }
.footer__desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.footer__title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; }
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 8px; }
.footer__links a { color: var(--text-muted); font-size: 0.85rem; }
.footer__links a:hover { color: var(--neon-cyan); }
.footer__bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--border-color); font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 768px) {
    .footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .hero__stats { flex-direction: column; gap: 20px; }
    .hero__actions { flex-direction: column; }
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination__btn {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-secondary);
    font-size: 0.85rem; cursor: pointer; transition: var(--transition);
}
.pagination__btn:hover, .pagination__btn.active {
    border-color: var(--neon-cyan); color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
}

/* Badges / Tags */
.badge {
    display: inline-block; padding: 3px 10px; font-size: 0.7rem;
    font-weight: 600; border-radius: var(--radius-sm); text-transform: uppercase;
}
.badge--success { background: rgba(0,255,136,0.15); color: var(--success); }
.badge--danger { background: rgba(255,51,85,0.15); color: var(--danger); }
.badge--warning { background: rgba(255,215,0,0.15); color: var(--warning); }
.badge--info { background: rgba(0,240,255,0.15); color: var(--neon-cyan); }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.data-table th {
    text-align: left; padding: 12px 16px; background: var(--bg-secondary);
    color: var(--text-secondary); font-weight: 600; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}
.data-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.data-table tr:hover td { background: rgba(0, 240, 255, 0.02); }

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); width: 100%; max-width: 500px;
    padding: 32px; position: relative; animation: modalIn 0.3s ease;
}
.modal__close {
    position: absolute; top: 16px; right: 16px; background: none;
    border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer;
}
.modal__title { font-size: 1.3rem; margin-bottom: 16px; }

/* Loading */
.spinner {
    width: 40px; height: 40px; border: 3px solid var(--border-color);
    border-top-color: var(--neon-cyan); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 20px auto;
}

/* Animations */
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 5px var(--neon-cyan); } 50% { box-shadow: 0 0 20px var(--neon-cyan); } }

.animate-in { animation: fadeInUp 0.6s ease forwards; opacity: 0; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }

/* Page Content Offset */
.page-content { padding-top: 84px; min-height: 100vh; }

/* Utils */
.text-center { text-align: center; }
.text-cyan { color: var(--neon-cyan); }
.text-orange { color: var(--neon-orange); }
.text-gold { color: var(--neon-gold); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
