/* 动态彩色渐变背景 */
body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 动态渐变背景层 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(
        45deg,
        #1B60A1,
        #1B6CB3,
        #1F78BC,
        #2E81C2,
        #3991CC,
        #4EA2D8,
        #77B7E3,
        #A5D2F1,
        #CEE9FB,
        #E6F5FB,
        #CEE9FB,
        #A5D2F1,
        #77B7E3,
        #4EA2D8,
        #3991CC,
        #2E81C2,
        #1F78BC,
        #1B6CB3,
        #1B60A1
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* 叠加的暗色遮罩，使内容更易读 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(3px);
}

/* 动态渐变动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 100%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 浮动的彩色光斑效果 */
body {
    position: relative;
}

body > .floating-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-orbs::before,
.floating-orbs::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.floating-orbs::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(27, 96, 161, 0.7) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-orbs::after {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(78, 162, 216, 0.7) 0%, transparent 70%);
    bottom: 10%;
    right: 10%;
    animation-delay: -10s;
}

/* 额外的浮動光球 */
.floating-orbs .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.floating-orbs .orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(31, 120, 188, 0.7) 0%, transparent 70%);
    top: 50%;
    left: 60%;
    animation: float 25s ease-in-out infinite;
    animation-delay: -5s;
}

.floating-orbs .orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(57, 145, 204, 0.7) 0%, transparent 70%);
    top: 70%;
    left: 20%;
    animation: float 18s ease-in-out infinite;
    animation-delay: -8s;
}

.floating-orbs .orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(119, 183, 227, 0.7) 0%, transparent 70%);
    top: 20%;
    right: 30%;
    animation: float 22s ease-in-out infinite;
    animation-delay: -3s;
}

/* 浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(50px, 30px) scale(1.05);
    }
}

/* 星尘粒子效果（可选） */
body > .particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: sparkle 4s ease-in-out infinite;
}

.particles span:nth-child(1) { left: 10%; animation-delay: 0s; }
.particles span:nth-child(2) { left: 20%; animation-delay: 0.5s; }
.particles span:nth-child(3) { left: 30%; animation-delay: 1s; }
.particles span:nth-child(4) { left: 40%; animation-delay: 1.5s; }
.particles span:nth-child(5) { left: 50%; animation-delay: 2s; }
.particles span:nth-child(6) { left: 60%; animation-delay: 2.5s; }
.particles span:nth-child(7) { left: 70%; animation-delay: 3s; }
.particles span:nth-child(8) { left: 80%; animation-delay: 3.5s; }
.particles span:nth-child(9) { left: 90%; animation-delay: 0.3s; }
.particles span:nth-child(10) { left: 15%; animation-delay: 1.2s; }
.particles span:nth-child(11) { left: 35%; animation-delay: 2.2s; }
.particles span:nth-child(12) { left: 55%; animation-delay: 0.8s; }
.particles span:nth-child(13) { left: 75%; animation-delay: 1.8s; }
.particles span:nth-child(14) { left: 85%; animation-delay: 2.8s; }
.particles span:nth-child(15) { left: 25%; animation-delay: 3.2s; }

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

/* 修改body背景为透明以显示动态背景 */
.bg-gray-100 {
    background-color: transparent !important;
}

/* 确保卡片组件在动态背景上清晰可见 */
.bg-white {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
}

/* 导航按钮优化 */
.bg-primary {
    background: rgba(26, 86, 219, 0.9) !important;
}

/* 水杯喝水追踪效果 - 上宽下窄水杯 */
.water-cup-wrapper {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.water-cup-wrapper:hover {
    transform: scale(1.08);
}

.water-cup {
    width: 52px;
    height: 72px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
    /* 上宽下窄梯形杯身 */
    clip-path: polygon(5% 0%, 95% 0%, 85% 100%, 15% 100%);
    border: none;
    box-shadow: 
        inset -6px 0 10px rgba(100, 150, 180, 0.15),
        inset 6px 0 10px rgba(100, 150, 180, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 杯口椭圆 */
.water-cup::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 3%;
    right: 3%;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: 2px solid rgba(150, 180, 200, 0.5);
    z-index: 3;
    box-shadow: inset 0 -3px 5px rgba(100, 150, 180, 0.2);
}

/* 杯底 */
.water-cup::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 15%;
    right: 15%;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    z-index: 3;
    box-shadow: inset 0 2px 4px rgba(100, 150, 180, 0.2);
}

.water-cup.filled {
    box-shadow: 
        inset -6px 0 10px rgba(27, 108, 179, 0.2),
        inset 6px 0 10px rgba(27, 108, 179, 0.2),
        0 2px 12px rgba(27, 108, 179, 0.3);
}

.water-cup.filled::before {
    border-color: rgba(27, 108, 179, 0.6);
}

.water-fill {
    position: absolute;
    bottom: 2px;
    left: 18%;
    right: 18%;
    height: 0%;
    background: linear-gradient(180deg, #5DB3E8 0%, #2E81C2 60%, #1B6CB3 100%);
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    clip-path: polygon(0% 0%, 100% 0%, 88% 100%, 12% 100%);
    z-index: 1;
}

/* 水面椭圆 */
.water-fill::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -5%;
    right: -5%;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(180deg, #77B7E3 0%, #4EA2D8 100%);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.water-cup.filled .water-fill::before {
    opacity: 1;
}

/* 水波动效果 */
.water-wave {
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath fill='rgba(119, 183, 227, 0.25)' d='M0,60 C150,90 350,30 600,60 C850,90 1050,30 1200,60 L1200,120 L0,120 Z'/%3E%3C/svg%3E");
    background-size: 40px 100%;
    transform-origin: bottom center;
    animation: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.water-cup.filled .water-wave {
    opacity: 1;
    animation: wave 2.5s ease-in-out infinite;
}

/* 水面光泽 */
.water-cup.filled .water-fill::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 20%;
    width: 22%;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: shimmer 2s ease-in-out infinite;
    z-index: 3;
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0) scaleY(1);
    }
    50% {
        transform: translateX(8px) scaleY(1.03);
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(0);
    }
    50% {
        opacity: 0.7;
        transform: translateX(4px);
    }
}

/* 点击涟漪效果 */
.water-cup.ripple {
    animation: cupRipple 0.5s ease-out;
}

@keyframes cupRipple {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* 日历样式 */
#calendar-grid > div {
    min-height: 40px;
    font-size: 14px;
}

#calendar-grid > div:hover:not(:empty) {
    background-color: rgba(27, 108, 179, 0.15);
    transform: scale(1.05);
}

/* 今日小猫动画 */
#calendar-grid > div .text-2xl {
    animation: catBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(27, 108, 179, 0.3));
}

@keyframes catBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* 计划页面样式 */
#today-plan-page, #month-plan-page {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 任务列表复选框 */
input[type="checkbox"] {
    accent-color: #1B6CB3;
}
