* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 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 {
    background: #e1f5fe;
    border-left: 5px solid #0288d1;
    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: #01579b;
    font-weight: bold;
    font-size: 18px;
    margin-top: 15px;
}

.visual-container {
    display: flex;
    gap: 30px;
    justify-content: space-around;
    align-items: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* Weather Scene Styles */
.weather-scene {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.scene {
    background: white;
    border: 3px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    min-width: 140px;
    transition: all 0.3s ease;
}

.scene.morning {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    border-color: #9e9e9e;
}

.scene.wind {
    background: linear-gradient(135deg, #b3e5fc 0%, #81d4fa 100%);
    border-color: #0288d1;
}

.scene.afternoon {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border-color: #fbc02d;
}

.scene.highlight {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.scene-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.weather-icon {
    font-size: 50px;
    margin: 10px 0;
}

.wind-animation {
    animation: blow 2s ease-in-out infinite;
}

@keyframes blow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.temp-display {
    font-size: 24px;
    font-weight: bold;
    color: #1565c0;
    margin: 10px 0;
}

.scene-desc {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Thermometer Visual */
.thermometer-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.thermometer-large {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thermometer-bulb {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0288d1 0%, #0277bd 100%);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(2, 136, 209, 0.4);
    z-index: 2;
}

.thermometer-tube {
    width: 35px;
    height: 350px;
    background: rgba(200, 200, 200, 0.3);
    border: 3px solid #999;
    border-radius: 20px;
    position: relative;
    margin-top: -20px;
    overflow: hidden;
}

.mercury {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20%;
    background: linear-gradient(to top, #0288d1 0%, #29b6f6 100%);
    border-radius: 20px 20px 0 0;
    transition: height 1.5s ease;
}

.temp-scale {
    position: absolute;
    left: 60px;
    top: 70px;
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.scale-line {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

.scale-line.highlight {
    color: #0288d1;
    font-size: 16px;
}

.scale-line span {
    white-space: nowrap;
}

/* Number Line Section */
.number-line-section {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
}

.number-line-section h3 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 20px;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.step {
    text-align: center;
}

.step-label {
    font-size: 13px;
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
}

.number-box {
    background: white;
    border: 3px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    font-size: 22px;
    font-weight: bold;
    min-width: 100px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.number-box.start {
    border-color: #9e9e9e;
    color: #616161;
}

.number-box.middle {
    border-color: #0288d1;
    color: #01579b;
}

.number-box.end {
    border-color: #fbc02d;
    color: #f57c00;
    font-size: 28px;
}

.step-arrow {
    text-align: center;
}

.arrow-symbol {
    font-size: 32px;
    color: #ff9800;
    font-weight: bold;
}

.arrow-text {
    font-size: 14px;
    font-weight: bold;
    color: #ff9800;
    margin-top: 5px;
}

.arrow-text small {
    font-size: 11px;
}

.calculation-box {
    background: #fff3e0;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    color: #e65100;
    border: 2px solid #ff9800;
}

/* Answer Section */
.answer-section {
    margin: 30px 0;
}

.answer-section h3 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
}

.answer-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.answer-input {
    width: 200px;
    padding: 20px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    border: 4px solid #ddd;
    border-radius: 15px;
    background: white;
    transition: all 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #0288d1;
    box-shadow: 0 0 15px rgba(2, 136, 209, 0.3);
}

.answer-input.correct {
    background: #4caf50;
    color: white;
    border-color: #45a049;
    animation: correct 0.5s ease;
}

.answer-input.incorrect {
    background: #f44336;
    color: white;
    border-color: #da190b;
    animation: shake 0.5s ease;
}

.answer-input.revealed {
    background: #ff9800;
    color: white;
    border-color: #f57c00;
}

.degree-symbol {
    font-size: 32px;
    font-weight: bold;
    color: #666;
}

.attempts-counter {
    text-align: center;
    font-size: 16px;
    color: #666;
    font-weight: bold;
}

#attemptCount {
    color: #ff9800;
    font-size: 18px;
}

@keyframes correct {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0 20px 0;
}

button {
    background: #0288d1;
    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: #0277bd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(2, 136, 209, 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;
}

/* Balloons */
.balloons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.balloon {
    position: absolute;
    bottom: -150px;
    font-size: 60px;
    animation: rise 4s ease-in forwards;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

@keyframes rise {
    0% {
        bottom: -150px;
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
    100% {
        bottom: 110vh;
        opacity: 0;
        transform: translateX(var(--drift, 0px)) rotate(var(--rotate, 0deg));
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .visual-container {
        flex-direction: column;
        gap: 25px;
    }

    .weather-scene {
        gap: 15px;
    }

    .scene {
        min-width: 120px;
        padding: 15px;
    }

    .weather-icon {
        font-size: 40px;
    }

    .thermometer-tube {
        height: 300px;
    }

    .steps-container {
        flex-direction: column;
        gap: 10px;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .answer-input {
        width: 160px;
        font-size: 24px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .story-box {
        padding: 15px;
    }

    .number-line-section {
        padding: 20px;
    }

    .number-box {
        padding: 15px;
        font-size: 18px;
        min-width: 80px;
    }
}
