/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #7579ff, #b224ef);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 1.5s ease;
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 900px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #e60073, 0 0 20px #e60073;
    }
    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #ff4da6, 0 0 30px #ff4da6, 0 0 40px #ff4da6;
    }
}

/* 心情选择器样式 */
.mood-selector {
    margin-bottom: 30px;
}

.mood-title {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
}

.mood-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.mood-btn {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mood-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.mood-btn.active {
    background-color: white;
    color: #7579ff;
    font-weight: bold;
    transform: scale(1.05);
}

/* 天气容器样式 */
.weather-container {
    position: relative;
    height: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.weather-box {
    flex: 1;
    min-height: 350px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.weather-description {
    text-align: center;
    color: white;
    padding: 15px;
}

.weather-description h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

/* 天气元素样式 */
.weather-elements, .mood-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 太阳样式 - 开心 */
.sun {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(to bottom right, #ffde59, #ff758c);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(255, 117, 140, 0.7), 0 0 100px rgba(255, 105, 180, 0.5);
    animation: sun-rotate 20s linear infinite, sun-move 25s ease-in-out infinite, sun-pulse 5s ease-in-out infinite;
}

@keyframes sun-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes sun-move {
    0%, 100% { top: 30px; left: 10%; }
    50% { top: 50px; left: 80%; }
}

@keyframes sun-pulse {
    0%, 100% { box-shadow: 0 0 50px rgba(255, 117, 140, 0.7), 0 0 100px rgba(255, 105, 180, 0.5); }
    50% { box-shadow: 0 0 60px rgba(255, 117, 140, 0.9), 0 0 120px rgba(255, 105, 180, 0.7); }
}

/* 云朵样式 - 平静 */
.cloud {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.cloud-1 {
    width: 100px;
    height: 40px;
}

.cloud-1::before {
    width: 50px;
    height: 50px;
    top: -20px;
    left: 10px;
}

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

.cloud-2 {
    width: 150px;
    height: 50px;
}

.cloud-2::before {
    width: 70px;
    height: 70px;
    top: -30px;
    left: 15px;
}

.cloud-2::after {
    width: 60px;
    height: 60px;
    top: -25px;
    right: 25px;
}

/* 新增云朵大小变种 */
.cloud-3 {
    width: 120px;
    height: 45px;
}

.cloud-3::before {
    width: 55px;
    height: 55px;
    top: -25px;
    left: 12px;
}

.cloud-3::after {
    width: 45px;
    height: 45px;
    top: -20px;
    right: 22px;
}

/* 云朵移动动画 - 多种路径 */
@keyframes cloud-move-1 {
    0% { left: -150px; top: 10%; }
    100% { left: 100%; top: 25%; }
}

@keyframes cloud-move-2 {
    0% { left: -150px; top: 40%; }
    100% { left: 100%; top: 30%; }
}

@keyframes cloud-move-3 {
    0% { left: -150px; top: 60%; }
    100% { left: 100%; top: 50%; }
}

/* 乌云动画优化 */
@keyframes dark-cloud-move-1 {
    0% { left: -120px; top: 15%; }
    100% { left: 100%; top: 25%; }
}

@keyframes dark-cloud-move-2 {
    0% { left: -120px; top: 35%; }
    100% { left: 100%; top: 20%; }
}

@keyframes dark-cloud-move-3 {
    0% { left: -120px; top: 60%; }
    100% { left: 100%; top: 45%; }
}

/* 雨滴样式 - 伤心 */
.raindrop {
    position: absolute;
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8));
    border-radius: 0 0 5px 5px;
    animation: rain-fall linear infinite;
    transform: none;
}

@keyframes rain-fall {
    0% { transform: translateY(-120px); opacity: 0; }
    10% { opacity: 1; }
    95% { opacity: 1; }
    100% { transform: translateY(400px); opacity: 0; }
}

/* 乌云样式 - 伤心/愤怒 */
.dark-cloud {
    position: absolute;
    background-color: rgba(68, 68, 68, 0.8);
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.dark-cloud-1 {
    width: 120px;
    height: 45px;
}

.dark-cloud-1::before {
    width: 60px;
    height: 60px;
    top: -25px;
    left: 12px;
}

.dark-cloud-1::after {
    width: 50px;
    height: 50px;
    top: -20px;
    right: 22px;
}

/* 闪电样式 - 愤怒 */
.lightning {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 10px;
    height: 100px;
    background: rgba(255, 255, 224, 0.9);
    clip-path: polygon(50% 0%, 0% 40%, 50% 40%, 0% 100%, 100% 40%, 50% 40%);
    animation: lightning 5s ease-in-out infinite;
    opacity: 0;
    transform: scale(0);
}

@keyframes lightning {
    0%, 95%, 98%, 100% { opacity: 0; transform: scale(0); }
    96%, 97% { opacity: 1; transform: scale(1); }
}

/* 彩虹样式 - 兴奋 */
.rainbow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 150px;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        rgba(255, 0, 0, 0.4) 0%,
        rgba(255, 165, 0, 0.4) 16.6%,
        rgba(255, 255, 0, 0.4) 33.2%,
        rgba(0, 128, 0, 0.4) 49.8%,
        rgba(0, 0, 255, 0.4) 66.4%,
        rgba(75, 0, 130, 0.4) 83%,
        rgba(238, 130, 238, 0.4) 100%
    );
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7);
    opacity: 0;
    animation: rainbow-appear 2s ease-out forwards;
}

@keyframes rainbow-appear {
    0% { transform: translateX(-50%) scale(0.2); opacity: 0; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* 爱心样式 - 开心/兴奋 */
.heart {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #ff6b6b;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    animation: heart-float 6s ease-in-out infinite;
}

.heart::before, .heart::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #ff6b6b;
    border-radius: 50%;
}

.heart::before {
    top: -15px;
    left: 0;
}

.heart::after {
    top: 0;
    left: -15px;
}

@keyframes heart-float {
    0% { transform: rotate(45deg) scale(0); opacity: 0; bottom: 0; }
    10% { transform: rotate(45deg) scale(1); opacity: 1; }
    90% { opacity: 1; }
    100% { transform: rotate(45deg) scale(0.5); opacity: 0; bottom: 100%; }
}

/* 泡泡样式 - 兴奋 */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0.2)
    );
    animation: bubble-float 8s ease-in-out infinite;
}

