/* ================== 默认样式 (电脑端) ================== */
body {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Noto Sans SC', sans-serif;
    color: #333;
    padding: 20px; /* 为小屏幕增加一些边距 */
    box-sizing: border-box; /* 确保内边距不会撑大body */
}

.countdown-container {
    text-align: center;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 40px;
    transition: font-size 0.3s ease; /* 平滑过渡效果 */
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    transition: gap 0.3s ease; /* 平滑过渡效果 */
}

.time-block {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    transition: padding 0.3s ease, min-width 0.3s ease; /* 平滑过渡效果 */
}

.time-block span:first-child {
    font-family: 'Roboto Mono', monospace;
    font-size: 5rem;
    font-weight: 700;
    color: #1a73e8;
    line-height: 1.2;
    transition: font-size 0.3s ease; /* 平滑过渡效果 */
}

.label {
    font-size: 1rem;
    color: #666;
    margin-top: 10px;
    transition: font-size 0.3s ease; /* 平滑过渡效果 */
}

#countdown.finished {
    font-size: 4rem;
    color: #e84118;
    font-weight: bold;
}

/* ================== 媒体查询 (手机端) ================== */
/* 当屏幕宽度小于等于 768px 时，应用以下样式 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem; /* 手机上标题小一点 */
        margin-bottom: 30px;
    }

    .countdown {
        gap: 10px; /* 数字之间的间距小一点 */
    }

    .time-block {
        min-width: auto; /* 取消最小宽度限制 */
        padding: 15px; /* 内边距小一点 */
    }

    .time-block span:first-child {
        font-size: 2.5rem; /* 手机上数字小一点 */
    }

    .label {
        font-size: 0.8rem; /* 标签文字也小一点 */
    }

    #countdown.finished {
        font-size: 2.5rem; /* 结束语也小一点 */
    }
}

/* 当屏幕宽度小于等于 480px 时 (更小的手机)，进一步调整 */
@media (max-width: 480px) {
    .countdown {
        /* 如果空间实在不够，可以考虑纵向排列，但目前的设计横向也够 */
        /* flex-direction: column; */
        /* gap: 15px; */
    }

    .time-block {
        padding: 15px 10px; /* 左右边距更小 */
    }

    .time-block span:first-child {
        font-size: 2rem; /* 数字再小一点 */
    }
}
