/* I-Ging-Stile — Hexagramm-Linien + Glyphen (05.10.2026)
   Basiert auf runen.css-Mustern (rune-grid/rune-link/rune-glyph). */

/* Detail-Seite: Unicode-Glyph + Linienbild nebeneinander */
.hex-detail-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem auto 1rem;
}

/* 6 Linien (oben zuerst): yang = durchgehend, yin = zweigeteilt */
.hex-lines {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 132px;
}

.hex-line {
    display: block;
    height: 12px;
    border-radius: 2px;
    background: var(--color-gold-light, #d4a944);
    box-shadow: 0 0 8px rgba(212, 169, 68, 0.3);
}

.hex-line.yin {
    position: relative;
    background: transparent;
}

.hex-line.yin i {
    display: block;
    height: 12px;
    width: 44%;
    border-radius: 2px;
    background: var(--color-gold-light, #d4a944);
    box-shadow: 0 0 8px rgba(212, 169, 68, 0.3);
}

.hex-line.yin i:first-child {
    float: left;
}

.hex-line.yin i:last-child {
    float: right;
}

/* Grid-Kacheln: etwas breiter als Runen (Lange Namen) */
.rune-grid.iging-grid,
.i-ging .rune-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

/* Kachel-Typo kompakt */
.i-ging .rune-link span:last-child {
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.3;
}

/* === Münz-Orakel (/i-ging/orakel/) — 05.10.2026 === */

.ig-board {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 60px;
}

.ig-throw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(42, 26, 74, 0.25);
    animation: igSlideIn 0.35s ease both;
}

@keyframes igSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ig-coins {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--color-text-dim, #b9a8d8);
}

/* Alte chinesische Muenze mit eckigem Loch (SVG data-URI, ~1 KB) —
   Zahl = Goldbronze mit Inschrift 乾隆通宝, Wappen = dunkle Patina, blank */
.ig-coin {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ig-coin.z {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'><defs><radialGradient id='g' cx='35%25' cy='30%25' r='75%25'><stop offset='0' stop-color='%23f5d98f'/><stop offset='.55' stop-color='%23d4a944'/><stop offset='1' stop-color='%2397721c'/></radialGradient></defs><path d='M22 2a20 20 0 1 0 0 40a20 20 0 1 0 0-40ZM16 16h12v12H16Z' fill='url(%23g)' fill-rule='evenodd' stroke='%237a5a16' stroke-width='1.2'/><g fill='%235c430f' font-family='serif' font-size='6.5' text-anchor='middle'><text x='22' y='12'>%E4%B9%BE</text><text x='22' y='40.5'>%E9%9A%86</text><text x='38.2' y='24.5'>%E9%80%9A</text><text x='5.8' y='24.5'>%E5%AE%9D</text></g></svg>");
}

.ig-coin.w {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'><defs><radialGradient id='h' cx='35%25' cy='30%25' r='75%25'><stop offset='0' stop-color='%23cdb6e8'/><stop offset='.55' stop-color='%239b78c4'/><stop offset='1' stop-color='%235d4480'/></radialGradient></defs><path d='M22 2a20 20 0 1 0 0 40a20 20 0 1 0 0-40ZM16 16h12v12H16Z' fill='url(%23h)' fill-rule='evenodd' stroke='%234a3563' stroke-width='1.2'/><rect x='7' y='20.5' width='6' height='3' rx='1' fill='%234a3563' opacity='.5'/><rect x='31' y='20.5' width='6' height='3' rx='1' fill='%234a3563' opacity='.5'/></svg>");
}

.ig-sum {
    margin-left: 4px;
    font-weight: 700;
    color: var(--color-gold-light, #d4a944);
}

.ig-line-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ig-line {
    display: block;
    width: 120px;
    height: 11px;
    border-radius: 2px;
    background: var(--color-gold-light, #d4a944);
    box-shadow: 0 0 8px rgba(212, 169, 68, 0.3);
}

.ig-line.yin {
    position: relative;
    background: transparent;
    box-shadow: none;
}

.ig-line.yin i {
    display: block;
    height: 11px;
    width: 43%;
    border-radius: 2px;
    background: var(--color-gold-light, #d4a944);
    box-shadow: 0 0 8px rgba(212, 169, 68, 0.3);
}

.ig-line.yin i:first-child { float: left; }
.ig-line.yin i:last-child  { float: right; }

.ig-line.changing {
    animation: igPulse 1.6s ease-in-out infinite;
}

@keyframes igPulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.5); }
}

.ig-mark {
    font-size: 0.72rem;
    font-style: normal;
    color: #c9a8e8;
    min-width: 56px;
    text-align: right;
}

.ig-result {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.ig-result.visible {
    opacity: 1;
}

.ig-hex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin: 1rem 0;
}

.ig-hex-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border: 1px solid rgba(212, 169, 68, 0.25);
    border-radius: 10px;
    background: rgba(20, 16, 38, 0.6);
}

.ig-hex-glyph {
    font-size: 3.2rem;
    line-height: 1.1;
    color: var(--color-gold-light, #d4a944);
    text-shadow: 0 0 22px rgba(212, 169, 68, 0.5);
}

.ig-hex-nr {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-dim, #b9a8d8);
}

.ig-hex-name {
    font-weight: 600;
    color: var(--color-gold-light, #d4a944);
}

.ig-hex-sub {
    font-size: 0.72rem;
    color: var(--color-text-dim, #b9a8d8);
}

.ig-changing {
    text-align: center;
    color: #c9a8e8;
}

.ig-reading h3 {
    text-align: center;
}

.ig-rule {
    text-align: center;
    font-weight: 600;
    color: var(--color-gold-light, #d4a944);
}

.ig-text-block {
    margin: 1.2rem 0;
    padding: 1rem 1.2rem;
    border-left: 3px solid rgba(212, 169, 68, 0.5);
    background: rgba(42, 26, 74, 0.25);
    border-radius: 0 8px 8px 0;
}

.ig-text-block h4 {
    margin: 0 0 0.5rem;
    color: var(--color-gold-light, #d4a944);
}

.ig-quelle {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #c9a8e8;
}

.ig-urteil-klein {
    font-size: 0.9rem;
    color: var(--color-text-dim, #b9a8d8);
}

.ig-counter {
    font-size: 0.8rem;
    color: var(--color-text-dim, #b9a8d8);
}

#ig-orakel-btn {
    margin: 0.5rem auto 1rem;
    display: block;
}

/* Orakel-CTA auf der I-Ging-Uebersicht (05.10.2026) */
.orakel-cta {
    margin: 1.5rem auto 2rem;
    padding: 1.2rem 1.6rem;
    max-width: 640px;
    text-align: center;
    border: 1px solid rgba(212, 169, 68, 0.4);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(42, 26, 74, 0.45), rgba(26, 26, 53, 0.75));
}

.orakel-cta p {
    margin: 0 0 0.9rem;
}

.orakel-cta-btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    border: 1px solid var(--color-gold, #d4a944);
    background: rgba(212, 169, 68, 0.15);
    color: var(--color-gold-light, #d4a944);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.orakel-cta-btn:hover {
    background: rgba(212, 169, 68, 0.3);
    box-shadow: 0 0 18px rgba(212, 169, 68, 0.35);
}

/* Wurf-Modus-Umschalter (06.10.2026): Linie für Linie vs. Alle auf einmal */
.ig-mode-toggle {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 18px 0 6px;
}
.ig-mode-toggle label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    min-height: 44px;
    border: 1px solid rgba(196, 163, 90, 0.35);
    border-radius: 12px;
    cursor: pointer;
    color: #e8e0cc;
    background: rgba(26, 10, 46, 0.45);
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
}
.ig-mode-toggle label:hover { border-color: rgba(196, 163, 90, 0.7); }
.ig-mode-toggle input { accent-color: #c4a35a; width: 18px; height: 18px; }
.ig-mode-toggle label:has(input:checked) {
    border-color: #c4a35a;
    background: rgba(196, 163, 90, 0.12);
}
