* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    background: #F5F5F0; /* Kindle 纸张色 */
    min-height: 100vh;
    font-family: -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    color: #1A1A1A; /* 深灰色文字，高对比 */
}

#container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 50px 45px;
    border-radius: 0; /* 平面化，无圆角 */
    background-color: #FFFFFF; /* 纯白背景 */
    box-shadow: none; /* 去除阴影 */
    border: 2px solid #000000; /* 黑色边框，高对比 */
}

h1 { 
    margin: 0 0 20px 0; 
    text-align: center;
    font-size: 32px;
    font-weight: 700; /* 加粗，高对比 */
    color: #000000; /* 纯黑 */
    letter-spacing: 1px;
    text-transform: uppercase; /* 大写，更有质感 */
}

h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700; /* 加粗 */
    color: #000000; /* 纯黑 */
    /* border-bottom: 1px solid #CCCCCC; /* 粗黑边框 */
    padding-bottom: 10px;
    text-transform: uppercase;
}

article { 
    font-size: 16px; 
    color: #333333; /* 深灰 */
    line-height: 1.8;
    text-align: center;
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 2px solid #000000; /* 黑色边框 */
}

.section {
    margin-bottom: 10px;
    /*border: 1px solid #CCCCCC; /* 浅灰边框 */
    padding: 25px;
    background: #FFFFFF;
}

.info-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column; /* 垂直布局，label 在上，span 在下 */
    align-items: flex-start; /* 左对齐 */
    justify-content: flex-start;
    gap: 10px; /* 增加间距 */
    font-size: 16px;
    line-height: 1.5;
    padding: 15px;
    border: 2px solid #000000;
}

.info-item label {
    color: #000000; /* 纯黑 */
    font-weight: 700; /* 加粗 */
    margin: 0;
    line-height: 1.5;
    display: block; /* 块级元素，独占一行 */
    width: 100%;
}

.info-item span {
    color: #000000; /* 纯黑 */
    font-family: 'Courier New', monospace;
    font-weight: 700; /* 加粗 */
    margin: 0;
    line-height: 1.5;
    display: block; /* 块级元素，独占一行 */
    width: 100%;
}

