* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #b8942a;
    --primary-dark: #9a7b1f;
    --secondary-color: #8b4513;
    --bg-dark: #e8edf5;
    --bg-card: #ffffff;
    --bg-card-light: #f5f7fb;
    --text-gold: #a07d1c;
    --text-light: #2d3748;
    --text-muted: #6b7280;
    --border-gold: #c9a227;
    --accent-red: #dc2626;
    --accent-purple: #7c3aed;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    margin-bottom: 10px;
    background: rgba(74, 111, 165, 0.08);
    border: 1px solid rgba(74, 111, 165, 0.15);
    border-radius: 20px;
    color: #4a6fa5;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.back-btn:hover {
    background: rgba(74, 111, 165, 0.15);
    border-color: rgba(74, 111, 165, 0.3);
}

.back-btn::before {
    content: "←";
    font-size: 1rem;
}

@font-face {
    font-family: 'Chinese';
    src: local('STKaiti'), local('KaiTi'), local('楷体');
}

body {
    font-family: 'Chinese', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at top, #dce4f2 0%, transparent 50%),
        radial-gradient(ellipse at bottom, #d5dff0 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234a6fa5' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 100vh;
    color: var(--text-light);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 50px 20px 30px;
    position: relative;
}

.header::before {
    content: "☯";
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.8;
}

.header h1 {
    font-size: 2.5rem;
    color: #3d5d8a;
    margin-bottom: 15px;
    letter-spacing: 8px;
    text-shadow: none;
}

.header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Decorative borders */
.decorative-border {
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    position: relative;
}

.decorative-border::before,
.decorative-border::after {
    content: "◈";
    position: absolute;
    color: var(--text-gold);
    font-size: 0.8rem;
}

.decorative-border::before {
    top: -8px;
    left: 20px;
    background: var(--bg-dark);
    padding: 0 5px;
}

.decorative-border::after {
    bottom: -8px;
    right: 20px;
    background: var(--bg-dark);
    padding: 0 5px;
}

/* Input Section */
.input-section {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-light) 100%);
    border: 1px solid rgba(74, 111, 165, 0.15);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(74, 111, 165, 0.1);
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
    justify-content: center;
}

.input-group label {
    font-weight: 600;
    color: var(--text-gold);
    display: block;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.input-group input {
    padding: 12px 16px;
    border: 1px solid rgba(74, 111, 165, 0.25);
    border-radius: 8px;
    font-size: 1rem;
    width: 200px;
    background: rgba(255,255,255,0.8);
    color: var(--text-light);
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 10px rgba(74, 111, 165, 0.2);
}

.btn {
    padding: 12px 35px;
    background: linear-gradient(135deg, #4a6fa5, #3d5d8a);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
    text-shadow: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74, 111, 165, 0.35);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 12px 28px;
    background: rgba(255,255,255,0.6);
    color: var(--text-muted);
    border: 1px solid rgba(74, 111, 165, 0.15);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.tab-btn:hover {
    border-color: #4a6fa5;
    color: #4a6fa5;
}

.tab-btn.active {
    background: linear-gradient(135deg, #4a6fa5, #3d5d8a);
    color: #fff;
    border-color: #4a6fa5;
    box-shadow: 0 4px 15px rgba(74, 111, 165, 0.3);
}

/* Result Sections */
.result-section {
    display: none;
}

.result-section.active {
    display: block;
}

.card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-light) 100%);
    border: 1px solid rgba(74, 111, 165, 0.12);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(74, 111, 165, 0.08);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4a6fa5, transparent);
    opacity: 0.3;
}

