:root {
    --bg-color: white;
    --text-color: black;
    --tab-bg-color: #ddd;
    --tab-hover-color: #bbb;
    --button-bg-color: #f0f0f0;
    --button-text-color: #333;
    --hint-bg-color: rgba(0, 0, 0, 0.7);
    --hint-text-color: white;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #2d2e32;
        --text-color: white;
        --tab-bg-color: #171717;
        --tab-hover-color: #333333;
        --button-bg-color: #3b3b3b;
        --button-text-color: #aaaaaa;
        --hint-bg-color: rgba(255, 255, 255, 0.7);
        --hint-text-color: black;
    }
}

#fullscreen-hint {
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--hint-bg-color);
    color: var(--hint-text-color);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    opacity: 1;
    transition: opacity 1s ease-out;
    z-index: 1000;
}

body {
    font-size: 2.5em;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    transition: background-color 0.5s, color 0.5s;
}

.container {
    display: none;
}

.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.tabs {
    display: flex;
    justify-content: center;
    background-color: var(--tab-bg-color);
    cursor: pointer;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.5s;
}

.tab {
    padding: 20px;
    margin: 0 10px;
    font-size: 1em;
}

.tab:hover {
    background-color: var(--tab-hover-color);
}

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

.button {
    margin-top: 20px;
    padding: 20px;
    font-size: 1em;
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none;
    transition: background-color 0.5s, color 0.5s;
}

.countdown-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    font-size: 1.5em;
    flex-wrap: wrap; /* 允许换行以适应小屏幕 */
}

.countdown-inputs label {
    margin: 0 5px;
}

input[type='number'] {
    font-size: 1.5em;
    padding: 10px;
    width: 200px;
    margin: 10px; /* 修改为相对单位 */
    text-align: center;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.flash {
    animation: flash 0.5s infinite alternate;
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

#countdown {
    font-size: 2.5em;
}

h1, h2, p {
    width: 100%;
    text-align: center;
    font-size: 1em;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.timezone-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    font-size: 1em;
}

.timezone-container label {
    font-size: 1em;
}

.timezone-container select {
    font-size: 1em;
    padding: 10px;
    margin-left: 10px;
    text-align: center;
    text-align-last: center; /* For Firefox and modern versions of Chrome */
}

#theme-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
}

#theme-toggle.sun {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2ZmYjMxOCIgZD0iTTExIDEuMDVWMGgxdi4wNUExMSAxMSAwIDAgMCAxMiAwYzIuNjM3IDAgNS4xOTIuOTY4IDcuMTI5IDIuNzAzbC40MTktLjQxOSAxLjQxMSAxLjQxMS0uNDE5LjQxQTEwLjk3MyAxMC45NzMgMCAwIDAgMjIgMTJhMTEgMTEgMCAxIDAtMTIgMCAxMSAxMSAwIDAgMCAwLTJWN2gtMS4wNXYuMDVBMTEgMTEgMCAwIDAgMTIgNGMtMi42MzcgMC01LjE5Mi45NjgtNy4xMjkgMi43MDNsLS40MTktLjQxOS0xLjQxMSAxLjQxMS40MTkuNDFBMTAgMTAgMCAwIDAgNCAxMmExMCAxMCAwIDAgMCA5Ljk0NSAzLjU5OGwtLjQxOS40MTktMS40MTEtMS40MTEuNDE5LS40MDFBMTAgMTAgMCAwIDAgMTIgNEwxMSAxLjA1eiIvPjwvc3ZnPg==');
}

#theme-toggle.moon {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2ZmZjA2NiIgZD0iTTExIDEuMDVWMGgxdi4wNUExMSAxMSAwIDAgMCAxMiAwYzIuNjM3IDAgNS4xOTIuOTY4IDcuMTI5IDIuNzAzbC40MTktLjQxOSAxLjQxMSAxLjQxMS0uNDE5LjQxQTEwLjk3MyAxMC45NzMgMCAwIDAgMjIgMTJhMTEgMTEgMCAxIDAtMTIgMCAxMSAxMSAwIDAgMCAwLTJWN2gtMS4wNXYuMDVBMTEgMTEgMCAwIDAgMTIgNGMtMi42MzcgMC01LjE5Mi45NjgtNy4xMjkgMi43MDNsLS40MTktLjQxOS0xLjQxMSAxLjQxMS40MTkuNDFBMTAgMTAgMCAwIDAgNCAxMmExMCAxMCAwIDAgMCA5Ljk0NSAzLjU5OGwtLjQxOS40MTktMS40MTEtMS40MTEuNDE5LS40MDFBMTAgMTAgMCAwIDAgMTIgNEwxMSAxLjA1eiIvPjwvc3ZnPg==');
}

/* 全局样式，默认设置所有元素的文本不可选中 */
* {
    -webkit-user-select: none;  /* Chrome, Safari, Opera */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* Internet Explorer/Edge */
    user-select: none;          /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

/* 设置倒计时的编辑框可选中 */
input[type='number'] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* 响应式设计 */
@media only screen and (max-width: 600px), (orientation: portrait) and (min-width: 600px) and (max-width: 1024px) {
    body {
        font-size: 1.5em;
    }
    .tab {
        padding: 10px;
        margin: 0 5px;
        font-size: 0.8em;
    }
    .button {
        margin-top: 10px;
        padding: 10px;
        font-size: 0.8em;
    }
    .countdown-inputs {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .countdown-inputs label {
        font-size: 0.8em;
        margin: 5px 0;
    }
    input[type='number'] {
        font-size: 1.2em;
        padding: 8px;
        width: 100px;
        margin: 5px;
    }
    #countdown {
        font-size: 1.5em;
    }
    .timezone-container {
        flex-direction: column;
        align-items: center;
    }
    .timezone-container label {
        font-size: 0.8em;
        margin-bottom: 5px;
    }
    .timezone-container select {
        font-size: 0.8em;
        padding: 8px;
    }
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
