/* 重置默认样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #000; /* 默认背景颜色为黑色 */
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    position: relative; /* 为全屏按钮定位提供参考 */
    transition: background 0.3s;
}

.clock-container {
    text-align: center;
    margin-bottom: 30px;
}

#clock {
    font-size: 100px;
    color: #fff;
    transition: color 0.3s, background-color 0.3s, font-size 0.3s;
}

#fullscreenBtn {
    position: fixed; /* 固定定位 */
    bottom: 20px; /* 距离底部20px */
    right: 20px; /* 距离右侧20px */
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

#fullscreenBtn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.settings-container {
    text-align: center;
}

#settingsBtn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

#settingsBtn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.settings-panel {
    display: none;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    margin-top: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-in-out;
}

.settings-panel.open {
    display: block;
}

.control-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.control-group label {
    margin-right: 10px;
    color: #fff;
    min-width: 100px;
    text-align: right;
}

.control-group input[type="color"] {
    flex: 1;
}

.control-group input[type="range"] {
    flex: 1;
}

#fontSizeValue {
    margin-left: 10px;
    color: #fff;
}

#resetBtn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

#resetBtn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 500px) {
    #clock {
        font-size: 60px;
    }

    #fullscreenBtn,
    #settingsBtn,
    #resetBtn {
        padding: 8px 12px;
    }

    .settings-panel {
        max-width: 300px;
    }

    .control-group label {
        min-width: 80px;
    }
}