﻿:root {
    --gold-1: #FFD700;
    --gold-2: #D4AF37;
    --dark-bg: #1a1a1a;
    --light-gold: rgba(255,215,0,0.1);
}

body {
    background: var(--dark-bg);
    color: var(--gold-1);
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    padding: 2rem;
}

.title {
    text-align: center;
    font-size: 2.5rem;
    text-shadow: 0 0 10px var(--gold-1);
    margin-bottom: 3rem;
}

/* 首页网格样式 */
.hexagram-grid {
    display: flex;
    flex-wrap:wrap;
    justify-content:center;
}

.hexagram-card {
    background: linear-gradient(45deg, transparent 10%, var(--light-gold) 90%);
    border: 1px solid var(--gold-2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin:0px 20px 20px 0px;
    width:100px;
}

    .hexagram-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0 15px var(--gold-1);
    }

    .hexagram-card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient( 45deg, transparent, var(--gold-1), transparent );
        transform: rotate(45deg);
        animation: shine 3s infinite;
    }

@keyframes shine {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
    }
}

/* 详情页样式 */
.hexagram-detail {
    position: relative;
    border: 1px solid var(--gold-2);
    border-radius: 12px;
    padding: 1rem;
    background: rgba(0,0,0,0.8);
}

.symbol-animation {
    font-size: 4rem;
    text-align: center;
    margin: 2rem 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

.gua-title {
    text-align: center;
}

.gua-info {
    display: flex;
    flex-wrap:wrap;
    justify-content:center;
    width:100%;
    grid-template-columns: repeat(2, 1fr); /* 两列布局 */
    grid-template-areas:
        "guaDesc guaInter" /* 卦辞 和 象释 */
        "guaImg fiveElem" /* 卦象解析 + 五行 & 八宫 */
        "guaYao guaYao" /* 爻辞解析（独占整行） */
        "guaLuck guaChange"; /* 吉凶运势 + 变卦分析 */
    gap: 2rem;
    margin-top: 2rem;
}

.info-box.full-width {
    width: 70%;
}


.info-box {
    background: var(--light-gold);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--gold-2);
    width:400px;
}

.info-box h3 {
    margin:0px;
    margin-bottom:15px;
    border-bottom:1px solid var(--gold-2);
    display:inline-block;
}

.info-box p {
    margin:0px;
}

.yao-item{
    margin-bottom:25px;
}

/* 指定 grid-area，确保不跑位 */
.gua-description {
    grid-area: guaDesc;
}

.gua-interpretation {
    grid-area: guaInter;
}

.gua-imagery {
    grid-area: guaImg;
}

.gua-five-elements-palaces {
    grid-area: fiveElem;
    display: flex;
    gap: 1.5rem;
}

.gua-yao {
    grid-area: guaYao;
}

.gua-luck {
    grid-area: guaLuck;
}

.gua-luck p{
    margin-bottom:20px;
}

.gua-change {
    grid-area: guaChange;
}

/* 让五行和八宫横向排列 */
.gua-five-elements-palaces > div {
    flex: 1;
}

.back-btn {
    display: block;
    width: 200px;
    margin: 2rem auto 0;
    padding: 1rem;
    text-align: center;
    background: var(--gold-2);
    color: #000;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin-bottom:20px;
}

    .back-btn:hover {
        background: var(--gold-1);
        box-shadow: 0 0 15px var(--gold-1);
    }
