/* 基础重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
}

/* 视频背景容器 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 视频样式 */
#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* 渐变叠加层（增强文字可读性） */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
    z-index: -1;
}

/* 版权信息 */
.copyright {
    position: fixed;
    bottom: 10px;
    left: 20px; /* 从居中改为左侧对齐 */
    /* transform: translateX(-50%); 移除这个居中的变换 */
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 15px;
}

/* 垂直居中容器 */
.centered-container {
    position: relative;
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: white;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* 添加鼠标悬停效果 */
.centered-container:hover {
    transform: translateY(-5px);
}

/* 两行列布局容器 */
.grid-container {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 90%;
    max-width: 800px;
}

/* 网格项 */
.grid-item {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
    /* 设置最小高度以确保垂直居中效果明显 */
}

/* 为grid-container-3col中的grid-item添加特定样式 */
.grid-container-3col .grid-item {
    min-height: 150px;
    /* 可以根据需要调整高度 */
}

/* 添加这部分代码：去除grid-container-3col中链接的下划线 */
.grid-container-3col a {
    text-decoration: none;
    /* 去除下划线 */
    color: inherit;
    /* 保持与父元素相同的文字颜色 */
    display: block;
    /* 使整个区域可点击 */
}

.grid-item:hover {
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    body {
        gap: 20px;
        padding: 15px;
    }
}

/* 电子计算器风格时钟 */
.digital-clock {
    font-family: 'Orbitron', 'Courier New', monospace;
    font-size: 48px;
    font-weight: bold;
    color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 5px;
    letter-spacing: 2px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 350px; /* 设置固定宽度，确保所有数字组合都能容纳 */
    min-width: 350px; /* 设置最小宽度 */
    text-align: center;
    font-variant-numeric: tabular-nums; /* 使数字具有相同的宽度 */
    margin: 0 auto; /* 确保在父容器中水平居中 */
}

/* 包含时钟的网格项 - 增强居中效果 */
.grid-item:first-child {
    overflow: visible; /* 允许内容正常显示，而不是被隐藏 */
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
}

/* AM/PM角标样式 - 修改为与时间一起居中 */
.ampm-badge {
    font-size: 16px;
    font-weight: normal;
    margin-left: 8px;
    color: #FFFFFF;
    vertical-align: super;
}

/* 如果要使用外部字体，可以添加字体引入 */
@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 700;
    src: url(https://fonts.gstatic.com/s/orbitron/v25/yMJMMIlzdpvBhQQL_SC3X9yhF25-T1nyGy6BoWgz.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .digital-clock {
        font-size: 20px;
        padding: 8px 12px;
    }

    .ampm-badge {
        font-size: 10px;
        top: 3px;
        right: 8px;
    }
}

/* 日期和天气显示样式 */
#date-display {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

/* 农历日期显示样式 */
#lunar-date-display {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    white-space: pre-line; /* 允许文本中的换行符生效 */
    line-height: 1.6; /* 增加行高，使多行文本更易读 */
    text-align: left; /* 左对齐文本，使每行内容更清晰 */
}

#weather-display {
    font-size: 16px;
    color: white;
}

/* 三列网格布局容器 */
.grid-container-3col {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 90%;
    max-width: 800px;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid-container-3col {
        grid-template-columns: 1fr;
    }
}

/* 百分比进度条容器样式 */
.progress-bar-container {
    height: 20px;
    /* 减小柱状图高度 */
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    /* 相应调整圆角 */
    overflow: hidden;
    margin-top: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 百分比进度条样式 */
.progress-bar {
    height: 100%;
    background: #A0E5A0;
    /* 马卡龙绿色 */
    border-radius: 10px;
    transition: width 0.3s ease;
    position: absolute;
    left: 0;
    top: 0;
}

/* 月份进度条样式 - 使用马卡龙红色 */
.month-progress-bar {
    background: #FF9AA2;
    /* 马卡龙红色 */
}

/* 本周进度条样式 - 使用马卡龙蓝色 */
.week-progress-bar {
    background: #B5EAD7;
    /* 马卡龙蓝色 */
}

/* 今天进度条样式 - 使用马卡龙紫色 */
.day-progress-bar {
    background: #D8BFD8;
    /* 马卡龙紫色 */
}

/* 确保所有进度文本都有样式 */
#year-progress-text,
#month-progress-text,
#week-progress-text,
#day-progress-text {
    font-size: 14px;
    color: white;
    position: absolute;
    z-index: 1;
    margin: 0;
}

