* {
    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;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.question-container {
    margin-bottom: 20px;
}

.intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
}

.intro p {
    color: #333;
    line-height: 1.8;
    font-size: 1.1em;
}

.data-table {
    margin-bottom: 25px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1em;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: #f8f9fa;
}

td {
    padding: 15px;
    color: #333;
    font-size: 1.05em;
}

.instruction {
    background: #fff3cd;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 5px solid #ffc107;
}

.instruction p {
    color: #856404;
    line-height: 1.8;
    font-size: 1.05em;
}

.question-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
}

.question-label p {
    color: #333;
    line-height: 1.8;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.sub-instruction {
    color: #667eea !important;
    font-size: 1em !important;
    font-weight: 600;
    margin-bottom: 20px !important;
}

.choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.choice-btn {
    background: white;
    border: 3px solid #667eea;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-weight: 500;
}

.choice-btn:hover {
    background: #f0f4ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.choice-btn:active {
    transform: translateY(-3px) scale(0.98);
}

.choice-btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.choice-btn.correct {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
    animation: correctPulse 0.5s ease;
}

.choice-btn.incorrect {
    background: #f44336;
    border-color: #f44336;
    color: white;
    animation: shake 0.5s ease;
}

.answer-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.answer-input {
    flex: 1;
    padding: 12px;
    font-size: 1.1em;
    border: 3px solid #667eea;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

.answer-input:focus {
    border-color: #764ba2;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.answer-input.correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

.answer-input.blink {
    animation: blinkRed 0.6s ease;
}

.answer-input:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
}

.check-btn {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.check-btn:active {
    transform: translateY(0);
}

.check-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.try-again {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #4caf50;
}

.feedback.revealed {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #17a2b8;
}

.progress {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 25px;
}

.progress p {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

.progress span {
    color: #4caf50;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

.reset-btn {
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes blinkRed {
    0%, 100% { 
        background: white; 
        border-color: #667eea;
    }
    50% { 
        background: #f44336; 
        border-color: #f44336;
    }
}

/* Clapping Animation */
.clapping-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.clapping-container.active {
    display: block;
}

.clap {
    position: absolute;
    font-size: 3em;
    animation: clapping 2s ease-out forwards;
    opacity: 0;
}

.clap:nth-child(1) { left: 10%; animation-delay: 0s; }
.clap:nth-child(2) { left: 20%; animation-delay: 0.1s; }
.clap:nth-child(3) { left: 30%; animation-delay: 0.2s; }
.clap:nth-child(4) { left: 40%; animation-delay: 0.3s; }
.clap:nth-child(5) { left: 50%; animation-delay: 0.4s; }
.clap:nth-child(6) { left: 60%; animation-delay: 0.5s; }
.clap:nth-child(7) { left: 70%; animation-delay: 0.6s; }
.clap:nth-child(8) { left: 80%; animation-delay: 0.7s; }
.clap:nth-child(9) { left: 90%; animation-delay: 0.8s; }
.clap:nth-child(10) { left: 50%; animation-delay: 0.9s; }

@keyframes clapping {
    0% {
        bottom: -10%;
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: scale(0.8) rotate(360deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 1.8em;
    }

    .choices {
        grid-template-columns: 1fr;
    }

    .answer-group {
        flex-direction: column;
    }

    .check-btn {
        width: 100%;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 10px;
    }

    .clap {
        font-size: 2em;
    }
}
