/* ============================================================
   共用样式文件 css/style.css
   适用于 导航链接.html 和 小洋哥.html
   ============================================================ */

/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    padding: 0;
    margin: 0;
}

/* ===== 外层容器：最大宽度100% ===== */
.app {
    max-width: 100%;
    width: 100%;
    background: #ffffff;
    padding: 0px 0px 0px;
    position: relative;
    margin: 0 auto;
}

/* ===== 固定顶部区域 ===== */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    padding-top: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ===== LOGO 行：黑色背景，高30px，全屏宽，固定顶部 ===== */
.header-wrapper {
    width: 100%;
    background: #023b95;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding-left: 5px;
    padding-right: 5px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 30px;
    background: #023b95;
    padding: 0 12px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.header a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
}

.header img {
    height: 28px;
    width: auto;
    display: block;
}

.header .nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header .nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.header .nav-links a:hover {
    opacity: 1;
}

/* 主容器 */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 16px 24px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}
/* ===== 占位，防止固定区域遮挡内容 ===== */
.fixed-placeholder {
    height: 186px;
}

/* ===== 固定区域（结果框 + 功能栏） ===== */
.fixed-area {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 100;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 12px 16px 8px;
}

/* 结果显示框 */
.result-box {
    width: 720px;
    height: 80px;
    padding: 12px 16px;
    border: 2px solid #023b95;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    background: #f8f9fa;
    text-align: left;
    line-height: 1.5;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: normal;
    box-shadow: 0 2px 8px rgba(0, 182, 0, 0.10);
    margin: 0 auto;
}

/* 波色数字颜色 */
.red-number { color: #e74c3c; font-weight: 680; }
.blue-number { color: #3498db; font-weight: 680; }
.green-number { color: #2ecc71; font-weight: 680; }

/* ===== 功能栏 ===== */
.action-bar {
    background: #ffffff;
    padding: 8px 0 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-bar .button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-bar button {
    padding: 8px 20px;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #e0e4e8;
    color: #1e2a3a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.action-bar button:active {
    transform: scale(0.96);
}

#clearBtn {
    background: #e74c3c;
    color: white;
}

#copyBtn {
    background: #2ecc71;
    color: white;
}

/* 号码数量显示 */
.result-count-inline {
    font-size: 14px;
    font-weight: 680;
    color: #1e2a3a;
    text-align: center;
    padding: 6px 12px;
    background: #ecf0f1;
    border-radius: 40px;
    border: 1px solid #023b95;
    display: inline-block;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ===== 分类按钮通用样式 ===== */
.zodiac-attribute-group {
    background: #ffffff;
    margin-bottom: 8px;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 4px;
}

.category-btn {
    background: #f0f3f7;
    color: #023b95;
    border: 2px solid #023b95;
    padding: 6px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 16px;
    font-weight: 680;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    flex: 1 0 auto;
    min-width: 50px;
}

.category-btn:hover {
    background: #dde4eb;
    transform: translateY(-1px);
}

.category-btn.active {
    background: #023b95;
    color: white;
    border-color: #023b95;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 182, 0, 0.2);
}

/* ===== 行布局 ===== */
.zodiac-attribute-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.zodiac-attribute-row .zodiac-attribute-group {
    flex: 1 1 auto;
    min-width: auto;
    margin-bottom: 0;
}

/* ===== 单双大小合单合双一行显示 ===== */
#oddEven.category-buttons,
#sizeNumbers.category-buttons,
#sumOddEven.category-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: center;
}

#oddEven .category-btn,
#sizeNumbers .category-btn,
#sumOddEven .category-btn {
    flex: 1;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 大小单双一行显示 ===== */
#sizeCategory.category-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: center;
}

#sizeCategory .category-btn {
    flex: 1;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 生肖特殊布局：2行 × 6列 ===== */
#zodiac.category-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

#zodiac .category-btn {
    flex: none;
    min-width: auto;
    padding: 6px 4px;
    font-size: 18px;
}

/* ===== 头数布局：2行 × 5列 ===== */
#headNumbers.category-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

#headNumbers .category-btn {
    flex: none;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 尾数布局：2行 × 5列 ===== */
#lastDigits.category-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

#lastDigits .category-btn {
    flex: none;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 波色一行显示 ===== */
#waveColor.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

#waveColor .category-btn {
    flex: 1 0 auto;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 波色单双一行显示 ===== */
#colorOddEven.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

#colorOddEven .category-btn {
    flex: 1 0 auto;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 波色细分类二行显示 ===== */
#redWave.category-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

#redWave .category-btn {
    flex: none;
    min-width: auto;
    padding: 6px 4px;
    font-size: 13px;
}

/* ===== 五行一行显示 ===== */
#fiveElements.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

#fiveElements .category-btn {
    flex: 1 0 auto;
    min-width: auto;
    padding: 4px 2px;
    font-size: 16px;
}

/* ===== 门数一行显示 ===== */
#doorNumbers.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

#doorNumbers .category-btn {
    flex: 1 0 auto;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 段数布局：一行7个 ===== */
#segmentNumbers.category-buttons {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

#segmentNumbers .category-btn {
    flex: none;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 合数布局：一行5个 ===== */
#sumNumbers.category-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

#sumNumbers .category-btn {
    flex: none;
    min-width: auto;
    padding: 6px 4px;
    font-size: 16px;
}

/* ===== 生肖属性每行6个布局 ===== */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 4px 0;
}

.zodiac-grid .zodiac-attribute-buttons {
    display: flex;
    gap: 4px;
    background: #ffffff;
    flex-direction: row;
    padding: 2px;
}

.zodiac-grid .zodiac-attribute-btn {
    background: #f0f3f7;
    color: #023b95;
    border: 2px solid #023b95;
    padding: 6px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 16px;
    font-weight: 680;
    text-align: center;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.zodiac-grid .zodiac-attribute-btn:hover {
    background: #dde4eb;
    transform: translateY(-1px);
}

.zodiac-grid .zodiac-attribute-btn.active {
    background: #023b95;
    color: white;
    border-color: #023b95;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 182, 0, 0.2);
}

/* ===== 选择信息显示 ===== */
.selection-info {
    text-align: center;
    margin: 14px 0 10px;
    color: #023b95;
    font-weight: 680;
    font-size: 16px;
    padding: 10px 12px;
    background: #ecf0f1;
    border-radius: 40px;
    border: 1px solid #023b95;
    word-break: break-word;
}

/* ===== 底部 ===== */
.footer {
    margin-top: 14px;
    font-size: 12px;
    color: #8a9a8a;
    text-align: center;
    border-top: 1px solid #e8ece8;
    padding-top: 12px;
}
.footer img {
    display: block;
    margin: 4px auto 0;
    height: 18px;
    width: auto;
}


/* 手机适配 */
@media (max-width: 650px) {
    .app { padding: 0px 0px 0px; }
    .header {
        padding: 0 5px;
        max-width: 720px;
    }
    .header img {
        height: 26px;
    }
    .header .nav-links a {
        font-size: 18px;
    }
    .header .nav-links {
        gap: 10px;
    }
	    .result-box {
        width: 100%;
        max-width: calc(100% - 24px);
        height: 80px;
        font-size: 13px;
        padding: 10px 12px;
    }
	    .fixed-area {
        width: 100%;
        max-width: 100%;
        top: 30px;
        padding: 10px 12px 6px;
    }
}