.card h2 {
    color: var(--text-gold);
    margin-bottom: 25px;
    font-size: 1.4rem;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2::before {
    content: "✦";
    font-size: 1rem;
}

.card h3 {
    color: var(--text-gold);
    margin: 25px 0 15px;
    font-size: 1.1rem;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* Triangle Pyramid - 三角形金字塔布局 (美化版) */
.triangle-pyramid-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 60px;
    margin: 20px auto;
    max-width: 650px;
    background: radial-gradient(circle at center, rgba(74, 111, 165, 0.06) 0%, transparent 70%);
    border-radius: 15px;
}

/* 外部数字组 - 顶部 */
.outer-top-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.outer-top-group > .outer-num {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    border: 2px solid #c4b5fd;
    border-radius: 50%;
    color: #3b0764;
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
}

.outer-top-group .outer-row {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid rgba(74, 144, 217, 0.5);
}

/* 外部数字组 - 左右两侧 */
.outer-left-group,
.outer-right-group {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.outer-left-group {
    left: 5px;
}

.outer-right-group {
    right: 5px;
}

.outer-left-group > .outer-num,
.outer-right-group > .outer-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    border: 2px solid #c4b5fd;
    border-radius: 50%;
    color: #3b0764;
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
}

.outer-left-group .outer-row,
.outer-right-group .outer-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid rgba(74, 144, 217, 0.5);
}

/* 外部数字圆圈样式 */
.outer-row .outer-num {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    border: 2px solid #c4b5fd;
    border-radius: 50%;
    color: #3b0764;
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
    transition: all 0.3s;
}

.outer-row .outer-num:hover {
    transform: scale(1.15);
}

/* 三角形主体 */
.triangle-main {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.triangle-svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(74, 144, 217, 0.3));
}

/* 三角形内的数字 - 圆球样式 */
.triangle-numbers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tri-num {
    position: absolute;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s;
    cursor: default;
}

.tri-num:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

/* G - 顶层 (淡紫色) */
.tri-num.g-num {
    top: 27%;
    left: 50%;
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    border: 3px solid #c4b5fd;
    box-shadow: 0 0 25px rgba(196, 181, 253, 0.6);
    color: #3b0764;
    animation: glow-purple 3s ease-in-out infinite;
}

@keyframes glow-purple {
    0%, 100% { box-shadow: 0 0 18px rgba(196, 181, 253, 0.4); }
    50% { box-shadow: 0 0 30px rgba(196, 181, 253, 0.8); }
}

/* E F - 中层 (淡紫色) */
.tri-num.e-num,
.tri-num.f-num {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    border: 3px solid #c4b5fd;
    box-shadow: 0 0 20px rgba(196, 181, 253, 0.5);
    color: #3b0764;
}

.tri-num.e-num {
    top: 52%;
    left: 37%;
}

.tri-num.f-num {
    top: 52%;
    left: 63%;
}

/* A B C D - 底层 (淡紫色) */
.tri-num.a-num,
.tri-num.b-num,
.tri-num.c-num,
.tri-num.d-num {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    border: 3px solid #c4b5fd;
    box-shadow: 0 0 18px rgba(196, 181, 253, 0.5);
    color: #3b0764;
}

.tri-num.a-num {
    top: 78%;
    left: 18%;
}

.tri-num.b-num {
    top: 78%;
    left: 39%;
}

.tri-num.c-num {
    top: 78%;
    left: 61%;
}

.tri-num.d-num {
    top: 78%;
    left: 82%;
}

/* 底部原始日期 */
.raw-date-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px;
    margin-top: 25px;
    padding: 15px 25px;
    background: rgba(74, 111, 165, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(74, 111, 165, 0.1);
}

