/* ============================================================
 * daily.css — 每日交易运势（个人日运）样式
 * 深色国风视觉，与 hepan / report 保持一致基调
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #14131f;
    --bg2: #1c1a2b;
    --card: #211f33;
    --border: rgba(163, 162, 199, .16);
    --text: #ecebff;
    --text-dim: #a3a2c7;
    --gold: #d4af37;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: radial-gradient(1200px 600px at 50% -10%, #2a2740 0%, var(--bg) 60%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 60px; }

/* ── 顶部栏 ── */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.who { color: var(--text-dim); font-size: 13px; }

.btn-ghost {
    display: inline-block; padding: 8px 16px; border-radius: 10px;
    border: 1px solid var(--border); color: var(--text-dim);
    background: transparent; text-decoration: none; font-size: 14px; cursor: pointer;
    transition: .2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--gold); }

.btn-primary {
    width: 100%; padding: 14px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #1a1a1a; font-size: 16px; font-weight: 700; cursor: pointer;
    box-shadow: 0 6px 20px rgba(212, 175, 55, .3); transition: .2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(212, 175, 55, .42); }

/* ── 视图切换 ── */
.view { display: none; }
.view.active { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Hero 标题 ── */
.hero { text-align: center; margin: 20px 0 24px; }
.hero h1 { font-size: 30px; letter-spacing: 4px; background: linear-gradient(135deg, #fff, var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero .sub { color: var(--text-dim); font-size: 14px; margin-top: 12px; }

/* ── 卡片/表单 ── */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 20px; margin-bottom: 16px;
}
.form label { display: block; margin-bottom: 14px; color: var(--text-dim); font-size: 14px; }
.form input, .form select {
    width: 100%; margin-top: 6px; padding: 12px 14px;
    background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
    color: var(--text); font-size: 15px;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--gold); }
.tip { color: var(--text-dim); font-size: 12px; margin-top: 14px; line-height: 1.7; }

.birth-known { background: rgba(212, 175, 55, .08); border: 1px solid rgba(212, 175, 55, .25); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.known-row { display: flex; align-items: center; gap: 10px; }
.known-label { color: var(--gold); font-weight: 700; font-size: 13px; }
.known-val { color: var(--text); font-size: 14px; }
.known-tip { color: var(--text-dim); font-size: 12px; margin-top: 8px; }
.known-tip a { color: var(--gold); }

.guide-box { background: var(--bg2); border: 1px dashed var(--border); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.guide-title { font-weight: 700; margin-bottom: 6px; }
.guide-box p { color: var(--text-dim); font-size: 13px; }
.guide-btn { margin: 10px 0; }
.guide-or { text-align: center; font-size: 12px; margin-top: 6px; }

/* ── 加载视图 ── */
.loading-box { text-align: center; padding: 60px 0; }
.taiji {
    width: 80px; height: 80px; margin: 0 auto 24px; border-radius: 50%;
    background: conic-gradient(#fff 0 50%, #000 50% 100%);
    animation: spin 1.6s linear infinite; position: relative;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress { width: 80%; max-width: 320px; height: 6px; margin: 20px auto; background: var(--bg2); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #ffe08a); transition: width .4s; }
.loading-hint { color: var(--text-dim); font-size: 13px; }

/* ── 结果工具栏 ── */
.result-toolbar { display: flex; gap: 10px; margin-bottom: 16px; }

/* ── 日期条 ── */
.date-bar {
    text-align: center; padding: 14px; margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, .12), rgba(139, 90, 43, .08));
    border: 1px solid rgba(212, 175, 55, .22); border-radius: 14px;
}
.db-trade { font-size: 13px; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.db-solar { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.db-week { font-size: 14px; color: var(--gold); margin-left: 6px; }
.db-lunar { color: var(--text-dim); font-size: 13px; margin-top: 6px; letter-spacing: 1px; }

/* ── 财运指数 Hero ── */
.fortune-hero {
    position: relative; text-align: center; padding: 28px 20px 24px;
    border-radius: 20px; margin-bottom: 16px; overflow: hidden;
    background: var(--card); border: 1px solid var(--border);
}
.fh-glow { position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background: radial-gradient(300px 200px at 50% 0%, currentColor, transparent 70%); }
.grade-excellent { color: #ff5b8a; } .grade-good { color: #4caf72; }
.grade-flat { color: #4a9be6; } .grade-weak { color: #e6a24a; } .grade-low { color: #9aa0b5; }
.fortune-hero .fh-name, .fortune-hero .fh-ring, .fortune-hero .fh-grade,
.fortune-hero .fh-headline { position: relative; z-index: 1; }
.fh-name { color: var(--text-dim); font-size: 14px; margin-bottom: 12px; }
.fh-ring { position: relative; width: 160px; height: 160px; margin: 0 auto; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(163,162,199,.14); stroke-width: 8; }
.ring-fg { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.fh-ring-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fh-score { font-size: 46px; font-weight: 800; line-height: 1; }
.fh-unit { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.fh-grade { font-size: 22px; font-weight: 800; letter-spacing: 3px; margin: 12px 0 8px; }
.fh-headline { color: var(--text); font-size: 15px; font-weight: 600; }

/* ── 行动建议 ── */
.action-card { text-align: center; border-width: 1.5px; }
.act-attack { border-color: rgba(76,175,114,.5); background: linear-gradient(135deg, rgba(76,175,114,.12), transparent); }
.act-defend { border-color: rgba(74,155,230,.5); background: linear-gradient(135deg, rgba(74,155,230,.12), transparent); }
.act-avoid { border-color: rgba(230,90,74,.5); background: linear-gradient(135deg, rgba(230,90,74,.12), transparent); }
.ac-badge { display: inline-block; font-size: 22px; font-weight: 800; letter-spacing: 4px; margin-bottom: 8px; }
.act-attack .ac-badge { color: #6fe0a0; }
.act-defend .ac-badge { color: #7bc0ff; }
.act-avoid .ac-badge { color: #ff8a7a; }
.ac-reason { color: var(--text-dim); font-size: 14px; }

/* ── 面板 ── */
.panel h3 { font-size: 16px; margin-bottom: 14px; letter-spacing: 1px; }
.para { color: var(--text-dim); font-size: 14px; line-height: 1.8; }
.warn-panel { border-color: rgba(230,162,74,.3); }
.warn-panel h3 { color: #e6a24a; }

/* 喜用/忌神标签 */
.wx-line { margin-top: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.wx-label { color: var(--text-dim); font-size: 12px; }
.wx-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.wx-favor { background: rgba(76,175,114,.18); color: #6fe0a0; border: 1px solid rgba(76,175,114,.4); }
.wx-avoid { background: rgba(230,90,74,.15); color: #ff8a7a; border: 1px solid rgba(230,90,74,.35); }
.wx-none { color: var(--text-dim); }

/* 交易时段择时 */
.sess-list { display: flex; flex-direction: column; gap: 10px; }
.sess-item { padding: 12px 14px; background: var(--bg2); border-radius: 10px; border-left: 4px solid var(--border); }
.sess-item.suit-action { border-left-color: #4caf72; background: linear-gradient(90deg, rgba(76,175,114,.1), var(--bg2)); }
.sess-item.suit-watch { border-left-color: #e6604a; background: linear-gradient(90deg, rgba(230,90,74,.1), var(--bg2)); }
.sess-item.suit-neutral { border-left-color: #4a9be6; }
.sess-time { font-size: 16px; font-weight: 800; color: var(--gold); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sess-label { font-size: 12px; color: var(--text-dim); font-weight: 400; background: rgba(212,175,55,.12); padding: 2px 8px; border-radius: 6px; }
.sess-suit { font-size: 14px; font-weight: 700; margin: 4px 0; }
.suit-action .sess-suit { color: #6fe0a0; }
.suit-watch .sess-suit { color: #ff8a7a; }
.suit-neutral .sess-suit { color: #7bc0ff; }
.sess-reason { font-size: 12px; color: var(--text-dim); }
.luck-tip { color: var(--text-dim); font-size: 12px; margin-top: 10px; line-height: 1.7; }

/* 因子拆解 */
.fac-list { display: flex; flex-direction: column; gap: 14px; }
.fac-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.fac-name { font-size: 14px; }
.fac-val { font-size: 16px; font-weight: 800; }
.fac-max { font-size: 12px; color: var(--text-dim); font-weight: 400; }
.fac-bar { height: 8px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.fac-fill { height: 100%; border-radius: 4px; transition: width .8s ease; }
.fac-fill.lv-high { background: linear-gradient(90deg, #4caf72, #6fe0a0); }
.fac-fill.lv-mid { background: linear-gradient(90deg, #4a9be6, #7bc0ff); }
.fac-fill.lv-low { background: linear-gradient(90deg, #e6604a, #ff8a7a); }
.fac-note { color: var(--text-dim); font-size: 12px; margin-top: 6px; }
.disclaimer
.disclaimer { color: var(--text-dim); font-size: 12px; line-height: 1.8; text-align: center; margin-top: 20px; padding: 0 8px; }

@media (max-width: 400px) {
    .sess-time { font-size: 14px; }
    .hero h1 { font-size: 26px; }
}
