* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 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: 1100px;
    width: 100%;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

.story-box {
    background: #fff3e0;
    border-left: 5px solid #ff9800;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.story-box p {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 10px;
}

.story-box p:last-child {
    margin-bottom: 0;
}

.story-box .question {
    color: #e65100;
    font-weight: bold;
    font-size: 17px;
    margin-top: 15px;
}

/* Construction Scene */
.construction-scene {
    background: linear-gradient(to bottom, #87ceeb 0%, #e0e0e0 50%, #8b4513 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
}

.ground-level {
    text-align: center;
    margin-bottom: 20px;
}

.ground-surface {
    background: #4caf50;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.grass {
    font-size: 30px;
}

.ground-label {
    font-size: 16px;
    font-weight: bold;
    color: #2e7d32;
    background: #a5d6a7;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
}

.pit-container {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.pit-walls {
    width: 280px;
    background: linear-gradient(to bottom, #795548 0%, #5d4037 100%);
    border: 4px solid #3e2723;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.5);
}

.depth-markers {
    position: absolute;
    left: -50px;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.marker {
    background: #fff3e0;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #e65100;
    border: 2px solid #ff9800;
}

.pit-interior {
    background: linear-gradient(to bottom, #a1887f 0%, #6d4c41 100%);
    border-radius: 10px;
    padding: 15px;
    min-height: 280px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.workers-digging {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

.worker {
    font-size: 40px;
    animation: dig 1.5s ease-in-out infinite;
}

.worker:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes dig {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-10deg); }
}

.tool {
    font-size: 35px;
    animation: swing 1s ease-in-out infinite;
}

.tool:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes swing {
    0%, 100% { transform: rotate(-20deg); }
    50% { transform: rotate(20deg); }
}

.soil-fill {
    background: #8d6e63;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    border: 2px solid #5d4037;
}

.fill-label {
    font-size: 13px;
    font-weight: bold;
    color: #ffeb3b;
    margin-bottom: 5px;
}

.soil-particles {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
}

.equipment {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.excavator, .truck, .cone {
    font-size: 45px;
    animation: bounce 2s ease-in-out infinite;
}

.truck {
    animation-delay: 0.3s;
}

.cone {
    animation-delay: 0.6s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.tank-illustration {
    text-align: center;
    margin-top: 20px;
}

.water-tank {
    font-size: 60px;
    margin-bottom: 10px;
}

.tank-label {
    font-size: 14px;
    font-weight: bold;
    color: #01579b;
    background: #b3e5fc;
    display: inline-block;
    padding: 8px 15px;
    border-radius: 15px;
}

/* Number Line Section */
.number-line-section {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
}

.number-line-section h3 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 20px;
}

.vertical-number-line {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.digging-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.depth-point {
    background: white;
    border: 3px solid #ff9800;
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.depth-point.ground-start {
    border-color: #4caf50;
    background: #e8f5e9;
}

.depth-point.ground-start .point-value {
    color: #2e7d32;
}

.depth-point.final {
    border-color: #2196f3;
    background: #e3f2fd;
    font-size: 18px;
}

.depth-point.final .point-value {
    color: #1565c0;
    font-size: 20px;
}

.point-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #e65100;
}

.point-label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

.arrow-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 5px 0;
}

.arrow {
    font-size: 30px;
    color: #f44336;
    font-weight: bold;
}

.arrow-segment.refill .arrow {
    color: #4caf50;
}

.operation {
    font-size: 13px;
    font-weight: bold;
    color: #f44336;
    background: #ffebee;
    padding: 5px 12px;
    border-radius: 10px;
}

.arrow-segment.refill .operation {
    color: #2e7d32;
    background: #e8f5e9;
}

.calculation-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 15px;
    color: #1565c0;
    border: 2px solid #2196f3;
    line-height: 1.8;
}

/* Answer Section */
.answer-section {
    margin: 30px 0;
}

.answer-section h3 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 20px;
}

.choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.choice-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    border: 3px solid #ff5252;
    border-radius: 15px;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.choice-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.choice-letter {
    background: rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.choice-text {
    flex: 1;
    text-align: left;
}

.choice-btn.correct {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-color: #388e3c;
    animation: correct-pulse 0.5s ease;
}

.choice-btn.incorrect {
    animation: shake 0.5s ease;
}

.choice-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

@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); }
}

/* Buttons */
.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0 20px 0;
}

button {
    background: #ff9800;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

button:active {
    transform: translateY(0);
}

.feedback {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    min-height: 30px;
    margin: 20px 0;
}

.feedback.success {
    color: #4caf50;
}

.feedback.error {
    color: #f44336;
}

.feedback.warning {
    color: #ff9800;
}

.info-box {
    background: #e8f5e9;
    border-left: 5px solid #4caf50;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.info-box h3 {
    color: #2e7d32;
    margin-bottom: 10px;
    font-size: 18px;
}

.info-box p {
    color: #555;
    line-height: 1.8;
}

/* 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: clap 1.5s 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: 60%;
    animation-delay: 0.1s;
}

.clap-emoji:nth-child(3) {
    left: 40%;
    top: 30%;
    animation-delay: 0.2s;
}

.clap-emoji:nth-child(4) {
    left: 55%;
    top: 70%;
    animation-delay: 0.3s;
}

.clap-emoji:nth-child(5) {
    left: 70%;
    top: 25%;
    animation-delay: 0.4s;
}

.clap-emoji:nth-child(6) {
    left: 85%;
    top: 55%;
    animation-delay: 0.5s;
}

.clap-emoji:nth-child(7) {
    left: 20%;
    top: 45%;
    animation-delay: 0.6s;
}

.clap-emoji:nth-child(8) {
    left: 75%;
    top: 80%;
    animation-delay: 0.7s;
}

@keyframes clap {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1.3) rotate(15deg);
    }
    40% {
        transform: scale(1) rotate(-10deg);
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    80% {
        transform: scale(0.9) rotate(-5deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.7) rotate(0deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .construction-scene {
        padding: 20px;
    }

    .pit-container {
        flex-direction: column;
    }

    .depth-markers {
        left: -45px;
        gap: 30px;
    }

    .choices {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .choice-btn {
        padding: 18px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .story-box {
        padding: 15px;
    }

    .pit-walls {
        width: 240px;
    }

    .worker, .tool {
        font-size: 30px;
    }

    .excavator, .truck, .cone {
        font-size: 35px;
    }
}