@keyframes bubble-float {
    0% { transform: scale(0); opacity: 0; bottom: 0; }
    10% { transform: scale(1); opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: scale(0.5); opacity: 0; bottom: 100%; }
}

/* 心情特定背景 */
body.happy-bg {
    background: linear-gradient(135deg, #ffb6c1, #ff69b4);
}

body.calm-bg {
    background: linear-gradient(135deg, #83eaf1, #63a4ff);
}

body.sad-bg {
    background: linear-gradient(135deg, #606c88, #3f4c6b);
}

body.angry-bg {
    background: linear-gradient(135deg, #7f0000, #330000);
}

body.excited-bg {
    background: linear-gradient(135deg, #ff758c, #ff7eb3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .mood-buttons {
        gap: 10px;
    }
    
    .mood-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .weather-container {
        height: 450px;
    }
    
    .weather-box {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.7rem;
    }
    
    .mood-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .weather-container {
        height: 400px;
    }
    
    .weather-box {
        min-height: 280px;
    }
}

/* 为预置云朵添加悬浮动画 */
@keyframes float-gentle {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    50% { transform: translate(5px, -5px) rotate(1deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    50% { transform: translate(-8px, -8px) rotate(-1deg); }
}

@keyframes float-large {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    50% { transform: translate(10px, -10px) rotate(2deg); }
}

/* 雨滴重置样式 - 当使用top显式定位时 */
.raindrop {
    transform: none;
}

/* 爱心已上升状态调整 */
.heart-floating {
    opacity: 1 !important;
    transform: rotate(45deg) scale(1) !important;
}

/* 泡泡已上升状态调整 */
.bubble-floating {
    opacity: 0.8 !important;
    transform: scale(1) !important;
}

/* 优化爱心样式 - 开心主题 */
.happy-heart {
    background-color: #ff69b4;
}

.happy-heart::before, .happy-heart::after {
    background-color: #ff69b4;
} 