/* Reset Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8fafc;
    color: #1a202c;
    line-height: 1.6;
}

/* Navigasi */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 10%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.logo span { color: #3182ce; }

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li { margin: 0 1.5rem; }

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover { color: #3182ce; }

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 10%;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: white;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.search-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.search-container input {
    padding: 12px 20px;
    width: 400px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.search-container button {
    padding: 12px 25px;
    background: #3182ce;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: 0.3s;
}

.search-container button:hover { background: #2b6cb0; }

/* Katalog */
.container {
    padding: 50px 10%;
}

.section-title {
    margin-bottom: 30px;
    font-size: 1.8rem;
    border-left: 5px solid #3182ce;
    padding-left: 15px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

/* Card Buku */
.book-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.book-card:hover {
    transform: translateY(-10px);
}

.book-cover {
    position: relative;
    height: 250px;
    background: #edf2f7;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover img {
    width: 150px;
    height: 210px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #3182ce;
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.book-info {
    padding: 1.5rem;
    text-align: center;
}

.book-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.book-info p {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 15px;
}

.btn-read {
    width: 100%;
    padding: 10px;
    background: #ebf8ff;
    color: #3182ce;
    border: 2px solid #3182ce;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-read:hover {
    background: #3182ce;
    color: white;
}

/* Overlay Dasar */
.reader-overlay {
    display: none; /* Sembunyi secara default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 1000;
    overflow-y: auto;
}

/* Container Teks agar tidak terlalu lebar (fokus) */
.reader-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Toolbar Mode Baca */
.reader-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    background: white;
}

.reader-settings button, .btn-close {
    background: #f1f5f9;
    border: none;
    padding: 8px 15px;
    margin-left: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-close { background: #fee2e2; color: #dc2626; }

/* Styling Teks Buku */
.reader-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.reader-content h1 { font-size: 2.5rem; margin-bottom: 5px; }
.reader-content p { margin-bottom: 20px; }

/* Dark Mode untuk Pembaca */
.dark-reader {
    background: #1a1a1a !important;
    color: #e2e8f0 !important;
}
.dark-reader .reader-toolbar { background: #1a1a1a; border-bottom: 1px solid #333; }
.dark-reader .reader-content { color: #e2e8f0; }
