:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: rgba(0, 0, 0, 0.4);
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b0;
    --accent: #4ecdc4;
    --accent-hover: #ff6b6b;
    --border: rgba(78, 205, 196, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.8;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    transition: width 0.3s ease;
}

.ebook-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-home {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-home:hover {
    color: var(--accent-hover);
}

.nav-title {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
}

.page-indicator {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.ebook-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ebook-page {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.page-content h1 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 2px;
}

.page-content h2 {
    font-size: 1.3rem;
    color: var(--accent);
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.page-content p {
    margin-bottom: 1em;
    text-align: justify;
    hyphens: auto;
}

.page-content hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 30px 0;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.page-btn {
    padding: 12px 24px;
    background: var(--accent);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
}

.page-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.page-btn.disabled {
    background: rgba(78, 205, 196, 0.3);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.page-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.3;
    transition: all 0.3s;
}

.dot.active {
    background: var(--accent);
    opacity: 1;
    transform: scale(1.3);
}

.dot:hover {
    opacity: 0.7;
}

@media (max-width: 600px) {
    .ebook-page {
        padding: 25px;
    }
    
    .ebook-nav {
        padding: 12px 15px;
    }
    
    .nav-title {
        display: none;
    }
    
    .pagination {
        padding: 15px;
    }
    
    .page-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .page-dots {
        display: none;
    }
}
