/* =========================================================
   Bazi Chart Calculator — WordPress Plugin Stylesheet (English)
   Stronger colours · Bolder text · Larger fonts
   All classes prefixed .bazi- to avoid theme conflicts
   4 pillars always in one row on mobile
   ========================================================= */

.bazi-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: .5rem 0 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111;
}
.bazi-wrap *, .bazi-wrap *::before, .bazi-wrap *::after { box-sizing: border-box; }

/* ── Cards ── */
.bazi-card { background: #fff; border: 1px solid #d5d0c5; border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem; }
.bazi-sec-title { font-size: 11px; font-weight: 800; color: #555; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.bazi-divider { height: 1px; background: #e8e3d8; margin: .85rem 0; }

/* ── Form ── */
.bazi-form-row { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; margin-bottom: 12px; }
.bazi-form-group label { font-size: 11px; color: #444; display: block; margin-bottom: 3px; font-weight: 700; }
.bazi-form-group input,
.bazi-form-group select {
    width: 100%; font-size: 13px; padding: 7px 9px;
    border: 1px solid #c0bbb0; border-radius: 7px;
    background: #fff; color: #111; outline: none;
    font-family: inherit; -webkit-appearance: none; appearance: none; font-weight: 600;
}
.bazi-form-group input:focus,
.bazi-form-group select:focus { border-color: #5046c8; box-shadow: 0 0 0 2px rgba(80,70,200,.15); }
.bazi-btn {
    background: #5046c8; border: none; border-radius: 7px;
    padding: 9px 24px; font-size: 14px; font-weight: 700;
    cursor: pointer; color: #fff; font-family: inherit; transition: background .15s;
}
.bazi-btn:hover { background: #3d35a8; }

/* ── Four Pillars — always 4 columns ── */
.bazi-chart-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-bottom: .85rem; }

/* ── Pillar ── */
.bazi-pillar { border: 1px solid #d5d0c5; border-radius: 10px; text-align: center; overflow: hidden; background: #fff; }
.bazi-p-label {
    font-size: 11px; font-weight: 800; color: #444;
    padding: 6px 2px; background: #f2efe8;
    border-bottom: 1px solid #ddd8ce; letter-spacing: .07em; text-transform: uppercase;
}

/* Heavenly Stem */
.bazi-p-stem { padding: 12px 4px 9px; border-bottom: 1px solid #ede8df; }
.bazi-p-stem-name { font-size: 15px; font-weight: 800; line-height: 1.1; margin-bottom: 3px; }
.bazi-p-stem-elem { font-size: 10px; color: #555; margin-bottom: 4px; font-weight: 600; }
.bazi-p-stem-god { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px; display: inline-block; line-height: 1.4; }

/* Earthly Branch */
.bazi-p-branch { padding: 9px 4px 7px; border-bottom: 1px solid #ede8df; }
.bazi-p-branch-name { font-size: 15px; font-weight: 800; line-height: 1.1; margin-bottom: 3px; }
.bazi-p-branch-elem { font-size: 10px; color: #555; margin-bottom: 2px; font-weight: 600; }
.bazi-p-branch-anim { font-size: 10px; color: #666; font-weight: 600; }

/* Hidden stems */
.bazi-p-hidden {
    padding: 6px 3px; min-height: 30px; background: #f8f5ee;
    border-bottom: 1px solid #ede8df;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.bazi-p-hidden-label { font-size: 9px; color: #888; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; }
.bazi-p-hidden-stems { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.bazi-hidden-stem { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 7px; }

/* Nayin */
.bazi-p-nayin { font-size: 9px; color: #666; font-weight: 700; padding: 5px 3px; background: #f2efe8; text-align: center; line-height: 1.3; }

/* ── Element bars ── */
.bazi-elem-bars { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-bottom: 1rem; }
.bazi-elem-bar-item { text-align: center; }
.bazi-eb-label { font-size: 13px; font-weight: 800; margin-bottom: 4px; }
.bazi-eb-track { height: 60px; background: #ede8df; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column-reverse; }
.bazi-eb-fill { width: 100%; border-radius: 2px; transition: height .3s; }
.bazi-eb-val { font-size: 11px; color: #444; font-weight: 700; margin-top: 4px; }

/* ── Ten gods ── */
.bazi-tg-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.bazi-tg-badge { font-size: 11px; font-weight: 800; padding: 4px 11px; border-radius: 10px; display: inline-block; }

/* ── Luck cycle ── */
.bazi-luck-grid { display: grid; grid-template-columns: repeat(8,1fr); gap: 6px; }
.bazi-lp {
    border: 1px solid #d5d0c5; border-radius: 8px; text-align: center;
    cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.bazi-lp:hover { border-color: #888; box-shadow: 0 1px 5px rgba(0,0,0,.1); }
.bazi-lp.active { border: 2px solid #5046c8; background: #EEEDFE; }
.bazi-lp-age { font-size: 9px; padding: 4px 0; background: #f2efe8; border-bottom: 1px solid #ddd8ce; color: #444; font-weight: 800; }
.bazi-lp-stem { font-size: 14px; font-weight: 800; padding: 6px 0 2px; }
.bazi-lp-branch { font-size: 14px; font-weight: 800; padding: 2px 0 4px; border-bottom: 1px solid #ede8df; }
.bazi-lp-anim { font-size: 9px; color: #555; font-weight: 700; padding: 2px 0 1px; }
.bazi-lp-yr { font-size: 8px; color: #888; font-weight: 600; padding: 0 0 5px; }

/* ── Decade detail ── */
.bazi-dd-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #ede8df; }
.bazi-dd-pillars { display: flex; gap: 6px; align-items: center; }
.bazi-dd-stem-name { font-size: 24px; font-weight: 800; }
.bazi-dd-branch-name { font-size: 24px; font-weight: 800; }
.bazi-dd-sep { font-size: 18px; color: #ccc; margin: 0 2px; }
.bazi-dd-meta { font-size: 12px; color: #555; font-weight: 600; margin-top: 4px; line-height: 1.6; }

.bazi-year-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; }
.bazi-yr-cell { background: #f2efe8; border-radius: 7px; padding: 7px 3px; text-align: center; border: 1px solid #ddd8ce; }
.bazi-yr-num { font-size: 10px; font-weight: 800; color: #555; margin-bottom: 3px; }
.bazi-yr-stem { font-size: 14px; font-weight: 800; }
.bazi-yr-branch { font-size: 14px; font-weight: 800; }
.bazi-yr-anim { font-size: 9px; color: #555; font-weight: 700; margin-top: 2px; }
.bazi-yr-god { font-size: 8px; font-weight: 800; margin-top: 3px; padding: 2px 5px; border-radius: 7px; display: inline-block; }

/* ── Element colours — stronger ── */
.bazi-ew    { color: #2C5A08; }
.bazi-ef    { color: #8B2800; }
.bazi-ee    { color: #6B3A00; }
.bazi-em    { color: #3A3A38; }
.bazi-ewater{ color: #0A4A8A; }

/* ── God pill colours — stronger backgrounds + bold borders ── */
.bazi-g-self { background: #D4EDBC; color: #1E4A00; border: 1px solid #A8D070; }
.bazi-g-rw   { background: #F5D0E0; color: #7A1040; border: 1px solid #E090B0; }
.bazi-g-ho   { background: #DDDCFC; color: #2E1E9A; border: 1px solid #A8A0F0; }
.bazi-g-eg   { background: #C8E4F8; color: #003880; border: 1px solid #80BCEC; }
.bazi-g-dw   { background: #B8EDD8; color: #004830; border: 1px solid #60C898; }
.bazi-g-iw   { background: #F8D8C8; color: #6A1800; border: 1px solid #E89060; }
.bazi-g-do   { background: #E4E0D4; color: #2A2820; border: 1px solid #B0A888; }
.bazi-g-7k   { background: #F8C8C8; color: #780000; border: 1px solid #E07070; }
.bazi-g-dr   { background: #F8E4B0; color: #4A2800; border: 1px solid #D8A830; }
.bazi-g-ir   { background: #D4EDBC; color: #1E4A00; border: 1px solid #A8D070; }

/* ── Mobile — 4 pillars always in one row ── */
@media (max-width: 600px) {
    .bazi-form-row { grid-template-columns: repeat(3,1fr); }
    .bazi-chart-grid { gap: 5px; }
    .bazi-p-stem-name, .bazi-p-branch-name { font-size: 13px; }
    .bazi-p-stem-god { font-size: 9px; padding: 1px 5px; }
    .bazi-hidden-stem { font-size: 9px; padding: 1px 4px; }
    .bazi-p-nayin { font-size: 8px; padding: 4px 2px; }
    .bazi-p-label { font-size: 9px; }
    .bazi-luck-grid { grid-template-columns: repeat(4,1fr); }
    .bazi-year-grid { grid-template-columns: repeat(2,1fr); }
    .bazi-dd-stem-name, .bazi-dd-branch-name { font-size: 20px; }
}
@media (max-width: 360px) {
    .bazi-p-stem-name, .bazi-p-branch-name { font-size: 11px; }
    .bazi-p-stem-god { display: none; }
    .bazi-p-nayin { display: none; }
}
