/* ===== Shooting Stars ===== */
.shooting-stars { position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.star {
    position: absolute;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, rgba(212,160,23,0.8), transparent);
    top: 15%;
    left: -120px;
    animation: shoot 4s linear infinite;
    opacity: 0;
}
.star.s2 { top:25%; animation-delay:1.5s; width:80px; }
.star.s3 { top:40%; animation-delay:3s; width:100px; }
.star.s4 { top:10%; animation-delay:5s; width:60px; }
.star.s5 { top:55%; animation-delay:7s; width:90px; }

@keyframes shoot {
    0% { left:-120px; opacity:0; transform:rotate(-15deg); }
    5% { opacity:1; }
    60% { opacity:0.6; }
    100% { left:110%; opacity:0; transform:rotate(-15deg); }
}

/* ===== Page Container ===== */
.page-container {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    animation: fadeUp 0.8s ease;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    margin-bottom: 24px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.back-link:hover { border-color: var(--gold); color: var(--gold-light); }

/* ===== Page Hero ===== */
.page-hero {
    text-align: center;
    margin-bottom: 32px;
    padding: 40px 0;
}
.hero-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(212,160,23,0.6);
    animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.page-hero h1 {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #f5d76e, #d4a017, #f5d76e);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}
@keyframes shimmer { 0%{background-position:0% center} 100%{background-position:200% center} }

.hero-desc { font-size: 14px; color: var(--muted); margin-top: 8px; }
.hero-divider { width: 60px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 20px auto 0; }

/* ===== Step Cards ===== */
.step-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    transition: all 0.3s;
}
.step-card:hover { border-color: rgba(212,160,23,0.4); box-shadow: 0 4px 30px rgba(212,160,23,0.05); }

.step-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, var(--gold), #b8860b);
    color: #1a0f0a;
    padding: 3px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}
.step-card h3 { font-size: 17px; color: var(--gold-light); margin-bottom: 8px; margin-top: 4px; }
.step-tip { font-size: 12px; color: var(--muted); margin-bottom: 12px; }

/* ===== Master Grid ===== */
.master-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.master-card {
    position: relative;
    padding: 18px 10px;
    border: 2px solid var(--border);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
}
.master-card.active { border-color: var(--gold); background: rgba(212,160,23,0.05); }
.master-card.active .master-glow { opacity: 1; }
.master-glow { position:absolute; inset:-1px; border-radius:16px; border:1px solid var(--gold); opacity:0; transition:opacity 0.3s; box-shadow: inset 0 0 20px rgba(212,160,23,0.1); }
.master-avatar { font-size: 36px; margin-bottom: 8px; }
.master-name { font-size: 13px; font-weight: 700; color: var(--gold-light); margin-bottom: 4px; }
.master-style { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.master-quote { font-size: 10px; color: var(--gold); font-style: italic; opacity: 0.7; }

/* ===== Fancy Input ===== */
.fancy-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: rgba(10,5,2,0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    line-height: 1.8;
}
.fancy-input:focus { outline:none; border-color:var(--gold); box-shadow:0 0 15px rgba(212,160,23,0.15); }
.fancy-input::placeholder { color: rgba(160,128,96,0.6); }

/* ===== Shake Area ===== */
.shake-area { text-align: center; padding: 20px 0; }
.shake-bowl {
    width: 80px;
    height: 100px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #8b4513, #5c2e0a);
    border-radius: 0 0 40px 40px;
    border: 2px solid var(--gold);
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
}
.bowl-inner { display: flex; gap: 4px; }
.stick { width: 3px; height: 50px; background: linear-gradient(to top, #8b4513, var(--gold-light)); border-radius: 2px; transform-origin: bottom; }
.stick.s2 { transform: rotate(-8deg); height: 55px; }
.stick.s3 { transform: rotate(6deg); height: 48px; }
.shake-bowl.shaking { animation: bowlShake 0.4s ease infinite; }
@keyframes bowlShake { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-10deg)} 75%{transform:rotate(10deg)} }
.shake-hint { font-size: 12px; color: var(--muted); }

/* ===== Main Action Button ===== */
.main-action-btn {
    position: relative;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #6b3410, #8b4513, #6b3410);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    border-radius: 16px;
    font-size: 20px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    margin: 24px 0 16px;
}
.main-action-btn:hover { box-shadow: 0 0 30px rgba(212,160,23,0.3); transform: translateY(-1px); }
.main-action-btn:disabled { opacity: 0.5; }
.btn-glow { position:absolute; inset:0; background:radial-gradient(circle at center, rgba(212,160,23,0.1), transparent); animation: btnPulse 3s infinite; }
@keyframes btnPulse { 0%,100%{opacity:0.3} 50%{opacity:0.8} }

/* ===== Gua Display ===== */
.gua-display {
    text-align: center;
    padding: 32px;
    background: radial-gradient(circle, rgba(212,160,23,0.06) 0%, transparent 70%);
    border: 1px solid var(--gold);
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 0 40px rgba(212,160,23,0.08);
    animation: fadeUp 0.5s ease;
}
.gua-line { font-size: 20px; color: var(--gold); font-family: monospace; margin: 4px 0; letter-spacing: 3px; }
.gua-name { font-size: 28px; font-weight: 900; color: var(--gold-light); margin-top: 16px; text-shadow: 0 0 20px rgba(212,160,23,0.5); }
.gua-detail { font-size: 13px; color: var(--muted); margin-top: 8px; }
.gua-nature { display:inline-block; margin-top:8px; padding:4px 14px; background:rgba(212,160,23,0.15); border:1px solid var(--border); border-radius:50px; font-size:12px; color:var(--gold); }

/* ===== Loading ===== */
.loading-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}
.loading-lotus { font-size: 40px; animation: float 2s ease-in-out infinite; margin-bottom: 12px; }
.loading-card p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.loading-bar { width: 200px; height: 3px; background: var(--border); border-radius: 2px; margin: 0 auto; overflow: hidden; }
.loading-fill { width: 30%; height: 100%; background: var(--gold); border-radius: 2px; animation: loadMove 2s ease-in-out infinite; }
@keyframes loadMove { 0%{width:10%;margin-left:0} 50%{width:60%;margin-left:20%} 100%{width:10%;margin-left:90%} }

