
:root {
    --bg-light: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --container-light: rgba(255, 255, 255, 0.9);
    --text-light: #333;
    --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.1);
    --status-light: #f0f0f0;

    --bg-dark: linear-gradient(135deg, #2b2e4a 0%, #222831 100%);
    --container-dark: rgba(34, 40, 49, 0.9);
    --text-dark: #eeeeee;
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.6);
    --status-dark: #393e46;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-light);
    background: var(--bg-light);
    transition: background 0.3s, color 0.3s;
    position: relative;
}

/* 主题切换按钮样式 */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #4f46e5;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    z-index: 1100;
}

.theme-toggle:hover {
    background-color: #4338ca;
    transform: scale(1.05);
}

.container {
    background-color: var(--container-light);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    text-align: center;
    max-width: 90%;
    width: 400px;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
    perspective: 1000px; /* 保留原有的透视效果 */
    animation: fadeIn 0.5s ease-out forwards;
}

h1 {
    color: var(--text-light);
    margin-bottom: 1rem;
    transition: color 0.3s;
    opacity: 0;
    transform: translateY(-20px);
    animation: slideIn 0.5s ease-out forwards 0.3s;
}

h3 {
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInUp 0.5s ease-out forwards 0.4s;
}

.status {
    font-size: 2rem;
    font-weight: bold;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 10px;
    background-color: var(--status-light);
    transition: background-color 0.3s, transform 0.3s;
    opacity: 0;
    transform: scale(0.95);
    animation: popIn 0.5s ease-out forwards 0.5s;
}

.times {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards 0.7s;
}

.emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: scale(0.8);
    animation: emojiEnter 0.5s ease-out forwards 0.4s;
}

.time-description {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.dark-mode {
    color: var(--text-dark);
    background: var(--bg-dark);
}

.dark-mode .container {
    background-color: var(--container-dark);
    box-shadow: var(--shadow-dark);
}

.dark-mode h1 {
    color: var(--text-dark);
}

.dark-mode h3 {
    color: var(--text-dark);
}

.dark-mode .status {
    background-color: var(--status-dark);
}

.dark-mode .time-description {
    color: #9ca3af;
}

/* 新增的样式 */
#countdown {
    margin-top: 1rem;
    font-size: 1rem;
    color: #6b7280;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards 0.6s;
}

/* 移除 .blink 类和相关动画 */

#viewStatusTable {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background-color: #4f46e5;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards 0.8s;
}

#viewStatusTable:hover {
    background-color: #4338ca;
    transform: scale(1.05);
}

/* Modal样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed; /* 固定定位 */
    z-index: 1000; /* 层级较高 */
    left: 0;
    top: 0;
    width: 100%; /* 全宽 */
    height: 100%; /* 全高 */
    overflow: auto; /* 滚动 */
    background-color: rgba(0,0,0,0.5); /* 半透明背景 */
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.modal.show {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease-out forwards;
}

.modal.hide {
    opacity: 0;
    animation: fadeOut 0.3s ease-out forwards;
}

.modal-content {
    background-color: var(--container-light);
    margin: 10% auto; /* 上边距10%，水平居中 */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* 宽度80% */
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    position: relative;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
    animation: modalOpen 0.3s ease-out forwards; /* 保留进入动画 */
    transform: scale(0.8);
    opacity: 0;
}

.dark-mode .modal-content {
    background-color: var(--container-dark);
    box-shadow: var(--shadow-dark);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* 动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes emojiEnter {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes modalOpen {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes modalClose {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.8); }
}

/* 卡片过渡效果和透视 */
.card {
    transition: transform 0.1s ease-out;
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    h1 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1rem;
    }
    .status {
        font-size: 1.5rem;
    }
    .description {
        margin-top: 0.5rem;
        font-size: 0.875rem;
        color: #6b7280;
    }
    .modal-content {
        width: 95%;
    }
}

/* 弹窗关闭动画 */
.modal-content.close-animation {
    animation: modalClose 0.3s ease-out forwards;
}

/* 表格样式调整 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #4f46e5;
    color: white;
}

tr:nth-child(even){background-color: #f2f2f2;}

tr:hover {background-color: #ddd;}

/* 表格行渐入动画 */
@keyframes rowFadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in-row {
    animation: rowFadeIn 0.5s forwards;
}