/* 无边框的 info-item（用于倒计时部分） */
.info-item-no-border {
    border: none !important;
    padding: 0;
    background: transparent;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 时间戳转换部分在宽屏上水平布局 */
@media (min-width: 900px) {
    .section:nth-of-type(2) .input-row {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .section:nth-of-type(2) .input-group:first-child {
        flex: 2;
        min-width: 300px;
    }
    
    .section:nth-of-type(2) .input-group:nth-child(2) {
        flex: 1;
        min-width: 200px;
    }
    
    .section:nth-of-type(2) .input-group:nth-child(3) {
        flex: 1;
        min-width: 150px;
    }
    
    /* 倒计时部分在宽屏上水平布局 */
    .section:nth-of-type(4) .input-row {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .section:nth-of-type(4) .input-group {
        flex: 0 0 auto;
        min-width: 120px;
        margin-right: 15px;
    }
    
    .section:nth-of-type(4) .info-item {
        flex: 0 0 auto;
        margin-top: 0;
        display: flex;
        flex-direction: row; /* 倒计时部分保持水平布局 */
        align-items: center;
        justify-content: center;
        height: 100%;
        gap: 8px;
    }
    
    .section:nth-of-type(4) .info-item label,
    .section:nth-of-type(4) .info-item span {
        display: inline-flex;
        align-items: center;
        width: auto;
    }
}

/* 倒计时部分：label 和 select 在同一行（所有屏幕尺寸） */
.section:nth-of-type(4) .input-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.section:nth-of-type(4) .input-group label {
    margin-bottom: 0;
    white-space: nowrap;
}

.section:nth-of-type(4) .input-group select {
    flex: 1;
    min-width: 80px;
}

/* 倒计时天数显示样式 */
#days-count {
    font-size: 32px; /* 更大字体 */
    font-weight: 900; /* 超粗 */
    color: #000000; /* 纯黑，高对比 */
    font-family: 'Courier New', monospace;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.input-group label {
    color: #000000; /* 纯黑 */
    font-size: 16px;
    font-weight: 700; /* 加粗 */
}

.input-group input,
.input-group select {
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #000000; /* 黑色边框 */
    border-radius: 0; /* 平面化，无圆角 */
    background-color: #FFFFFF; /* 纯白背景 */
    color: #000000; /* 黑色文字 */
    transition: none; /* 去除过渡效果 */
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #000000; /* 保持黑色 */
    background-color: #F5F5F0; /* 浅灰背景 */
    box-shadow: none; /* 去除阴影 */
}

.quick-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.quick-btn {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #000000; /* 黑色背景 */
    color: #FFFFFF; /* 白色文字 */
    border: 2px solid #000000; /* 黑色边框 */
    border-radius: 0; /* 平面化 */
    cursor: pointer;
    transition: none; /* 去除过渡 */
    font-weight: 700; /* 加粗 */
    text-transform: uppercase; /* 大写 */
}

.quick-btn:hover {
    background-color: #333333; /* 深灰 */
    color: #FFFFFF;
    box-shadow: none; /* 去除阴影 */
}

.quick-btn:active {
    background-color: #000000;
    transform: none; /* 去除变换 */
}

.timezone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.timezone-item {
    padding: 15px;
    background-color: #FFFFFF; /* 纯白背景 */
    border-radius: 0; /* 平面化 */
    border: 2px solid #000000; /* 黑色边框 */
}

.timezone-item label {
    display: block;
    font-size: 12px;
    color: #666666; /* 中灰 */
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.timezone-item .time-value {
    font-size: 14px; /* 减小字体 */
    color: #000000; /* 纯黑 */
    font-family: 'Courier New', monospace;
    font-weight: 700; /* 加粗 */
}

/* 白天样式：底部边框为橘色 */
.timezone-item.daytime {
    border-bottom: 4px solid #FF8C00; /* 橘色 */
}

/* 黑夜样式：底部边框为蓝色 */
.timezone-item.nighttime {
    border-bottom: 4px solid #4169E1; /* 蓝色 */
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    background-color: #FFFFFF; /* 纯白背景 */
    border-radius: 0; /* 平面化 */
    border: 2px solid #000000; /* 黑色边框 */
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 16px;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item label {
    color: #000000; /* 纯黑 */
    font-weight: 700; /* 加粗 */
    min-width: 100px;
}

.result-item span {
    color: #000000; /* 纯黑 */
    font-family: 'Courier New', monospace;
    font-weight: 700; /* 加粗 */
}

.progress-container {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: #E0E0E0; /* 浅灰背景 */
    border-radius: 0; /* 平面化 */
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid #000000; /* 黑色边框 */
}

.progress-bar-fill {
    height: 100%;
    background-color: #000000; /* 黑色填充 */
    transition: width 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF; /* 白色文字 */
    font-size: 14px;
    font-weight: 700; /* 加粗 */
}

.progress-text {
    text-align: center;
    font-size: 16px;
    color: #000000; /* 纯黑 */
    font-weight: 700; /* 加粗 */
}

.progress-text span {
    color: #000000; /* 纯黑 */
    font-weight: 900; /* 超粗 */
}

footer {
    margin-top: 20px;
    padding: 20px 0;
    text-align: center;
}

footer a {
    opacity: 0.8;
    transition: none; /* 去除过渡 */
}

footer a:hover {
    opacity: 1;
}

footer img {
    filter: grayscale(100%) contrast(200%); /* 黑白高对比 */
    transition: none; /* 去除过渡 */
}

footer a:hover img {
    filter: grayscale(100%) contrast(200%); /* 保持黑白 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    #container {
        padding: 30px 20px;
        border-width: 1px; /* 窄屏时边框稍细 */
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .section {
        padding: 15px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .timezone-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-buttons {
        justify-content: center;
    }
}
