* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 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: #e8eaf6;
    border-left: 5px solid #5c6bc0;
    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: #3949ab;
    font-weight: bold;
    font-size: 17px;
    margin-top: 15px;
}

/* Experiment Scene */
.experiment-scene {
    background: linear-gradient(to bottom, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    border: 3px solid #ddd;
}

.experiment-setup {
    display: flex;
    gap: 40px;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

/* Thermometer Display */
.thermometer-display {
    display: flex;
    gap: 30px;
    align-items: center;
}

.thermo-container {
    display: flex;
    gap: 30px;
}

.thermometer-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thermo-bulb {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    z-index: 2;
}

.thermo-tube {
    width: 25px;
    height: 250px;
    background: rgba(200, 200, 200, 0.4);
    border: 3px solid #999;
    border-radius: 15px;
    position: relative;
    margin-top: -15px;
    overflow: hidden;
}

.mercury-level {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, #f44336 0%, #ff6659 100%);
    border-radius: 15px 15px 0 0;
    transition: height 1.5s ease;
}

.temperature-marks {
    position: absolute;
    left: 45px;
    top: 50px;
    display: flex;
    flex-direction: column;
    gap: 45px;
}

.temp-mark {
    font-size: 13px;
    color: #666;
    font-weight: bold;
    white-space: nowrap;
}

.temp-mark.highlight {
    color: #4caf50;
    font-size: 15px;
}

.temp-mark.start {
    color: #f44336;
    font-size: 15px;
}

/* Meniscus Diagram */
.meniscus-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.beaker {
    position: relative;
    width: 80px;
    height: 120px;
    display: flex;
    justify-content: space-between;
}

.beaker-wall {
    width: 4px;
    height: 100%;
    background: #2196f3;
    border-radius: 2px;
}

.beaker-wall.left {
    border-radius: 2px 0 0 2px;
}

.beaker-wall.right {
    border-radius: 0 2px 2px 0;
}

.beaker-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #2196f3;
    border-radius: 0 0 4px 4px;
}

.water-level {
    position: absolute;
    bottom: 20px;
    left: 4px;
    right: 4px;
    height: 50px;
    background: rgba(33, 150, 243, 0.3);
}

.meniscus-curve {
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 12px;
    background: rgba(33, 150, 243, 0.5);
    border-radius: 50% 50% 0 0;
    border: 2px solid #1976d2;
    border-bottom: none;
}

.meniscus-label {
    position: absolute;
    right: -180px;
    top: 35px;
    font-size: 11px;
    color: #1976d2;
    font-weight: bold;
    white-space: nowrap;
}

/* Bunsen Setup */
.bunsen-setup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.ice-container {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #81d4fa;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(129, 212, 250, 0.3);
}

.ice-cube {
    font-size: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.temp-label {
    font-size: 14px;
    font-weight: bold;
    color: #0277bd;
    margin-top: 10px;
}

.bunsen-burner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flame {
    font-size: 50px;
    animation: flicker 1.5s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

.burner-base {
    width: 60px;
    height: 40px;
    background: linear-gradient(to bottom, #666 0%, #333 100%);
    border-radius: 5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.burner-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-weight: bold;
}

/* 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: 20px;
    font-size: 20px;
}

.horizontal-line-container {
    position: relative;
    padding: 30px 10px;
    background: white;
    border-radius: 12px;
    border: 2px solid #ddd;
}

.temp-number-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.temp-number-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 4px;
    background: #2196f3;
    transform: translateY(-50%);
    z-index: 1;
}

.temp-point {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px 8px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    text-align: center;
    min-width: 55px;
    position: relative;
    z-index: 2;
    line-height: 1.3;
}

.temp-point small {
    font-size: 10px;
    display: block;
    margin-top: 3px;
}

.temp-point.start-point {
    border-color: #f44336;
    background: #ffebee;
    color: #c62828;
    border-width: 3px;
}

.temp-point.end-point {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
    border-width: 3px;
    font-size: 16px;
}

.arrow-indicator {
    margin-top: 15px;
    text-align: center;
}

.arrow-line {
    width: 150px;
    height: 3px;
    background: #ff9800;
    margin: 0 auto 5px;
    position: relative;
}

.arrow-line::after {
    content: '→';
    position: absolute;
    right: -20px;
    top: -12px;
    font-size: 24px;
    color: #ff9800;
}

.arrow-text {
    color: #e65100;
    font-weight: bold;
    font-size: 14px;
}

.calculation-display {
    margin-top: 15px;
    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: 180px;
    padding: 18px;
    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: #5c6bc0;
    box-shadow: 0 0 15px rgba(92, 107, 192, 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); }
}

/* Buttons */
.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0 20px 0;
}

button {
    background: #5c6bc0;
    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: #3949ab;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(92, 107, 192, 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;
    }

    .experiment-setup {
        flex-direction: column;
        gap: 25px;
    }

    .thermometer-display {
        flex-direction: column;
    }

    .temp-number-line {
        min-width: 800px;
    }

    .answer-input {
        width: 150px;
        font-size: 24px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .story-box {
        padding: 15px;
    }

    .experiment-scene {
        padding: 20px;
    }

    .ice-cube {
        font-size: 50px;
    }

    .flame {
        font-size: 40px;
    }
}
