:root {
    --sky-color: #87CEEB;
    --sun-color: #FFD700;
    --cloud-color: #FFFFFF;
    --text-color: #333;
    --btn-bg: #fff;
    --btn-hover: #f0f0f0;
}

body {
    font-family: 'ZCOOL KuaiLe', cursive, sans-serif;
    background-color: #f0f8ff;
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #FF6B6B;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 30px;
}

.scene {
    width: 100%;
    height: 400px;
    background-color: var(--sky-color);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border: 4px solid #4da6ff;
    transition: background-color 1s ease;
}

/* Sun Styles */
.sun {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 80px;
    height: 80px;
    background: var(--sun-color);
    border-radius: 50%;
    box-shadow: 0 0 40px var(--sun-color);
    transition: all 1s ease;
    opacity: 0.3;
    transform: scale(0.8);
}

.sun.active {
    opacity: 1;
    transform: scale(1) rotate(360deg);
    box-shadow: 0 0 60px var(--sun-color);
}

/* Cloud & Rain Styles */
.cloud {
    position: absolute;
    top: 60px;
    right: 60px;
    width: 120px;
    height: 60px;
    background: var(--cloud-color);
    border-radius: 50px;
    opacity: 0.3;
    transition: all 1s ease;
    transform: translateX(20px);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: var(--cloud-color);
    border-radius: 50%;
}

.cloud::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud::after {
    width: 40px;
    height: 40px;
    top: -15px;
    right: 15px;
}

.cloud.active {
    opacity: 1;
    transform: translateX(0);
}

.rain-container {
    position: absolute;
    top: 40px;
    left: 10px;
    width: 100px;
    height: 0;
    overflow: hidden;
    transition: height 1s ease;
}

.cloud.active .rain-container {
    height: 300px;
}

.raindrop {
    position: absolute;
    width: 2px;
    height: 10px;
    background: #fff;
    animation: rain 1s linear infinite;
    opacity: 0.6;
}

@keyframes rain {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(300px);
        opacity: 0;
    }
}

/* Rainbow Styles */
.rainbow {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    width: 400px;
    height: 200px;
    opacity: 0;
    transition: all 2s ease;
    filter: blur(5px);
}

.rainbow.visible {
    opacity: 0.8;
    transform: translateX(-50%) scale(1);
    bottom: 0;
    filter: blur(0);
}

.arc {
    position: absolute;
    border-radius: 50% 50% 0 0;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    border-style: solid;
    border-bottom: 0;
}

.red {
    width: 350px;
    height: 175px;
    border-width: 20px 20px 0 20px;
    border-color: #FF0000;
    z-index: 7;
}

.orange {
    width: 310px;
    height: 155px;
    border-width: 20px 20px 0 20px;
    border-color: #FF7F00;
    z-index: 6;
}

.yellow {
    width: 270px;
    height: 135px;
    border-width: 20px 20px 0 20px;
    border-color: #FFFF00;
    z-index: 5;
}

.green {
    width: 230px;
    height: 115px;
    border-width: 20px 20px 0 20px;
    border-color: #00FF00;
    z-index: 4;
}

.blue {
    width: 190px;
    height: 95px;
    border-width: 20px 20px 0 20px;
    border-color: #0000FF;
    z-index: 3;
}

.indigo {
    width: 150px;
    height: 75px;
    border-width: 20px 20px 0 20px;
    border-color: #4B0082;
    z-index: 2;
}

.violet {
    width: 110px;
    height: 55px;
    border-width: 20px 20px 0 20px;
    border-color: #9400D3;
    z-index: 1;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.2em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-family: inherit;
    border: 2px solid #eee;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

#btn-sun.active {
    background: #FFD700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border-color: #FFD700;
}

#btn-rain.active {
    background: #4da6ff;
    color: white;
    border-color: #4da6ff;
}

.explanation {
    background: #fff9c4;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.3em;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

/* Science Box */
.science-box {
    background: #e1f5fe;
    border: 2px dashed #29b6f6;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.science-box.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

.science-box h3 {
    color: #0277bd;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.science-box p {
    color: #01579b;
    font-size: 1.1em;
    line-height: 1.5;
    margin: 0;
}