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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 20px;
}

.screen {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.hidden {
    display: none;
}

h1 {
    color: #333;
    margin-bottom: 40px;
    font-size: 2.5em;
    font-weight: 300;
}

h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 300;
}

.settings {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.setting-group {
    margin-bottom: 30px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

input[type="range"] {
    width: 100%;
    margin-top: 10px;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
    margin-top: 30px;
    width: 100%;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.progress {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-right: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
    width: 0%;
}

#progress-text, #recall-progress {
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.study-card {
    margin: 40px 0;
    padding: 40px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.word {
    margin: 20px 0;
    font-size: 2em;
    font-weight: 500;
}

.swahili {
    color: #2d3748;
}

.english {
    color: #667eea;
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.timer-circle {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#timer-text {
    font-size: 1.5em;
    font-weight: 500;
    color: #667eea;
}

.recall-card {
    margin: 40px 0;
}

#recall-swahili {
    margin-bottom: 30px;
    font-size: 2.5em;
    color: #2d3748;
    font-weight: 500;
}

#recall-input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

#recall-input:focus {
    outline: none;
    border-color: #667eea;
}

.recall-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.score {
    margin: 30px 0;
}

.score-number {
    font-size: 3em;
    font-weight: 500;
    color: #667eea;
    margin-bottom: 10px;
}

.score-percentage {
    font-size: 1.2em;
    color: #666;
}

.missed-section {
    margin: 40px 0;
    text-align: left;
}

.missed-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.missed-item {
    background: #fef5e7;
    border: 1px solid #f6e05e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.missed-swahili {
    font-weight: 500;
    color: #744210;
}

.missed-english {
    color: #975a16;
}

@media (max-width: 600px) {
    .container {
        margin: 10px;
    }
    
    .screen {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .word {
        font-size: 1.5em;
    }
    
    #recall-swahili {
        font-size: 2em;
    }
}