/* style.css */

/* 字体定义 */
.font-serif-title { font-family: 'Playfair Display', serif; }
.font-serif-text { font-family: 'Noto Serif SC', serif; }

/* 页面背景与全屏设置 */
body {
    margin: 0;
    padding: 0;
    background-color: #eef1f5;
    /* 背景图层叠：底层图片 + 两个光晕渐变 */
    background-image: 
        url('https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=80&w=2070&auto=format&fit=crop'),
        radial-gradient(circle at 20% 30%, rgba(196, 219, 236, 0.8) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(200, 210, 220, 0.6) 0%, transparent 50%);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    
    /* 核心适配：禁止滚动，高度占满视口 */
    height: 100dvh; 
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 玻璃卡片通用样式 */
.glass-card {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* 图标容器玻璃样式 */
.glass-icon-box {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    box-shadow: 0 4px 8px rgba(132, 149, 168, 0.15);
    width: 100%;
    height: 100%;
}

/* 日历单元格固定大小，防止错位 */
.calendar-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 18px; 
}

/* 自定义玻璃风格滚动条 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.05);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* 隐藏滚动条但允许滚动 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* 玻璃风格开关 */
.glass-toggle {
    width: 28px;
    height: 16px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(255, 255, 255, 0.5);
}

.glass-toggle::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

input:checked + .glass-toggle {
    background: rgba(251, 113, 133, 0.5); /* rose-400 with opacity */
    border-color: rgba(251, 113, 133, 0.3);
}

input:checked + .glass-toggle::after {
    transform: translateX(12px);
}

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 声波动画 */
.voice-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 12px;
}

.voice-bar {
    width: 2px;
    background-color: currentColor;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.voice-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.voice-bar:nth-child(2) { height: 10px; animation-delay: 0.1s; }
.voice-bar:nth-child(3) { height: 8px; animation-delay: 0.2s; }
.voice-bar:nth-child(4) { height: 12px; animation-delay: 0.3s; }
.voice-bar:nth-child(5) { height: 6px; animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* 打字中动画 */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px; /* 间距 4-6px */
    padding: 4px 2px;
}

.typing-dot {
    width: 7px; /* 直径 6-8px */
    height: 7px;
    background-color: rgba(150, 150, 150, 0.4); /* 柔和的浅灰带透明 */
    border-radius: 50%;
    backdrop-filter: blur(2px); /* 毛玻璃感 */
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6); /* 发光效果 */
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% { 
        transform: translateY(0); 
        opacity: 0.3;
    }
    40% { 
        transform: translateY(-4px); /* 上下浮动 3-4px */
        opacity: 0.8;
    }
}
