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

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

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

.view {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.view.active {
    display: block;
}

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

/* Start View */
#start-view h1 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

#start-view p {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.input-group {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

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

.error-message {
    color: #f44336;
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 500;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    box-shadow: none;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Quiz View */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.question-counter {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 600;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.card-image {
    display: none;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin-bottom: 20px;
}

.card-image.visible {
    display: block;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    line-height: 1.4;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    font-size: 1rem;
}

.answer:hover {
    border-color: #667eea;
    background: #f5f5ff;
}

.answer.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.answer.correct {
    border-color: #4caf50;
    background: #4caf50;
    color: white;
}

.answer.wrong {
    border-color: #f44336;
    background: #f44336;
    color: white;
}

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

.feedback {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feedback.correct {
    background: #4caf50;
    color: white;
}

.feedback.wrong {
    background: #f44336;
    color: white;
}

.hidden {
    display: none !important;
}

/* Summary View */
#summary-view h1 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat.correct .stat-value {
    color: #4caf50;
}

.stat.wrong .stat-value {
    color: #f44336;
}

.stat.percentage .stat-value {
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 480px) {
    #start-view h1,
    #summary-view h1 {
        font-size: 2rem;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 1.2rem;
    }
    
    .progress-stats {
        grid-template-columns: 1fr !important;
    }
}

/* Progress View */
#progress-view h1 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.progress-description {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1rem;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-item .stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.stat-item.mastered .stat-value {
    color: #4caf50;
}

.stat-item.practicing .stat-value {
    color: #ff9800;
}

.stat-item.learning .stat-value {
    color: #f44336;
}

.stat-item.not-seen .stat-value {
    color: #9e9e9e;
}

.questions-list {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
}

.question-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.question-item:last-child {
    border-bottom: none;
}

.question-number {
    font-weight: 700;
    color: #667eea;
    font-size: 0.9rem;
}

.question-preview {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.progress-badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.progress-badge.level-0 {
    background: #f5f5f5;
    color: #9e9e9e;
}

.progress-badge.level-1,
.progress-badge.level-2 {
    background: #ffebee;
    color: #f44336;
}

.progress-badge.level-3,
.progress-badge.level-4 {
    background: #fff3e0;
    color: #ff9800;
}

.progress-badge.level-5 {
    background: #e8f5e9;
    color: #4caf50;
}

/* Update notification animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
