:root {
    --primary-color: #1a5f7a;
    --secondary-color: #457b9d;
    --accent-color: #e63946;
    --background-color: #f8f9fa;
    --text-color: #2b2d42;
    --light-text: #6c757d;
    --border-color: #dee2e6;
    --hover-color: #48cae4;
    --section-bg: #ffffff;
    --nav-bg: #f1faee;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    border-bottom: 4px solid var(--accent-color);
}

.introduction {
    grid-column: 1 / -1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 1rem;
    font-size: 1.1rem;
    color: var(--light-text);
}

.nav-section {
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    padding: 1rem;
    background: var(--nav-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.toc {
    height: calc(100% - 60px);
    overflow-y: auto;
    padding-right: 1rem;
}

.toc::-webkit-scrollbar {
    width: 6px;
}

.toc::-webkit-scrollbar-track {
    background: var(--nav-bg);
}

.toc::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.toc::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.toc li {
    margin: 0.75rem 0;
    list-style: none;
}

.toc a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.toc a:hover {
    color: var(--primary-color);
    background: rgba(72, 202, 228, 0.1);
    transform: translateX(5px);
}

.toc a.active {
    color: var(--accent-color);
    font-weight: 600;
}

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

section {
    background: var(--section-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    scroll-margin-top: 120px;
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
}

.section-header {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--section-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.section-header audio {
    display: block;
    width: 300px;
    height: 35px;
    margin: 15px 0 5px 0;
    background-color: var(--nav-bg);
    border-radius: 15px;
}

.toc audio {
    display: block;
    width: 200px;
    height: 30px;
    margin: 5px 0 15px 20px;
    background-color: var(--nav-bg);
    border-radius: 15px;
}

.audio-player {
    flex: 1;
    max-width: 400px;
    border-radius: 20px;
    background: var(--nav-bg);
    width: 200px;
    height: 30px;
    margin-left: 10px;
    vertical-align: middle;
}

/* Audio player styling */
audio {
    display: block;
    width: 250px;
    height: 30px;
    margin: 10px 0;
    background-color: var(--nav-bg);
    border-radius: 15px;
}

.audio-container {
    margin: 10px 0;
}

.section-content {
    padding: 1rem 0;
}

.section-content h3 {
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.section-content ul {
    padding-left: 1.5rem;
    list-style: none;
}

.section-content li {
    margin: 0.5rem 0;
    position: relative;
}

.section-content li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: -1.2rem;
    font-weight: bold;
}

.section-content p {
    margin: 1rem 0;
    line-height: 1.8;
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }

    .nav-section {
        position: relative;
        height: auto;
        max-height: 300px;
    }
}
