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

        :root {
            --bg-primary: #ffffff;
            --bg-secondary: #f8f9fa;
            --text-primary: #2c3e50;
            --text-secondary: #5a6c7d;
            --accent: #a39f98;
            --border: #e1e8ed;
            --shadow: rgba(0, 0, 0, 0.1);
            --success: #27ae60;
            --warning: #f39c12;
        }

        [data-theme="dark"] {
            --bg-primary: #1a1a1a;
            --bg-secondary: #2d2d2d;
            --text-primary: #e8e8e8;
            --text-secondary: #b8b8b8;
            --accent: #a39f98;
            --border: #404040;
            --shadow: rgba(0, 0, 0, 0.3);
            --success: #2ecc71;
            --warning: #e67e22;
        }

        body {
            font-family: 'Georgia', serif;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            transition: all 0.3s ease;
            line-height: 1.6;
        }

        .container {
            display: flex;
            min-height: 100vh;
            max-width: 1400px;
            margin: 0 auto;
        }

        .main-content {
            flex: 1;
            padding: 2rem;
            max-width: calc(100% - 320px);
            transition: max-width 0.3s ease;
        }

        .main-content.sidebar-hidden {
            max-width: 100%;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid var(--border);
        }

        .header-controls {
            display: flex;
            gap: 1rem;
            align-items: center;
        }

        .book-title {
            font-size: 2.5rem;
            font-weight: bold;
            color: var(--accent);
        }

        .theme-toggle {
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            color: var(--text-primary);
            padding: 0.75rem 1.5rem;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .theme-toggle:hover {
            background: var(--accent);
            color: white;
            transform: translateY(-2px);
        }

        .chapter-page {
            display: none;
            animation: fadeIn 0.5s ease;
            min-height: 70vh;
        }

        .chapter-page.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .chapter {
            padding: 2rem;
            background: var(--bg-secondary);
            border-radius: 15px;
            box-shadow: 0 4px 15px var(--shadow);
            margin-bottom: 2rem;
        }

        .chapter-title {
            font-size: 2.5rem;
            margin-bottom: 1.5rem;
            color: var(--accent);
            border-left: 4px solid var(--accent);
            padding-left: 1rem;
        }

        .chapter-content {
            font-size: 1.2rem;
            text-align: justify;
            line-height: 1.8;
        }

        .chapter-content p {
            margin-bottom: 2rem;
            position: relative;
        }

        .reading-marker {
            position: absolute;
            left: -30px;
            top: 0;
            width: 4px;
            height: 100%;
            background: var(--accent);
            opacity: 0;
            transition: all 0.3s ease;
            border-radius: 2px;
        }

        .reading-marker.active {
            opacity: 1;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .navigation {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 3rem;
            padding-top: 2rem;
            border-top: 2px solid var(--border);
        }

        .nav-button {
            background: var(--accent);
            color: white;
            border: none;
            padding: 1rem 2rem;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1rem;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-button:hover {
            background: var(--text-primary);
            transform: translateY(-2px);
        }

        .nav-button:disabled {
            background: var(--text-secondary);
            cursor: not-allowed;
            transform: none;
        }

        .chapter-progress {
            text-align: center;
            color: var(--text-secondary);
        }

        .sidebar {
            width: 320px;
            background: var(--bg-secondary);
            border-left: 2px solid var(--border);
            padding: 2rem;
            position: fixed;
            right: 0;
            top: 0;
            height: 100vh;
            overflow-y: auto;
            transition: all 0.3s ease;
            transform: translateX(0);
        }

        .sidebar.hidden {
            transform: translateX(100%);
        }

        .sidebar-toggle {
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            color: var(--text-primary);
            padding: 0.75rem 1.5rem;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .sidebar-toggle:hover {
            background: var(--accent);
            color: white;
            transform: translateY(-2px);
        }

        .sidebar-title {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: var(--accent);
            text-align: center;
            border-bottom: 2px solid var(--border);
            padding-bottom: 1rem;
        }

        .reading-progress {
            background: var(--bg-primary);
            border-radius: 10px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            border: 2px solid var(--border);
        }

        .progress-title {
            font-size: 1.1rem;
            margin-bottom: 1rem;
            color: var(--accent);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .progress-bar-container {
            background: var(--border);
            height: 8px;
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent), var(--success));
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .progress-text {
            font-size: 0.9rem;
            color: var(--text-secondary);
            text-align: center;
        }

        .bookmark-section {
            background: var(--bg-primary);
            border-radius: 10px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            border: 2px solid var(--border);
        }

        .bookmark-title {
            font-size: 1.1rem;
            margin-bottom: 1rem;
            color: var(--accent);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .bookmark-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem;
            background: var(--bg-secondary);
            border-radius: 8px;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .bookmark-item:hover {
            background: var(--accent);
            color: white;
        }

        .bookmark-info {
            flex: 1;
        }

        .bookmark-chapter {
            font-size: 0.9rem;
            font-weight: bold;
        }

        .bookmark-time {
            font-size: 0.8rem;
            opacity: 0.7;
        }

        .toc-item {
            display: block;
            padding: 1rem;
            margin-bottom: 0.5rem;
            background: var(--bg-primary);
            border: 2px solid var(--border);
            border-radius: 10px;
            text-decoration: none;
            color: var(--text-primary);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .toc-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
            transition: left 0.5s ease;
        }

        .toc-item:hover {
            background: var(--accent);
            color: white;
            transform: translateX(-5px);
            box-shadow: 0 5px 15px var(--shadow);
        }

        .toc-item:hover::before {
            left: 100%;
        }

        .toc-item.active {
            background: var(--accent);
            color: white;
            border-color: var(--accent);
        }

        .toc-item.completed {
            background: var(--success);
            color: white;
            border-color: var(--success);
        }

        .chapter-number {
            font-size: 0.9rem;
            opacity: 0.7;
            display: block;
        }

        .chapter-name {
            font-weight: bold;
            font-size: 1.1rem;
        }

        .chapter-status {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            font-size: 1.2rem;
        }

        .bookmark-button {
            background: var(--warning);
            color: white;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 15px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            margin-top: 1rem;
        }

        .bookmark-button:hover {
            background: var(--text-primary);
            transform: scale(1.05);
        }

        @media (max-width: 768px) {
            .container {
                flex-direction: column;
            }
            
            .main-content {
                max-width: 100%;
                padding: 1rem;
            }
            
            .sidebar {
                position: relative;
                width: 100%;
                height: auto;
                border-left: none;
                border-top: 2px solid var(--border);
                order: 2;
            }
            
            .book-title {
                font-size: 2rem;
            }
        }

        /*Menu do index*/
        .txt-menu {
            font-size: 0.8rem;
            text-align: center;
            padding-bottom: 1rem;
        }

        .mhover {
            display: block;
            padding: 10px;
            background: var(--bg-primary);
            border: 2px solid var(--border);
            border-radius: 10px;
            text-decoration: none;
            color: var(--text-primary);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            margin: auto;

        }

        .mhover:hover {
            background: var(--accent);
            color: white;
            box-shadow: 0 5px 15px var(--shadow);
        }
        /*Termino menu index*/