* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 100%;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

/* Story Box */
.story-box {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 5px solid #ff6f00;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.story-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.icon {
    font-size: 50px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.header-text strong {
    color: #e65100;
    font-size: 20px;
    display: block;
}

.header-text p {
    color: #666;
    font-size: 14px;
    margin-top: 3px;
}

.story-text {
    color: #333;
    line-height: 1.8;
    font-size: 16px;
    text-align: center;
}

.story-text strong {
    color: #ff6f00;
}

/* Table Animation */
.table-animation {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 15px;
}

.table {
    font-size: 60px;
    animation: build 3s ease-in-out infinite;
}

.table:nth-child(2) {
    animation-delay: 0.5s;
}

.table:nth-child(3) {
    animation-delay: 1s;
}

@keyframes build {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

/* Expression Box */
.expression-box {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    border: 3px solid #0277bd;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.expression-label {
    font-size: 18px;
    font-weight: bold;
    color: #01579b;
    margin-bottom: 15px;
}

.expression {
    font-size: 40px;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.expression sup {
    font-size: 28px;
    vertical-align: super;
}

/* Question Section */
.question-section {
    text-align: center;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 15px;
    border: 3px solid #9c27b0;
}

.question-section h3 {
    color: #6a1b9a;
    font-size: 22px;
    margin-bottom: 12px;
}

.instruction {
    color: #333;
    font-size: 18px;
    font-weight: bold;
}

/* Choices Container */
.choices-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.choice-card {
    background: white;
    border: 3px solid #1976d2;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 100px;
}

.choice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(25, 118, 210, 0.3);
    border-color: #0d47a1;
}

.choice-label {
    background: #1976d2;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.choice-expression {
    font-size: 24px;
    color: #333;
    font-family: 'Courier New', monospace;
    flex-grow: 1;
    text-align: center;
}

.choice-expression sup {
    font-size: 16px;
    vertical-align: super;
}

.choice-card.correct {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    border-color: #4caf50;
    animation: correct-pulse 0.6s ease;
}

.choice-card.correct .choice-label {
    background: #4caf50;
}

.choice-card.shake {
    animation: shake 0.5s ease;
}

@keyframes correct-pulse {
    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); }
}

.choice-card.disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* Feedback */
.feedback {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    min-height: 30px;
    margin: 25px 0;
}

.feedback.success {
    color: #4caf50;
}

.feedback.error {
    color: #f44336;
}

/* Reset Button */
.reset-btn {
    display: block;
    margin: 20px auto;
    background: #4caf50;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Clapping Animation */
.clapping-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.clapping-animation.active {
    display: block;
}

.clap-emoji {
    position: absolute;
    font-size: 70px;
    animation: clapping 2s ease-out forwards;
    opacity: 0;
}

.clap-emoji:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
}

.clap-emoji:nth-child(2) {
    left: 25%;
    top: 35%;
    animation-delay: 0.15s;
}

.clap-emoji:nth-child(3) {
    left: 45%;
    top: 15%;
    animation-delay: 0.3s;
}

.clap-emoji:nth-child(4) {
    left: 60%;
    top: 40%;
    animation-delay: 0.45s;
}

.clap-emoji:nth-child(5) {
    left: 80%;
    top: 25%;
    animation-delay: 0.6s;
}

.clap-emoji:nth-child(6) {
    left: 20%;
    top: 60%;
    animation-delay: 0.75s;
}

.clap-emoji:nth-child(7) {
    left: 40%;
    top: 70%;
    animation-delay: 0.9s;
}

.clap-emoji:nth-child(8) {
    left: 65%;
    top: 65%;
    animation-delay: 1.05s;
}

.clap-emoji:nth-child(9) {
    left: 85%;
    top: 55%;
    animation-delay: 1.2s;
}

.clap-emoji:nth-child(10) {
    left: 50%;
    top: 50%;
    animation-delay: 1.35s;
}

@keyframes clapping {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(0deg);
    }
    15% {
        opacity: 1;
        transform: scale(1.2) rotate(15deg);
    }
    30% {
        transform: scale(0.9) rotate(-10deg);
    }
    45% {
        transform: scale(1.1) rotate(10deg);
    }
    60% {
        transform: scale(1) rotate(-5deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(20deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .expression {
        font-size: 32px;
    }

    .expression sup {
        font-size: 22px;
    }

    .choices-container {
        grid-template-columns: 1fr;
    }

    .choice-expression {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 22px;
    }

    .expression {
        font-size: 28px;
    }

    .expression sup {
        font-size: 20px;
    }

    .table {
        font-size: 40px;
    }

    .choice-expression {
        font-size: 18px;
    }
}