/* ===== Result Card ===== */
.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    animation: fadeUp 0.6s ease;
}
.result-header { display:flex; align-items:center; gap:12px; margin-bottom:16px; padding-bottom:14px; border-bottom:1px solid var(--border); }
.rh-avatar { font-size: 36px; }
.result-header strong { font-size: 15px; color: var(--gold-light); display:block; }
.rh-sub { font-size: 11px; color: var(--muted); }
.result-body { font-size: 14px; line-height: 2.2; white-space: pre-wrap; color: var(--text); }

/* ===== Free Notice ===== */
.free-notice { text-align:center; margin-top:24px; padding:12px; font-size:12px; color:var(--muted); border-top:1px solid var(--border); }

/* ===== Pay Modal ===== */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.75);z-index:9999;display:none;align-items:center;justify-content:center}
.modal-overlay.show{display:flex}
.pay-modal{background:linear-gradient(135deg,#2a1a0e,#1a0f0a);border:1px solid var(--gold);border-radius:24px;padding:32px 24px;width:90%;max-width:380px;text-align:center;position:relative;box-shadow:0 20px 80px rgba(0,0,0,0.6),0 0 50px rgba(212,160,23,0.08)}
.pay-close{position:absolute;top:12px;right:16px;background:none;border:none;color:var(--muted);font-size:24px;cursor:pointer}
.pay-buddha{font-size:52px;margin-bottom:12px}
.pay-modal h3{font-size:22px;color:var(--gold-light);margin-bottom:8px}
.pay-desc{font-size:13px;color:var(--muted);margin-bottom:20px;line-height:1.8}
.pay-prices{display:flex;gap:8px;margin-bottom:20px}
.pay-price{flex:1;padding:14px 6px;border:1px solid var(--border);border-radius:12px;cursor:pointer;transition:all 0.2s}
.pay-price.active{border-color:var(--gold);background:rgba(212,160,23,0.08);box-shadow:0 0 15px rgba(212,160,23,0.15)}
.pp-label{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}
.pp-amount{font-size:20px;font-weight:900;color:var(--gold-light)}
.pay-qr{margin:16px auto;width:180px;height:180px;background:#fff;border-radius:14px;padding:10px}
.pay-qr img{width:100%;height:100%;object-fit:contain;border-radius:8px}
.pay-tip{font-size:11px;color:var(--muted);margin:12px 0}
.pay-confirm{width:100%;padding:14px;background:linear-gradient(135deg,var(--gold-light),var(--gold));border:none;border-radius:12px;color:#1a0f0a;font-size:16px;font-weight:700;cursor:pointer;font-family:inherit}

/* clickFade for common.js */
@keyframes clickFade {
    0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(3); opacity: 0; }
}

/* Nav card as link */
a.nav-card { text-decoration: none; color: inherit; }
