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

.container {
    flex: 1;
    max-width: 800px;
    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;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

.welcome-card, .quiz-card, .result-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.welcome-card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.welcome-card p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #666;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 5px;
}

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

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.quiz-header {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

.quiz-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #667eea;
}

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

.answers {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.answer-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
    color: #333;
}

.answer-btn:hover {
    background: #e3f2fd;
    border-color: #667eea;
    transform: translateY(-2px);
}

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

.answer-btn.correct {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.answer-btn.incorrect {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

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

.explanation {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

.explanation::before {
    content: "💡";
    font-size: 1.2rem;
    margin-right: 8px;
}

.explanation.correct {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.explanation.incorrect {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-image {
    margin-top: 20px;
    text-align: center;
    animation: fadeInScale 0.6s ease-out;
}

.question-image img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 3px solid #fff;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.question-image img:hover {
    transform: scale(1.02);
}

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

.final-score {
    margin: 30px 0;
}

.final-score #points {
    font-size: 4rem;
    font-weight: bold;
    color: #667eea;
    display: block;
}

.points-label {
    font-size: 1.2rem;
    color: #666;
}

.result-message {
    margin: 25px 0;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
}

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

.result-message.good {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

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

.result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

footer {
    text-align: center;
    padding: 20px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsywność */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .welcome-card, .quiz-card, .result-card {
        padding: 20px;
    }

    .quiz-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .final-score #points {
        font-size: 3rem;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .welcome-card, .quiz-card, .result-card {
        padding: 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .question-image img {
        max-height: 200px;
    }
}
