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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(45deg, #4158d0 0%, #c850c0 46%, #ffcc70 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.banana-image {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.index-section {
    padding: 25px;
    background: #e8f4fd;
    border-bottom: 2px solid #667eea;
}

.index-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-align: center;
}

.exercise-nav ul {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
}

.exercise-nav li {
    margin-bottom: 10px;
}

.exercise-nav a {
    display: block;
    padding: 12px 20px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #667eea;
    transition: all 0.3s ease;
    font-weight: 600;
}

.exercise-nav a:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.instructions {
    padding: 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.instructions h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.instructions p {
    color: #5a6c7d;
    line-height: 1.6;
    font-size: 1.1em;
}

.audio-controls {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e9ecef;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn.primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn.secondary {
    background: #6c757d;
    color: white;
}

.btn.secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.speed-control label {
    font-weight: 600;
    color: #495057;
}

#speedSlider {
    width: 100px;
}

#speedDisplay {
    font-weight: 600;
    color: #667eea;
    min-width: 40px;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    position: relative;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.text-container {
    padding: 30px;
}

.text-container h3 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 25px;
    text-align: center;
}

.dictation-text {
    line-height: 2;
    font-size: 1.1em;
    color: #495057;
    text-align: justify;
}

.banana {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: bold;
    color: #333;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.current-sentence {
    background: rgba(102, 126, 234, 0.1);
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.answer-section {
    padding: 25px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.answers {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.answers h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.answer-item {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
    background: #e8f5e8;
    border-left: 3px solid #28a745;
}

.hidden {
    display: none;
}

.exercise-divider {
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 0;
}

.pdf-section {
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.pdf-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdf-container h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

.content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.dictation-column {
    flex: 1;
}

.pdf-column {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .audio-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .speed-control {
        margin-left: 0;
        justify-content: center;
    }
    
    .dictation-text {
        font-size: 1em;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .pdf-container embed {
        height: 400px;
    }
}