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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}


.main {
    padding: 2rem 0;
}

.welcome-screen {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.welcome-screen h2 {
    color: #4a5568;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.welcome-screen p {
    color: #718096;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.setup-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 600;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.learning-dashboard {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    color: #4a5568;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.language-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
}

.control-group select {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.control-group select:hover {
    border-color: #667eea;
}

.control-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.progress-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.progress-item span:first-child {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.progress-item span:last-child {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.language-info {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.level-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.level-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.level-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.2);
}

.level-card h3 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.level-card p {
    color: #718096;
    margin-bottom: 1rem;
}

.video-count {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

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

.video-view {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.video-header h2 {
    color: #4a5568;
    font-size: 1.8rem;
    flex: 1;
}

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

.video-progress .progress-bar {
    width: 200px;
}

.video-content {
    max-width: 900px;
    margin: 0 auto;
}

.video-info {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.channel-name {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.video-duration {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.video-description {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.video-container {
    background: white;
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#youtube-player {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.exercise-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.option-btn.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

#answer-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#answer-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.matching-exercise {
    display: grid;
    gap: 1rem;
}

.matching-pair {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
}

.matching-pair .word {
    font-weight: 600;
    color: #4a5568;
    min-width: 120px;
}

.matching-pair input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.dialogue-exercise {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 10px;
}

.dialogue-line {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.dialogue-line strong {
    color: #667eea;
    margin-right: 0.5rem;
}

.dialogue-line select {
    margin-left: 0.5rem;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
}

.video-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.video-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.video-controls button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.feedback {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.feedback-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.feedback-message.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-message.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.feedback-explanation {
    color: #4a5568;
    font-style: italic;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .welcome-screen {
        padding: 2rem 1rem;
    }
    
    .welcome-screen h2 {
        font-size: 2rem;
    }
    
    .video-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .video-progress {
        justify-content: center;
    }
    
    .video-progress .progress-bar {
        width: 150px;
    }
    
    .video-controls {
        flex-direction: column;
    }
    
    .language-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .video-meta {
        flex-direction: column;
        text-align: center;
    }
    
    #youtube-player {
        height: 250px;
    }
    
    .progress-summary {
        grid-template-columns: 1fr;
    }
    
    .level-categories {
        grid-template-columns: 1fr;
    }
    
    .matching-pair {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}