/* 周进度标签和百分比样式 */
#week-progress-label {
    position: relative;
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
    min-width: 80px;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

#week-progress-percentage {
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    left: 50%;
    transform: translateX(-50%);
}

/* 进度条容器样式 */
.progress-bar-container {
    height: 40px;
    /* 增加柱状图高度，从30px改为40px */
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* 百分比进度条容器样式 */
.progress-bar-container {
    height: 20px;
    /* 减小柱状图高度 */
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    /* 相应调整圆角 */
    overflow: hidden;
    margin-top: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 主内容容器样式 - 页面左侧对齐 */
.main {
    position: absolute;
    z-index: 10;
    left: 0;
    top: 20px;
    width: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 30px;
    padding: 20px;
}

/* DeepSeek聊天界面样式 */
#deepseek-chat-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    width: 80%;
    max-width: 1200px;
    height: 80%;
    max-height: 800px;
    z-index: 1000;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

#close-chat {
    background-color: #FF9AA2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#close-chat:hover {
    background-color: rgba(255, 68, 68, 1);
    transform: scale(1.05);
}

/* 调整消息区域高度计算 */
#chat-messages {
    padding: 15px;
    height: calc(100% - 130px); /* 从160px减小到130px，减少预留空间 */
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.1);
}

/* 调整输入区域内边距 */
.chat-input {
    padding: 10px 15px; /* 减小上下内边距，从15px改为10px */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

/* 可选：调整输入框和按钮的内边距，使整体更紧凑 */
#message-input {
    flex: 1;
    padding: 8px 10px; /* 从10px减小到8px */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* 添加这部分代码来移除默认选中效果并添加自定义样式 */
#message-input:focus {
    outline: none; /* 移除默认的选中轮廓 */
    border-color: rgba(76, 175, 80, 0.8); /* 选中时改变边框颜色 */
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); /* 添加轻微的阴影效果 */
    background-color: rgba(255, 255, 255, 1); /* 选中时背景色更不透明 */
}

#send-message {
    background-color: #A0E5A0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 15px; /* 从10px/20px减小到8px/15px */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

#send-message:hover {
    background-color: rgba(76, 175, 80, 1);
    transform: scale(1.05);
}

/* 遮罩层样式 */
#chat-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 999;
    transition: background-color 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #deepseek-chat-container {
        width: 95%;
        height: 90%;
    }
    
    .message {
        max-width: 90%;
    }
}

/* 基础消息样式 */
.message {
    margin-bottom: 10px;
    max-width: 70%;
    position: relative;
}

.message p {
    margin: 0;
    padding: 10px 12px;
    word-wrap: break-word;
    border-radius: 10px;
    line-height: 1.4;
    font-size: 14px;
}

/* 系统消息样式 - 左对齐，灰色气泡 */
.bot-message {
    align-self: flex-start;
}

.bot-message p {
    background-color: #FFFFFF;
    color: #333333;
    border-bottom-left-radius: 4px; /* 左下角稍微扁平，更像微信风格 */
}

/* 用户消息样式 - 右对齐，绿色气泡 */
.user-message {
    align-self: flex-end;
}

.user-message p {
    background-color: #A0E5A0;
    color: #FFFFFF;
    border-bottom-right-radius: 4px; /* 右下角稍微扁平，更像微信风格 */
}

/* 调整消息容器为flex布局 */
#chat-messages {
    padding: 15px;
    height: calc(100% - 130px);
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* 可选：添加消息时间戳 */
.message-time {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin: 5px 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .message {
        max-width: 85%;
    }
}

/* 炫酷加载界面样式 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 40px rgba(76, 175, 80, 0.4);
    }
}

/* 圆形动画加载指示器 */
.loading-circle-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.loading-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #4caf50;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.loading-circle-2 {
    width: 80px;
    height: 80px;
    top: 20px;
    left: 20px;
    border-top-color: #2196f3;
    animation-duration: 3s;
    animation-direction: reverse;
}

.loading-circle-3 {
    width: 50px;
    height: 50px;
    top: 35px;
    left: 35px;
    border-top-color: #ff9800;
    animation-duration: 4s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 进度条样式 */
.loading-progress-container {
    width: 300px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2196f3, #ff9800, #4caf50);
    background-size: 300% 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.loading-status {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    letter-spacing: 1px;
}

/* 主内容容器样式调整 */
.main-content {
    transition: opacity 0.5s ease;
}

/* 原有样式保持不变 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 其他原有CSS代码... */