:root {
    --bg: #050505;
    --gold: #d4af37;
    --crimson: #8b0000;
    --zinc-800: #27272a;
    --text: #e4e4e7;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: "PingFang TC", "Microsoft JhengHei", sans-serif; }

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.stars {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #050505 100%);
    z-index: -1;
}

.container {
    width: 95%;
    max-width: 600px;
    padding: 2rem;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(25px);
    border: 1px solid var(--zinc-800);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

header { text-align: center; margin-bottom: 2rem; }
header h1 { 
    font-size: 1.8rem; 
    color: var(--gold); 
    letter-spacing: 5px;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

label { font-size: 0.85rem; color: var(--gold); font-weight: bold; letter-spacing: 1px; }

input, select {
    background: #111;
    border: 1px solid var(--zinc-800);
    padding: 14px;
    border-radius: 10px;
    color: #fff;
    outline: none;
    transition: 0.3s;
    font-size: 1rem;
}

input:focus { border-color: var(--gold); box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }

.btn-divine {
    width: 100%;
    background: linear-gradient(45deg, var(--crimson), #b22222);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
    letter-spacing: 3px;
    font-size: 1.1rem;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-divine:hover { filter: brightness(1.2); transform: scale(1.02); }

/* 羅盤動畫 */
.compass-wrap {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

.compass {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border: 3px solid var(--gold);
    border-radius: 50%;
    position: relative;
    animation: rotateCompass 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
}

@keyframes rotateCompass {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 結果顯示 */
.results { display: none; animation: slideUp 0.8s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.bazi-info {
    background: rgba(212, 175, 55, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.8;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.lottery-card {
    background: #121212;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    border: 1px solid var(--zinc-800);
    position: relative;
    overflow: hidden;
}

.lottery-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--gold);
}

.lottery-card h3 { font-size: 0.9rem; color: var(--gold); margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; }

.numbers { display: flex; flex-wrap: wrap; gap: 10px; }
.num-circle {
    width: 36px; height: 36px;
    background: #27272a;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

.num-circle.blue { background: #1e40af; }
.num-circle.special { background: var(--crimson); }

footer { text-align: center; font-size: 0.7rem; color: #555; margin-top: 3rem; letter-spacing: 1px; }