/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    height: 100vh;
    overflow: hidden;
    color: white;
}

/* 移除按钮点击反馈 */
button {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* 背景容器 */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#background-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 内容样式 */
.content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    text-align: center;
}

/* 时钟样式 */
.digital-clock {
    font-size: 6rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.analog-clock {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 1rem;
    border: 8px solid white;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.clock-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.hand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.hour-hand {
    width: 6px;
    height: 60px;
    margin-left: -3px;
    margin-top: -60px;
}

.minute-hand {
    width: 4px;
    height: 80px;
    margin-left: -2px;
    margin-top: -80px;
}

.second-hand {
    width: 2px;
    height: 90px;
    margin-left: -1px;
    margin-top: -90px;
    background: #ff5e5e;
}

.pixel-clock {
    font-family: 'Courier New', monospace;
    font-size: 4rem;
    letter-spacing: 5px;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#quote-display {
    font-size: 1.5rem;
    max-width: 800px;
    min-height: 24px;
    line-height: 1.6;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    font-style: italic字体;
}

/* 玻璃按钮样式 */
.glass-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.glass-btn.small {
    padding: 5px 10px;
    font-size: 1rem;
}

/* 设置按钮 */
#settings-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* 环境音按钮 */
#ambience-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 10;
}

/* 设置面板 */
.glass-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h2 {
    font-weight: 300;
}

/* 标签页样式 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-btn {
    background: none;
    border: none;
    color: white;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    font-size: 1rem;
    margin-bottom: -1px;
}

.tab-btn.active {
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: white;
}

.tab-content {
    display: none;
    padding-bottom: 60px;
}

.tab-content.active {
    display: block;
}

/* 关于页面样式 */
.about-content {
    padding: 15px;
    line-height: 1.6;
}

.about-content p {
    margin-bottom: 10px;
}

.about-content ul {
    margin: 10px 0 20px 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.glass-input {
    width: 100%;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.glass-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

input[type="range"] {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin-top: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

/* 应用按钮容器 */
.apply-btn-container {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 20px 20px;
}

/* 环境音选项样式 */
/* 在原有CSS基础上添加以下内容 */

/* 修复音效卡片显示问题 */
.ambience-option {
    opacity: 1 !important; /* 确保卡片始终可见 */
    transition: all 0.3s ease;
    will-change: transform, background; /* 优化动画性能 */
}

/* 取消点击时的蓝色反馈 */
.ambience-option {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* 修复卡片布局问题 */
.ambience-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .ambience-options {
        grid-template-columns: 1fr;
    }
}

/* 确保音量滑块始终可见 */
.ambience-control {
    opacity: 1 !important;
    transition: opacity 0.2s ease;
}

/* 修复面板滚动问题 */
#ambience-panel {
    overscroll-behavior: contain; /* 防止滚动穿透 */
}

/* 修复卡片点击状态 */
.ambience-option:active {
    transform: scale(0.98);
}




    .ambience-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.ambience-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    backrop-filter: blur(5px);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ambience-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.ambience-option.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.ambience-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.ambience-icon svg {
    width: 24px;
    height: 24px;
}

.ambience-info {
    flex: 1;
    min-width: 0;
}

.ambience-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ambience-info p {
    font-size: 0.9rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ambience-control {
    width: 100px;
    margin-left: 15px;
}

.volume-slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin-top: 5px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .digital-clock, .pixel-clock {
        font-size: 4rem;
    }
    
    .analog-clock {
        width: 180px;
        height: 180px;
    }
    
    #quote-display {
        font-size: 1.2rem;
        max-width: 90%;
    }
    
    .glass-panel {
        width: 95%;
        padding: 15px;
    }
    
    #ambi关ence-btn {
        bottom: 10px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .digital-clock, .pixel-clock {
        font-size: 3rem;
    }
    
    .analog-clock {
        width: 160px;
        height: 160px;
        border-width: 6px;
    }
    
    #quote-display {
        font-size: 1rem;
    }
    
    .tabs {
        justify-content: space-between;
    }
    
    .tab-btn {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .ambience-option {
        flex-direction: column;
        text-align: center;
    }
    
    .ambience-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .ambience-control {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .hour-hand {
        width: 5px;
        height: 45px;
        margin-left: -2.5px;
        margin-top: -45px;
    }
    
    .minute-hand {
        width: 3px;
        height: 60px;
        margin-left: -1.5px;
        margin-top: -60px;
    }
    
    .second-hand {
        width: 2px;
        height: 70px;
        margin-left: -1px;
        margin-top: -70px;
    }
}