.raw-date-row .date-label {
    color: var(--text-gold);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.raw-date-row .raw-val {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-light);
    min-width: 35px;
    text-align: center;
    padding: 5px 10px;
    background: rgba(74, 111, 165, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(74, 111, 165, 0.15);
}

/* 金字塔响应式 - 768px */
@media (max-width: 768px) {
    .triangle-pyramid-container {
        padding: 30px 40px;
    }

    .tri-num {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .tri-num.g-num {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .tri-num.e-num,
    .tri-num.f-num {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .tri-num.a-num,
    .tri-num.b-num,
    .tri-num.c-num,
    .tri-num.d-num {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

/* 金字塔响应式 - 550px */
@media (max-width: 550px) {
    .triangle-pyramid-container {
        padding: 20px 50px;
    }

    .outer-top-group > .outer-num {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .outer-top-group .outer-row {
        gap: 8px;
        margin-top: 5px;
        padding-top: 5px;
    }

    .outer-left-group > .outer-num,
    .outer-right-group > .outer-num {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .outer-left-group .outer-row,
    .outer-right-group .outer-row {
        gap: 4px;
        margin-top: 5px;
        padding-top: 5px;
    }

    .outer-row .outer-num {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .outer-left-group {
        left: 0px;
    }

    .outer-right-group {
        right: 0px;
    }

    .tri-num {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .tri-num.g-num {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .tri-num.e-num,
    .tri-num.f-num {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
        border-width: 2px;
    }

    .tri-num.a-num,
    .tri-num.b-num,
    .tri-num.c-num,
    .tri-num.d-num {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-width: 2px;
    }
}

/* 金字塔响应式 - 400px (极小屏) */
@media (max-width: 400px) {
    .triangle-pyramid-container {
        padding: 15px 42px;
    }

    .outer-top-group > .outer-num {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .outer-left-group > .outer-num,
    .outer-right-group > .outer-num {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .outer-row .outer-num {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .outer-left-group {
        left: -2px;
    }

    .outer-right-group {
        right: -2px;
    }

    .tri-num {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .tri-num.g-num {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
    }

    .tri-num.e-num,
    .tri-num.f-num {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .tri-num.a-num,
    .tri-num.b-num,
    .tri-num.c-num,
    .tri-num.d-num {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .outer-top-group .outer-row {
        gap: 5px;
    }

    .outer-left-group .outer-row,
    .outer-right-group .outer-row {
        gap: 3px;
    }

    .outer-top-group {
        margin-bottom: 10px;
    }
}

/* Union Codes */
.union-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.union-code-item {
    background: rgba(74, 111, 165, 0.06);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(74, 111, 165, 0.1);
}

.union-code-item .original {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-light);
    letter-spacing: 2px;
}

.union-code-item .arrow {
    color: var(--text-gold);
    margin: 5px 0;
    font-size: 0.9rem;
}

.union-code-item .union {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-gold);
    letter-spacing: 2px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.info-item {
    background: rgba(74, 111, 165, 0.06);
    padding: 18px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(74, 111, 165, 0.1);
    transition: all 0.3s;
}

.info-item:hover {
    border-color: rgba(74, 111, 165, 0.25);
    transform: translateY(-2px);
}

.info-item .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.info-item .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-gold);
    letter-spacing: 3px;
}

/* Personality Cards */
.personality-card {
    background: rgba(74, 111, 165, 0.06);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(74, 111, 165, 0.1);
    transition: all 0.3s;
}

.personality-card:hover {
    border-color: rgba(74, 111, 165, 0.25);
}

.personality-card .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.personality-card .number {
    font-size: 2.8rem;
    font-weight: bold;
    color: #3d5d8a;
    text-shadow: none;
}

.personality-card .trait {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 8px 0;
    letter-spacing: 2px;
}

.personality-card .desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.personality-card .element {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 12px;
    font-size: 0.9rem;
}

.element-gold { background: rgba(180, 140, 20, 0.12); color: #8a6d10; border: 1px solid rgba(180, 140, 20, 0.3); }
.element-water { background: rgba(37, 99, 195, 0.1); color: #2563c3; border: 1px solid rgba(37, 99, 195, 0.25); }
.element-fire { background: rgba(220, 38, 38, 0.1); color: #c02020; border: 1px solid rgba(220, 38, 38, 0.25); }
.element-wood { background: rgba(22, 163, 74, 0.1); color: #15803d; border: 1px solid rgba(22, 163, 74, 0.25); }
.element-earth { background: rgba(161, 98, 7, 0.1); color: #92610a; border: 1px solid rgba(161, 98, 7, 0.25); }

/* Number Distribution */
.missing-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
}

.number-badge {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.3rem;
    transition: all 0.3s;
}

.number-badge:hover {
    transform: scale(1.1);
}

.number-badge.exists {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.3);
}

.number-badge.repeat {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    position: relative;
    flex-direction: column;
    gap: 0;
}

.repeat-count {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.9;
    line-height: 1;
    margin-top: -2px;
}

.number-badge.missing {
    background: rgba(74, 111, 165, 0.06);
    color: var(--text-muted);
    border: 2px dashed rgba(74, 111, 165, 0.2);
}

/* Compass Direction Map - 罗盘式方位图 */
.compass-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    overflow-x: auto;
}

.compass {
    position: relative;
    width: 500px;
    height: 500px;
    min-width: 500px;
}

.compass-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 中宫 */
.compass-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: #fff;
    border: 2px solid #4a90d9;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.compass-center .num {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3d5d8a;
}

/* 方位通用样式 */
.compass-direction {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
}

.compass-direction .zodiac {
    color: var(--text-light);
    font-weight: bold;
    margin-bottom: 2px;
}

.compass-direction .dir-label {
    color: var(--text-muted);
    font-size: 0.65rem;
    margin-bottom: 3px;
}

.compass-direction .num-row {
    display: flex;
    gap: 3px;
    margin: 2px 0;
}

.compass-direction .num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #4a90d9;
    color: #333;
    font-weight: bold;
    font-size: 0.9rem;
}

.compass-direction .num.outer {
    background: #fff;
    border-width: 2px;
}

.compass-direction .num.highlight {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* 内圈数字层 - 定位在连线上（中宫与外圈之间） */
.inner-num {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0ecf8;
    border: 1px solid #7baed6;
    color: #333;
    font-weight: bold;
    font-size: 0.85rem;
}

/* 内圈 - 12个方位均匀分布 (圆心250,250 半径100px 每30°一个) */
.inner-num.pos-n   { top: 150px; left: 250px; }   /* 0° */
.inner-num.pos-nne { top: 163px; left: 300px; }   /* 30° */
.inner-num.pos-ne  { top: 200px; left: 337px; }   /* 60° */
.inner-num.pos-e   { top: 250px; left: 350px; }   /* 90° */
.inner-num.pos-se  { top: 300px; left: 337px; }   /* 120° */
.inner-num.pos-sse { top: 337px; left: 300px; }   /* 150° */
.inner-num.pos-s   { top: 350px; left: 250px; }   /* 180° */
.inner-num.pos-ssw { top: 337px; left: 200px; }   /* 210° */
.inner-num.pos-sw  { top: 300px; left: 163px; }   /* 240° */
.inner-num.pos-w   { top: 250px; left: 150px; }   /* 270° */
.inner-num.pos-nw  { top: 200px; left: 163px; }   /* 300° */
.inner-num.pos-nnw { top: 163px; left: 200px; }   /* 330° */

/* 各方位位置 (500px compass) */
.compass-direction.north {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.compass-direction.south {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.compass-direction.east {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.compass-direction.west {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* 对角方位 (60°/120°/240°/300°) - 圆心250,250 半径225 */
.compass-direction.northeast {
    top: 138px;
    left: 445px;
    transform: translate(-50%, -50%);
}

.compass-direction.northwest {
    top: 138px;
    left: 55px;
    transform: translate(-50%, -50%);
}

.compass-direction.southeast {
    top: 362px;
    left: 445px;
    transform: translate(-50%, -50%);
}

.compass-direction.southwest {
    top: 362px;
    left: 55px;
    transform: translate(-50%, -50%);
}

/* 细分方位 (30°/150°/210°/330°) - 圆心250,250 半径225 */
.compass-direction.nne {
    top: 55px;
    left: 363px;
    transform: translate(-50%, -50%);
}

.compass-direction.nnw {
    top: 55px;
    left: 138px;
    transform: translate(-50%, -50%);
}

.compass-direction.sse {
    top: 445px;
    left: 363px;
    transform: translate(-50%, -50%);
}

.compass-direction.ssw {
    top: 445px;
    left: 138px;
    transform: translate(-50%, -50%);
}

/* 图例 */
.compass-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(74, 111, 165, 0.12);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legend-box {
    width: 24px;
    height: 24px;
    border: 1px solid #4a90d9;
}

.legend-box.inner-box {
    background: #e0ecf8;
    border: 1px solid #7baed6;
}

.legend-box.outer-box {
    background: #fff;
    border: 2px solid #4a90d9;
}

.legend-box.highlight-box {
    background: #dc2626;
    border-color: #dc2626;
}

/* 罗盘响应式 - 768px */
@media (max-width: 768px) {
    .compass-container {
        padding: 10px 0;
    }

    .compass {
        width: 420px;
        height: 420px;
        min-width: 420px;
    }

    .compass-center {
        width: 42px;
        height: 42px;
    }

    .compass-center .num {
        font-size: 1.3rem;
    }

    .compass-direction .zodiac {
        font-size: 0.7rem;
    }

    .compass-direction .dir-label {
        font-size: 0.6rem;
    }

    .compass-direction .num {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .inner-num {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    /* 按比例调整内圈数字位置 (420px, 中心210, 半径84, 30°均分) */
    .inner-num.pos-n   { top: 126px; left: 210px; }
    .inner-num.pos-nne { top: 137px; left: 252px; }
    .inner-num.pos-ne  { top: 168px; left: 283px; }
    .inner-num.pos-e   { top: 210px; left: 294px; }
    .inner-num.pos-se  { top: 252px; left: 283px; }
    .inner-num.pos-sse { top: 283px; left: 252px; }
    .inner-num.pos-s   { top: 294px; left: 210px; }
    .inner-num.pos-ssw { top: 283px; left: 168px; }
    .inner-num.pos-sw  { top: 252px; left: 137px; }
    .inner-num.pos-w   { top: 210px; left: 126px; }
    .inner-num.pos-nw  { top: 168px; left: 137px; }
    .inner-num.pos-nnw { top: 137px; left: 168px; }

    .compass-direction.northeast { top: 116px; left: 374px; transform: translate(-50%, -50%); }
    .compass-direction.northwest { top: 116px; left: 46px; transform: translate(-50%, -50%); }
    .compass-direction.southeast { top: 305px; left: 374px; transform: translate(-50%, -50%); }
    .compass-direction.southwest { top: 305px; left: 46px; transform: translate(-50%, -50%); }
    .compass-direction.nne { top: 46px; left: 305px; transform: translate(-50%, -50%); }
    .compass-direction.nnw { top: 46px; left: 116px; transform: translate(-50%, -50%); }
    .compass-direction.sse { top: 374px; left: 305px; transform: translate(-50%, -50%); }
    .compass-direction.ssw { top: 374px; left: 116px; transform: translate(-50%, -50%); }
}

/* 罗盘响应式 - 550px (手机 - 缩放方案) */
@media (max-width: 550px) {
    .compass-container {
        padding: 5px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .compass {
        width: 340px;
        height: 340px;
        min-width: 340px;
        margin: 0 auto;
    }

    .compass-center {
        width: 36px;
        height: 36px;
    }

    .compass-center .num {
        font-size: 1.1rem;
    }

    .compass-direction {
        font-size: 0.65rem;
    }

    .compass-direction .zodiac {
        font-size: 0.6rem;
    }

    .compass-direction .dir-label {
        font-size: 0.5rem;
    }

    .compass-direction .num {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .inner-num {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    /* 按比例调整内圈数字位置 (340px, 中心170, 半径68, 30°均分) */
    .inner-num.pos-n   { top: 102px; left: 170px; }
    .inner-num.pos-nne { top: 111px; left: 204px; }
    .inner-num.pos-ne  { top: 136px; left: 229px; }
    .inner-num.pos-e   { top: 170px; left: 238px; }
    .inner-num.pos-se  { top: 204px; left: 229px; }
    .inner-num.pos-sse { top: 229px; left: 204px; }
    .inner-num.pos-s   { top: 238px; left: 170px; }
    .inner-num.pos-ssw { top: 229px; left: 136px; }
    .inner-num.pos-sw  { top: 204px; left: 111px; }
    .inner-num.pos-w   { top: 170px; left: 102px; }
    .inner-num.pos-nw  { top: 136px; left: 111px; }
    .inner-num.pos-nnw { top: 111px; left: 136px; }

    .compass-direction.northeast { top: 94px; left: 303px; transform: translate(-50%, -50%); }
    .compass-direction.northwest { top: 94px; left: 38px; transform: translate(-50%, -50%); }
    .compass-direction.southeast { top: 247px; left: 303px; transform: translate(-50%, -50%); }
    .compass-direction.southwest { top: 247px; left: 38px; transform: translate(-50%, -50%); }
    .compass-direction.nne { top: 38px; left: 247px; transform: translate(-50%, -50%); }
    .compass-direction.nnw { top: 38px; left: 94px; transform: translate(-50%, -50%); }
    .compass-direction.sse { top: 303px; left: 247px; transform: translate(-50%, -50%); }
    .compass-direction.ssw { top: 303px; left: 94px; transform: translate(-50%, -50%); }
}

/* 罗盘响应式 - 380px (极小屏手机) */
@media (max-width: 380px) {
    .compass {
        width: 300px;
        height: 300px;
        min-width: 300px;
    }

    .compass-center {
        width: 32px;
        height: 32px;
    }

    .compass-center .num {
        font-size: 1rem;
    }

    .compass-direction .zodiac {
        font-size: 0.55rem;
    }

    .compass-direction .dir-label {
        display: none;
    }

    .compass-direction .num {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    .inner-num {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }

    /* 按比例调整内圈数字位置 (300px, 中心150, 半径60, 30°均分) */
    .inner-num.pos-n   { top: 90px; left: 150px; }
    .inner-num.pos-nne { top: 98px; left: 180px; }
    .inner-num.pos-ne  { top: 120px; left: 202px; }
    .inner-num.pos-e   { top: 150px; left: 210px; }
    .inner-num.pos-se  { top: 180px; left: 202px; }
    .inner-num.pos-sse { top: 202px; left: 180px; }
    .inner-num.pos-s   { top: 210px; left: 150px; }
    .inner-num.pos-ssw { top: 202px; left: 120px; }
    .inner-num.pos-sw  { top: 180px; left: 98px; }
    .inner-num.pos-w   { top: 150px; left: 90px; }
    .inner-num.pos-nw  { top: 120px; left: 98px; }
    .inner-num.pos-nnw { top: 98px; left: 120px; }

    .compass-direction.northeast { top: 83px; left: 267px; transform: translate(-50%, -50%); }
    .compass-direction.northwest { top: 83px; left: 33px; transform: translate(-50%, -50%); }
    .compass-direction.southeast { top: 218px; left: 267px; transform: translate(-50%, -50%); }
    .compass-direction.southwest { top: 218px; left: 33px; transform: translate(-50%, -50%); }
    .compass-direction.nne { top: 33px; left: 218px; transform: translate(-50%, -50%); }
    .compass-direction.nnw { top: 33px; left: 83px; transform: translate(-50%, -50%); }
    .compass-direction.sse { top: 267px; left: 218px; transform: translate(-50%, -50%); }
    .compass-direction.ssw { top: 267px; left: 83px; transform: translate(-50%, -50%); }
}

/* Flow Section */
.flow-section {
    background: rgba(74, 111, 165, 0.05);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(74, 111, 165, 0.1);
    margin-top: 20px;
}

.flow-inputs {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 20px;
}

.flow-inputs label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.flow-inputs select,
.flow-inputs input {
    padding: 10px 15px;
    border: 1px solid rgba(74, 111, 165, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.8);
    color: var(--text-light);
}

.flow-inputs select:focus,
.flow-inputs input:focus {
    outline: none;
    border-color: #4a6fa5;
}

/* Age Groups */
.age-group {
    background: rgba(74, 111, 165, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(74, 111, 165, 0.08);
}

.age-group h4 {
    color: var(--text-gold);
    margin-bottom: 12px;
    font-size: 1rem;
    letter-spacing: 2px;
}

.code-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.code-item {
    background: rgba(74, 111, 165, 0.08);
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    color: #4a6fa5;
    border: 1px solid rgba(74, 111, 165, 0.2);
    letter-spacing: 2px;
}

/* Five Elements Table */
.five-elements-table {
    overflow-x: auto;
}

.five-elements-table table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 0.95rem;
}

.five-elements-table th,
.five-elements-table td {
    padding: 10px 8px;
    border: 1px solid rgba(74, 111, 165, 0.12);
}

.five-elements-table thead th {
    background: rgba(74, 111, 165, 0.08);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.85rem;
}

.five-elements-table .element-name {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 8px;
}

.five-elements-table .element-name.el-gold { color: #8a6d10; background: rgba(180, 140, 20, 0.1); }
.five-elements-table .element-name.el-water { color: #2563c3; background: rgba(37, 99, 195, 0.08); }
.five-elements-table .element-name.el-wood { color: #15803d; background: rgba(22, 163, 74, 0.08); }
.five-elements-table .element-name.el-fire { color: #c02020; background: rgba(220, 38, 38, 0.08); }
.five-elements-table .element-name.el-earth { color: #92610a; background: rgba(161, 98, 7, 0.08); }

.five-elements-table .element-name.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.five-elements-table .element-name.clickable:hover {
    transform: scale(1.15);
    text-shadow: 0 0 10px currentColor;
}

.five-elements-table .num-detail {
    color: var(--text-light);
    font-size: 0.85rem;
}

.five-elements-table .label-cell {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1rem;
    vertical-align: middle;
    white-space: nowrap;
    padding: 10px 12px;
}

.five-elements-table .total-row td {
    font-weight: bold;
    font-size: 1.1rem;
    color: #4a6fa5;
    border-top: 2px solid rgba(74, 111, 165, 0.2);
}

/* Five Elements Cycle */
.elements-cycle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 25px;
    background: rgba(74, 111, 165, 0.05);
    border-radius: 12px;
    margin-top: 20px;
}

.element-box {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.arrow {
    color: var(--text-gold);
    font-size: 1.2rem;
    opacity: 0.6;
}

/* ===== Responsive - 768px (平板) ===== */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .header {
        padding: 30px 15px 20px;
    }

    .header::before {
        font-size: 2.2rem;
    }

    .header h1 {
        font-size: 1.8rem;
        letter-spacing: 4px;
    }

    .header p {
        font-size: 0.95rem;
    }

    .input-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group input {
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .tabs {
        flex-direction: column;
        gap: 8px;
    }

    .tab-btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .card {
        padding: 20px 15px;
        margin-bottom: 18px;
        border-radius: 12px;
    }

    .card h2 {
        font-size: 1.2rem;
        letter-spacing: 2px;
        margin-bottom: 18px;
    }

    .card h3 {
        font-size: 1rem;
        margin: 18px 0 12px;
    }

    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    .info-item {
        padding: 14px 10px;
    }

    .info-item .value {
        font-size: 1.3rem;
    }

    .personality-card .number {
        font-size: 2.2rem;
    }

    .personality-card .trait {
        font-size: 1.05rem;
    }

    .union-codes {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }

    .raw-date-row {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 12px 15px;
    }

    .flow-section {
        padding: 18px 12px;
    }

    .flow-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .flow-inputs > div {
        width: 100%;
    }

    .flow-inputs select,
    .flow-inputs input {
        width: 100%;
    }

    .flow-inputs .btn {
        width: 100%;
    }

    .elements-cycle {
        padding: 18px 10px;
        gap: 6px;
    }

    .element-box {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .compass-legend {
        gap: 15px;
    }

    .legend-item {
        font-size: 0.8rem;
    }

    .age-group {
        padding: 15px;
    }

    .direction-map {
        max-width: 280px;
    }
}

/* ===== Responsive - 480px (手机) ===== */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .header {
        padding: 20px 10px 15px;
    }

    .header::before {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .header h1 {
        font-size: 1.4rem;
        letter-spacing: 3px;
    }

    .header p {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .input-section {
        padding: 15px 12px;
        border-radius: 10px;
    }

    .input-group label {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .input-group input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .card {
        padding: 15px 12px;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .card h2 {
        font-size: 1.1rem;
        letter-spacing: 1px;
        margin-bottom: 15px;
        gap: 6px;
    }

    .card h2::before {
        font-size: 0.8rem;
    }

    .card h3 {
        font-size: 0.95rem;
        margin: 15px 0 10px;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .info-item {
        padding: 12px 8px;
    }

    .info-item .label {
        font-size: 0.75rem;
    }

    .info-item .value {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .personality-card {
        padding: 15px;
    }

    .personality-card .label {
        font-size: 0.8rem;
    }

    .personality-card .number {
        font-size: 2rem;
    }

    .personality-card .trait {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .personality-card .desc {
        font-size: 0.85rem;
    }

    .union-codes {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }

    .union-code-item {
        padding: 8px;
    }

    .union-code-item .original,
    .union-code-item .union {
        font-size: 1rem;
    }

    .missing-numbers {
        gap: 8px;
    }

    .number-badge {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .raw-date-row {
        gap: 8px;
        padding: 10px 12px;
        margin-top: 15px;
    }

    .raw-date-row .date-label {
        font-size: 0.85rem;
    }

    .raw-date-row .raw-val {
        font-size: 0.95rem;
        padding: 4px 8px;
    }

    .flow-section {
        padding: 15px 10px;
    }

    .flow-inputs {
        gap: 10px;
    }

    .flow-inputs label {
        font-size: 0.85rem;
    }

    .elements-cycle {
        padding: 15px 8px;
        gap: 4px;
    }

    .element-box {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .arrow {
        font-size: 1rem;
    }

    .age-group {
        padding: 12px;
        margin-bottom: 10px;
    }

    .age-group h4 {
        font-size: 0.9rem;
    }

    .code-item {
        padding: 6px 12px;
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .compass-legend {
        gap: 10px;
        padding-top: 15px;
    }

    .legend-item {
        font-size: 0.75rem;
        gap: 5px;
    }

    .legend-box {
        width: 20px;
        height: 20px;
    }
}

/* Clickable Cards */
.personality-card.clickable,
.code-item.clickable {
    cursor: pointer;
    position: relative;
}

.personality-card.clickable::after {
    content: "›";
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 1.4rem;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.3s;
}

.personality-card.clickable:hover::after {
    opacity: 1;
    color: #4a6fa5;
    transform: translateX(3px);
}

.personality-card.clickable:hover {
    border-color: rgba(74, 111, 165, 0.3);
    box-shadow: 0 4px 15px rgba(74, 111, 165, 0.12);
}

.code-item.clickable:hover {
    background: rgba(74, 111, 165, 0.15);
    border-color: rgba(74, 111, 165, 0.3);
    transform: translateY(-2px);
}

/* Detail Modal */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(44, 62, 80, 0.5);
    backdrop-filter: blur(4px);
    animation: modalBgIn 0.25s ease-out;
}

.detail-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-modal-content {
    background: #fff;
    border: 1px solid rgba(74, 111, 165, 0.15);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalBgIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.detail-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(74, 111, 165, 0.12);
    flex-shrink: 0;
}

.detail-modal-header h2 {
    color: #3d5d8a;
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin: 0;
}

.detail-modal-header h2::before {
    content: none;
}

.detail-modal-close {
    background: none;
    border: 1px solid rgba(74, 111, 165, 0.2);
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.detail-modal-close:hover {
    color: #4a6fa5;
    border-color: #4a6fa5;
    background: rgba(74, 111, 165, 0.08);
}

.detail-modal-body {
    padding: 25px;
    overflow-y: auto;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

.detail-modal-body .detail-number {
    text-align: center;
    margin-bottom: 20px;
}

.detail-modal-body .detail-number .num {
    font-size: 3rem;
    font-weight: bold;
    color: #3d5d8a;
    text-shadow: none;
}

.detail-modal-body .detail-number .elem {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
}

.detail-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 2;
    color: #374151;
    padding: 15px;
    background: #f8f9fc;
    border-radius: 10px;
    border: 1px solid rgba(74, 111, 165, 0.08);
}

.detail-modal-body .union-code-title {
    color: var(--text-gold);
    font-size: 1.1rem;
    font-weight: bold;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.detail-modal-body .union-code-title:first-child {
    margin-top: 0;
}

@media (max-width: 480px) {
    .detail-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .detail-modal-header {
        padding: 15px 18px;
    }

    .detail-modal-header h2 {
        font-size: 1.1rem;
    }

    .detail-modal-body {
        padding: 15px;
        font-size: 0.9rem;
    }

    .detail-modal-body .detail-number .num {
        font-size: 2.2rem;
    }

    .detail-text {
        font-size: 0.9rem;
        line-height: 1.9;
        padding: 12px;
    }
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(201, 162, 39, 0.3); }
    50% { box-shadow: 0 0 30px rgba(201, 162, 39, 0.6); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

.pyramid-cell.top {
    animation: glow 3s ease-in-out infinite;
}

/* ==================== 课程 Tab - 老师卡片 ==================== */
.teacher-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.teacher-card .teacher-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-gold);
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.teacher-card .teacher-bio {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.85;
    margin-bottom: 18px;
    white-space: pre-line;
}

.teacher-card .course-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 6px;
}

.teacher-card .course-price {
    font-size: 0.95rem;
    color: #f59e0b;
    font-weight: bold;
    margin-bottom: 14px;
}

.teacher-card .btn-reserve {
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    letter-spacing: 1px;
}

.teacher-card .btn-reserve:active {
    opacity: 0.85;
}
