/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    background: #F3EDE2;
    color: #1A1A1A;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Spectral', serif;
    font-weight: 600;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: #8B0000;
}

/* Progress Indicator */
.progress-indicator {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-line {
    width: 2px;
    height: 200px;
    background: rgba(139, 0, 0, 0.2);
    position: relative;
    margin-bottom: 1rem;
}

.progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #8B0000;
    height: var(--progress, 0%);
    transition: height 0.3s ease;
}

.progress-dots {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(139, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #8B0000;
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(139, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Main Tableau */
.tableau {
    min-height: 100vh;
}

/* Scene Styles */
.scene {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0.3;
    transition: opacity 0.6s ease;
}

.scene.active {
    opacity: 1;
}

.scene-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.scene-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(26, 26, 26, 0.1);
}

.scene-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.scene:hover .scene-image img {
    transform: scale(1.02);
}

.scene-text {
    padding: 2rem 0;
}

.scene-quote {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-style: italic;
    color: #8B0000;
    margin-bottom: 2rem;
    padding-left: 2rem;
    border-left: 3px solid #D6B25E;
    line-height: 1.4;
}

.scene-synopsis {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #4A4A4A;
    margin-bottom: 2rem;
}

/* Audio Controls */
.scene-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.play-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: #8B0000;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: #A52A2A;
    transform: scale(1.1);
}

.play-btn.playing {
    background: #D6B25E;
}

.audio-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #8B0000;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.time {
    font-size: 0.9rem;
    color: #666;
    min-width: 40px;
}

/* Instructions */
.instructions {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.instructions:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .scene-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .progress-indicator {
        right: 1rem;
    }
    
    .scene-controls {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .scene {
        padding: 1rem;
    }
    
    .progress-indicator {
        display: none;
    }
    
    .instructions {
        bottom: 1rem;
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
    }
    
    .scene-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .audio-progress {
        width: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
.play-btn:focus,
.dot:focus {
    outline: 2px solid #8B0000;
    outline-offset: 2px;
}

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

.scene {
    animation: fadeIn 0.6s ease-out;
}