:root {
    --primary-color: #1e1e1e;
    /* Dark Charcoal */
    --text-color: #ecf0f1;
    /* Soft White */
    --accent-color: #d4af37;
    /* Gold */
    --cover-color: #0f0f0f;
    /* Deep Black */
    --bg-gradient: radial-gradient(circle at center, #2c2c2c, #0a0a0a);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-gradient);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Stack Book and Controls vertically */
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    user-select: none;
    -webkit-user-select: none;
}

/* --- Book Container --- */
.container-center {
    flex-grow: 1;
    /* Take up all available space above controls */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Remove padding-bottom hack, use flex layout */
    padding: 20px;
    padding-bottom: 0;
}

/* Library Page Styling */
.my-page {
    background-color: var(--primary-color);
    border: 1px solid #333;
    overflow: hidden;
    color: var(--text-color);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    /* Deeper shadow for realism */
}

.my-page.--hard {
    background-color: var(--cover-color);
    border: 2px solid var(--accent-color);
}

/* Page Inner Content */
.page-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    text-align: center;
    position: relative;
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
}

.cover-content h1 {
    font-size: 3.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.subtitle {
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #ccc;
}

/* Product Card */
.product-card {
    width: 100%;
    max-width: 280px;
}

.product-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    margin-bottom: 20px;
    border-radius: 2px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
}

.price {
    color: var(--accent-color);
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin: 15px 0;
}

/* Buttons inside pages */
.buy-btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.buy-btn:hover {
    background-color: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Table of Contents */
.toc-list {
    list-style: none;
    width: 100%;
    text-align: left;
    margin-top: 10px;
}

.toc-item {
    border-bottom: 1px solid #333;
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    transition: color 0.2s;
    cursor: pointer;
}

.toc-item:hover {
    color: var(--accent-color);
}

.toc-item span.page-num {
    color: var(--accent-color);
    font-family: 'Playfair Display', serif;
}

/* Category Dividers */
.category-divider {
    border: 1px solid var(--accent-color);
    padding: 40px 20px;
    width: 85%;
    background: linear-gradient(135deg, #1a1a1a 0%, #050505 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.category-divider h2 {
    color: var(--accent-color);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

/* --- Navigation Controls (Elite Design) --- */
.controls-container {
    /* Fixed at bottom, layout driven by flex body */
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 500;
    pointer-events: none;
    /* Pass-through for non-interactive areas */
}

/* Navigation Buttons */
.nav-buttons {
    margin-bottom: 15px;
    pointer-events: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-buttons button {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    /* Very subtle gold */
    color: var(--accent-color);
    padding: 8px 18px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    /* Full pill shape */
    transition: all 0.3s ease;
    outline: none;
}

.nav-buttons button:hover {
    background: var(--accent-color);
    color: #111;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    /* No generic transform scale, just color/glow */
}

.nav-buttons button:active {
    transform: scale(0.95);
}

/* Thumbnail Strip */
.thumb-strip {
    pointer-events: auto;
    width: 90%;
    max-width: 700px;
    height: 70px;
    /* Slightly compact */
    background: rgba(15, 15, 15, 0.85);
    /* Darker, more solid */
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    overflow-x: auto;
    padding: 0 15px;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

/* Initial/End Spacers for visual balance */
.thumb-strip:after,
.thumb-strip:before {
    content: '';
    display: block;
    width: 5px;
    flex-shrink: 0;
}

.thumb-item {
    height: 50px;
    width: 35px;
    /* Fixed aspect roughly */
    flex-shrink: 0;
    background: #222;
    border: 1px solid #444;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
}

.thumb-item:hover {
    opacity: 1;
    border-color: #888;
}

.thumb-item.active {
    opacity: 1;
    border-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    z-index: 10;
}

/* Thumbnail Text Overlay (Page Num) */
.thumb-item span {
    display: none;
    /* Hide numbers by default for cleaner look, or style minimally */
}

/* Only show essential text if needed, user liked mimicry */