/* 数字时钟样式 */
:root {
    --bg-color-light: #f8f9fa;
    --text-color-light: #333;
    --clock-bg-light: #fff;
    --clock-shadow-light: 0 5px 25px rgba(0, 0, 0, 0.1);
    --control-bg-light: #f1f3f5;
    --control-hover-light: #e9ecef;
    
    --bg-color-dark: #121212;
    --text-color-dark: #f8f9fa;
    --clock-bg-dark: #1e1e1e;
    --clock-shadow-dark: 0 5px 25px rgba(0, 0, 0, 0.5);
    --control-bg-dark: #2d2d2d;
    --control-hover-dark: #3d3d3d;
}

/* 浅色模式 */
body.light-mode {
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
}

body.light-mode .clock-container {
    background-color: var(--clock-bg-light);
    box-shadow: var(--clock-shadow-light);
}

body.light-mode .control-btn {
    background-color: var(--control-bg-light);
    color: var(--text-color-light);
}

body.light-mode .control-btn:hover {
    background-color: var(--control-hover-light);
}

/* 深色模式 */
body.dark-mode {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

body.dark-mode header {
    background-color: #1a1a1a;
}

body.dark-mode nav {
    background-color: #1e1e1e;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.dark-mode nav ul li a {
    color: #f8f9fa;
}

body.dark-mode nav ul li a:hover, 
body.dark-mode nav ul li a.active {
    color: #007bff;
}

body.dark-mode .clock-container {
    background-color: var(--clock-bg-dark);
    box-shadow: var(--clock-shadow-dark);
}

body.dark-mode .control-btn {
    background-color: var(--control-bg-dark);
    color: var(--text-color-dark);
}

body.dark-mode .control-btn:hover {
    background-color: var(--control-hover-dark);
}

body.dark-mode .instruction-card,
body.dark-mode .tool-card {
    background-color: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode footer {
    background-color: #1a1a1a;
}

/* 时钟部分样式 */
.clock-section {
    margin: 30px 0;
}

.clock-container {
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.clock-display {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.time {
    font-size: 6rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.date {
    font-size: 1.5rem;
    margin-bottom: 5px;
    opacity: 0.8;
    transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease;
}

.date.hidden {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}

.period {
    font-size: 1.5rem;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0.7;
}

.period.hidden {
    display: none;
}

/* 控制按钮样式 */
.clock-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

.control-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* 指导卡片样式 */
.instruction-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.instruction-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.instruction-card ul {
    padding-left: 20px;
}

.instruction-card li {
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .time {
        font-size: 4rem;
    }
    
    .date {
        font-size: 1.2rem;
    }
    
    .period {
        font-size: 1.2rem;
        top: 10px;
        right: 10px;
    }
    
    .clock-controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .time {
        font-size: 3rem;
    }
    
    .date {
        font-size: 1rem;
    }
    
    .control-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .control-btn i {
        margin-right: 5px;
    }
}

/* 全屏模式 */
.fullscreen-mode .clock-display {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.fullscreen-mode .time {
    font-size: 10rem;
}

.fullscreen-mode .date {
    font-size: 2rem;
}

.fullscreen-mode .period {
    font-size: 2rem;
    top: 30px;
    right: 30px;
}
