@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,800;1,400&family=Inter:wght@400;500;600&family=Press+Start+2P&display=swap');

:root {
    --bg:           #0e0c0a;
    --surface:      #1a1714;
    --surface2:     #242019;
    --surface3:     #2e2920;
    --border:       #3a3328;
    --border2:      #4a4235;
    --text:         #f0ebe2;
    --text-muted:   #8a7f6e;
    --text-dim:     #5a5044;
    --accent:       #c9a84c;
    --accent-hover: #b8933a;
    --accent-dim:   rgba(201,168,76,0.12);
    --success:      #6dab6d;
    --danger:       #c96b6b;
    --radius:       10px;
    --radius-lg:    16px;
    --font-pixel:   'Press Start 2P', 'Courier New', monospace;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

img { max-width: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── NAVBAR ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(14,12,10,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
}

.brand-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
}

.brand-name {
    font-family: var(--font-pixel);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.nav-link:hover { color: var(--text); }

.nav-cta {
    padding: 0.45rem 1rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--accent);
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--accent);
    color: var(--bg);
}

/* ── HERO ── */
.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem 3rem;
}

.hero-eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text);
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 480px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* ── SEARCH ── */
.search-wrapper { width: 100%; max-width: 560px; }

.search-box {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-icon {
    padding: 0 0.875rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    padding: 0.875rem 0.5rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.975rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-box input::placeholder { color: var(--text-dim); }

.search-btn {
    padding: 0.875rem 1.5rem;
    background: var(--accent);
    border: none;
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
    flex-shrink: 0;
}

.search-btn:hover { background: var(--accent-hover); }

.search-hint {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 0.6rem;
    padding-left: 0.25rem;
}

/* ── BOOK DECORATION ── */
.hero-decoration {
    display: flex;
    align-items: flex-end;
    padding-bottom: 1rem;
}

.book-stack {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.book {
    border-radius: 3px 6px 6px 3px;
    position: relative;
}

.book::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px 0 0 3px;
}

.b1 { width: 28px; height: 140px; background: #8B4513; }
.b2 { width: 32px; height: 180px; background: #2c4a7c; }
.b3 { width: 26px; height: 110px; background: #5a3e1b; }
.b4 { width: 30px; height: 200px; background: #3d6b3d; }
.b5 { width: 24px; height: 90px; background: #7a3030; }

/* ── RESULTS ── */
.results-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.results-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.results-count strong { color: var(--text); }

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
    gap: 1rem;
}

.book-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, transform 0.15s;
}

.book-card:hover {
    border-color: var(--border2);
    transform: translateY(-1px);
}

.book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface2);
    border: 1px solid var(--border);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--surface2), var(--surface3));
}

.book-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.book-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.book-author {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.ext-badge {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.64rem;
}

.btn-access {
    margin-top: auto;
    width: 100%;
    padding: 0.45rem 0.75rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.btn-access:hover {
    background: var(--accent);
    color: var(--bg);
}

/* ── LOADING ── */
.loading {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── NOT FOUND ── */
.not-found {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.not-found-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.not-found h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.5rem;
}

.not-found p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.email-capture {
    display: flex;
    gap: 0.5rem;
    max-width: 360px;
    margin: 0 auto;
}

.email-capture input {
    flex: 1;
    padding: 0.65rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.email-capture input:focus { border-color: var(--accent); }

.email-capture button {
    padding: 0.65rem 1.1rem;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.success-msg { color: var(--success); font-size: 0.9rem; }
.error-msg { color: var(--danger); font-size: 0.9rem; }

/* ── TOP DO BRASIL ── */
.top-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.top-header {
    margin-bottom: 1.25rem;
}

.top-title {
    font-family: var(--font-pixel);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    color: rgb(207, 207, 5);
}

.top-subtitle {
    color: rgb(218, 216, 216);
    font-size: 0.85rem;
}

.top-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.25rem 0.25rem 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.top-track::-webkit-scrollbar { height: 8px; }
.top-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.top-card {
    flex: 0 0 140px;
    width: 140px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
}

.top-cover {
    width: 140px;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface2);
    border: 1px solid var(--border);
    transition: transform 0.15s, border-color 0.15s;
}

.top-card:hover .top-cover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.top-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.top-book-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-book-author {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── PAGINATION ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.pagination button {
    padding: 0.5rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.pagination button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination span {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ── MODAL ── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.modal-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.offer-timer {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--surface2);
    border: 1px dashed var(--accent);
    border-radius: 8px;
    padding: 0.6rem;
    margin-bottom: 1.5rem;
}

.offer-timer strong {
    font-family: var(--font-pixel);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.06em;
}

.modal-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ── BUTTONS ── */
.btn-primary {
    display: inline-block;
    padding: 0.8rem 1.75rem;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
    margin-bottom: 0.75rem;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
    display: block;
    width: 100%;
    padding: 0.65rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: color 0.15s;
}

.btn-ghost:hover { color: var(--text-muted); }

/* ── FOOTER ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--text-muted); }

/* ── AUTH PAGES ── */
.auth-container {
    max-width: 420px;
    margin: 5rem auto;
    padding: 0 2rem;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.form-group { margin-bottom: 1.1rem; }

.form-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s;
}

.form-group input:focus { border-color: var(--accent); }

.auth-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    margin-top: 0.5rem;
    transition: background 0.15s;
}

.auth-btn:hover { background: var(--accent-hover); }

.auth-error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 0.75rem;
    display: none;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
}

/* ── PLANS PAGE ── */
.plans-hero {
    text-align: center;
    padding: 4rem 2rem 2rem;
}

.plans-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.75rem;
}

.plans-hero p {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 680px;
    margin: 3rem auto;
    padding: 0 2rem 4rem;
}

.plan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: border-color 0.15s;
}

.plan-card.featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--surface), var(--surface2));
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.9rem;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.plan-name {
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.plan-price {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.plan-price sup {
    font-size: 1.2rem;
    vertical-align: super;
}

.plan-period {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.45rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.plan-features li:last-child { border-bottom: none; }

.plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.plan-cta {
    display: block;
    width: 100%;
    padding: 0.9rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    text-align: center;
}

.plan-cta.primary {
    background: var(--accent);
    color: var(--bg);
    border: none;
}

.plan-cta.primary:hover { background: var(--accent-hover); }

.plan-cta.outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border2);
}

.plan-cta.outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── DASHBOARD ── */
.dashboard {
    max-width: 640px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.dashboard h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1rem;
}

.dash-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.dash-value {
    font-size: 1.05rem;
    font-weight: 500;
}

.status-active { color: var(--success); }
.status-free { color: var(--text-muted); }

.dash-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 0.65rem 1.25rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── ERROR STATE ── */
.error-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── SEARCH PAGE ── */
.search-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.search-page-search {
    margin: 0 auto 2rem;
}

.search-page .results-section { padding: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .navbar { padding: 0.75rem 1rem; }

    .brand-name { font-size: 1.15rem; }

    .brand-icon { width: 26px; height: 26px; }

    .brand-logo { height: 30px; }

    .nav-cta { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

    .hero {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.25rem 2rem;
        text-align: center;
    }

    .hero-decoration { display: none; }

    .hero-title { font-size: clamp(2rem, 9vw, 2.75rem); }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
        font-size: 0.95rem;
    }

    .search-wrapper { margin: 0 auto; }

    .search-box input { font-size: 0.9rem; padding: 0.8rem 0.4rem; }

    .search-btn { padding: 0.8rem 1.1rem; font-size: 0.85rem; }

    .search-icon { padding: 0 0.6rem; }

    .top-section { padding: 0 1.25rem 2.5rem; }

    .results-section { padding: 0 1.25rem 3rem; }

    .search-page {
        padding: 1.25rem 1.25rem 3rem;
    }

    .search-page .results-section { padding: 0; }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .book-card {
        padding: 0.6rem;
        gap: 0.4rem;
    }

    .book-title { font-size: 0.82rem; }

    .book-author { font-size: 0.72rem; }

    .book-meta { font-size: 0.64rem; }

    .ext-badge { font-size: 0.58rem; }

    .btn-access {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }

    .footer-inner { flex-direction: column; text-align: center; }
}

/* ── BOOK DETAIL PAGE ── */
.book-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.15s;
}

.back-link:hover { color: var(--accent); }

.book-detail {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.book-detail-cover {
    width: 300px;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface2);
    border: 1px solid var(--border);
    box-shadow: 0 12px 34px rgba(0,0,0,0.45);
}

.book-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-cover-lg {
    font-size: 1.6rem;
    letter-spacing: 0.14em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

.book-detail-info {
    display: flex;
    flex-direction: column;
}

.book-detail-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.book-detail-author {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.25rem;
    font-family: 'Inter', sans-serif;
}

.book-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.detail-chip {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.detail-chip.ext-badge {
    color: var(--accent);
    background: var(--accent-dim);
    border-color: var(--accent);
}

.book-detail-fields {
    margin: 0 0 1.75rem;
}

.field-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.field-row:last-child { border-bottom: none; }

.field-row dt {
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 600;
    align-self: center;
}

.field-row dd {
    margin: 0;
    color: var(--text);
    text-align: right;
    font-weight: 500;
}

.btn-download {
    margin-top: auto;
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.book-detail-note {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin: 0;
}

@media (max-width: 768px) {
    .book-page { padding: 1.25rem 1.25rem 3rem; }

    .book-detail {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .book-detail-cover {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .book-detail-title { font-size: 1.6rem; }
}

/* -- TOP LIST (tops.html + generos) -- */
.top-list {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.top-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: color 0.15s;
}

.top-list-item:hover { color: var(--accent); }

.top-list-rank {
    font-family: var(--font-pixel);
    font-size: 0.68rem;
    color: var(--accent);
    width: 2.25rem;
    flex-shrink: 0;
    text-align: center;
}

.top-list-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-list-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-list-author {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
