* {
    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;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 5px;
    backdrop-filter: blur(10px);
}

.tab-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.2);
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tab-content {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 2rem;
}

.practice-section {
    max-width: 800px;
    margin: 0 auto;
}

.instruction {
    text-align: center;
    margin-bottom: 20px;
}

.instruction p {
    font-size: 1.1rem;
    color: #666;
}

.prompt-area {
    text-align: center;
    margin-bottom: 30px;
}

.prompt {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.directions-btn {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border: none;
    color: white;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.directions-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

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

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.time-btn {
    background: linear-gradient(135deg, #9f7aea, #805ad5);
    border: none;
    color: white;
    padding: 15px 10px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.3);
}

.time-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(159, 122, 234, 0.4);
}

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


.controls {
    text-align: center;
    margin: 30px 0;
}

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

.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.feedback {
    text-align: center;
    margin: 20px 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback .correct {
    background: #c6f6d5;
    color: #22543d;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 600;
    border-left: 5px solid #38a169;
}

.feedback .incorrect {
    background: #fed7d7;
    color: #742a2a;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 600;
    border-left: 5px solid #e53e3e;
}

.score {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    background: #edf2f7;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
}

.stats-section {
    max-width: 900px;
    margin: 0 auto;
}

.overall-stats {
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.overall-stats h3 {
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.progress-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.progress-item span:first-child {
    color: #4a5568;
    font-weight: 500;
}

.progress-item span:last-child {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.1rem;
}

.category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-category {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
}

.stat-category h4 {
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
}

.progress-bar {
    background: #e2e8f0;
    border-radius: 25px;
    height: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #48bb78, #38a169);
    height: 100%;
    border-radius: 25px;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
}

.retention-chart {
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.retention-chart h3 {
    color: #2d3748;
    margin-bottom: 20px;
}

#retention-chart {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    background: white;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tab-nav {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
        margin: 2px;
    }
    
    .directions-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        max-width: 400px;
    }
    
    .time-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .progress-display {
        grid-template-columns: 1fr;
    }
    
    .category-stats {
        grid-template-columns: 1fr;
    }
}