* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: "QiPanTitleTC";
    src: url("/static/fonts/qipan-title.woff2") format("woff2");
    font-display: swap;
}

:root {
    --bg: #0a0a0a;
    --card-bg: #141414;
    --border: #2a2a2a;
    --text: #e0e0e0;
    --text-muted: #888;
    --accent: #c9a84c;
    --accent-dim: #8a7035;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--accent);
}

.brand-title {
    font-family: "QiPanTitleTC", "DFKai-SB", "BiauKai", "STKaiti", "KaiTi", serif;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.1em;
}

.input-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.birth-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.birth-input label {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    color: var(--text-muted);
}

input[type="date"],
select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 0.95rem;
    width: 100%;
}

textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 16px;
}

textarea::placeholder {
    color: var(--text-muted);
}

button {
    width: 100%;
    background: var(--accent-dim);
    color: var(--text);
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: var(--accent);
    color: var(--bg);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-section {
    margin-top: 24px;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.result-card,
.result-card * {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.synthesis-text {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 0;
}

.synthesis-text h4 {
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin: 18px 0 8px;
}

.synthesis-text h4:first-child {
    margin-top: 0;
}

.synthesis-text p {
    margin-bottom: 12px;
}

.synthesis-text ol {
    margin: 8px 0 0 1.25rem;
    padding: 0;
}

.synthesis-text li {
    margin-bottom: 8px;
}

.synthesis-text strong {
    color: #f2deb0;
    font-weight: 600;
}

.result-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-item h3 {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.result-item p.small {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.adjustment-item {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    border-left: 2px solid var(--accent-dim);
}

.adjustment-item p {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.adjustment-item .detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.followup-hint {
    margin-top: 20px;
    padding: 12px;
    background: rgba(201, 168, 76, 0.1);
    border-radius: 8px;
    border: 1px solid var(--accent-dim);
}

.followup-hint p {
    font-size: 0.9rem;
    color: var(--accent);
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
