/* ========== 公共样式 ========== */
/* 所有页面共享的基础样式 */

/* 汇文明朝体字体定义 - 使用子集字体（2.5M vs 42M） */
@font-face {
    font-family: 'HuiwenMingchao';
    src: url('../assets/fonts/huiwen-zhanzhan456-subset.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* CSS 变量定义 */
:root {
    --ink-black: #000000;
    --ink-dark: #333333;
    --ink-medium: #666666;
    --ink-light: #cccccc;
    --paper-white: #fffcf5;
    --paper-aged: #f5f5dc;
    --wuxing-wood: #008000;
    --wuxing-fire: #F44336;
    --wuxing-earth: #704214;
    --wuxing-metal: #FF9800;
    --wuxing-water: #0000ff;
    --font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 基础样式 */
* {
    box-sizing: border-box;
    font-family: var(--font-family);
}

html {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--paper-white);
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* 页面标题 */
.page-title {
    font-size: 21px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 15px 0;
    letter-spacing: 2px;
    text-shadow: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 时间输入区域 - 统一样式 */
.time-input-section {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 15px 0;
}

.time-inputs-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.time-input-row {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.time-input-row label {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    min-width: 40px;
    text-align: right;
    font-family: var(--font-family);
}

.time-input-row select,
.time-input-row input {
    flex: 1;
    border: 1px solid #c4b5a0;
    border-radius: 4px;
    background: var(--paper-white);
    padding: 4px 10px;
    font-size: 12px;
    font-family: var(--font-family);
    height: 35px;
    text-align: center;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

/* 隐藏数字输入框的上下箭头 */
.time-input-row input[type="number"]::-webkit-outer-spin-button,
.time-input-row input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.time-input-row select:focus,
.time-input-row input:focus {
    outline: none;
    border-color: #c4b5a0;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

/* 模式切换按钮 */
.mode-btn {
    background: none;
    color: #333;
    border: none;
    padding: 0;
    margin: 0 8px;
    cursor: pointer;
    font-size: 11px;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.mode-btn:hover {
    color: #000;
}

/* 时辰调整按钮 */
.time-adjust-btn {
    background-color: transparent;
    color: #333;
    border: none;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    font-family: var(--font-family);
    transition: all 0.3s ease;
    min-width: 20px;
    height: 18px;
    line-height: 18px;
}

.time-adjust-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.time-adjust-btn:active {
    transform: translateY(0);
    background-color: #e0e0e0;
}

/* 四课顺序切换按钮 */
.sike-order-toggle {
    display: flex;
    justify-content: center;
}

/* 昼·夜模式神将颜色样式 */
.day-shenjiang.贵人, .night-shenjiang.贵人 { color: var(--wuxing-earth) !important; }
.day-shenjiang.腾蛇, .night-shenjiang.腾蛇 { color: var(--wuxing-fire) !important; }
.day-shenjiang.朱雀, .night-shenjiang.朱雀 { color: var(--wuxing-fire) !important; }
.day-shenjiang.六合, .night-shenjiang.六合 { color: var(--wuxing-wood) !important; }
.day-shenjiang.勾陈, .night-shenjiang.勾陈 { color: var(--wuxing-earth) !important; }
.day-shenjiang.青龙, .night-shenjiang.青龙 { color: var(--wuxing-wood) !important; }
.day-shenjiang.天空, .night-shenjiang.天空 { color: var(--wuxing-earth) !important; }
.day-shenjiang.白虎, .night-shenjiang.白虎 { color: var(--wuxing-metal) !important; }
.day-shenjiang.太常, .night-shenjiang.太常 { color: var(--wuxing-earth) !important; }
.day-shenjiang.玄武, .night-shenjiang.玄武 { color: var(--wuxing-water) !important; }
.day-shenjiang.太阴, .night-shenjiang.太阴 { color: var(--wuxing-metal) !important; }
.day-shenjiang.天后, .night-shenjiang.天后 { color: var(--wuxing-water) !important; }

/* 课式信息相关样式 */
.course-type-overlay .course-book {
    font-size: 14px;
    cursor: pointer;
    margin-top: 4px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.course-type-overlay .course-book:hover {
    opacity: 1;
}

/* 极小屏幕时调整 */
@media (max-width: 380px) {
    .time-adjust-btn {
        padding: 1px 3px;
        font-size: 9px;
        min-width: 18px;
        height: 16px;
        line-height: 16px;
    }
}
