/* AI 算命小站 — v0.2 样式 */

:root {
    --bg: #0f1016;
    --surface: #1a1c24;
    --surface-light: #252836;
    --gold: #f1c40f;
    --gold-dim: #bfa230;
    --text: #f0f0f0;
    --text-secondary: #b0b3c7;
    --accent: #e67e22;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at 50% 0%, #1b1e2b 0%, var(--bg) 80%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.hero {
    text-align: center;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: 1.9rem;
    margin: 0 0 8px;
    color: var(--gold);
    letter-spacing: 1px;
}

.slogan {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(241, 196, 15, 0.12);
    border-radius: var(--radius);
    padding: 22px 18px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.card h2 {
    margin: 0 0 18px;
    font-size: 1.2rem;
    color: var(--gold);
    border-bottom: 1px solid rgba(241, 196, 15, 0.2);
    padding-bottom: 10px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: -8px;
}

.required {
    color: var(--accent);
    margin-left: 4px;
}

input,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: var(--surface-light);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.15);
}

.btn-primary {
    margin-top: 8px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
    color: #1a1500;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s;
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: scale(0.98);
}

.result.hidden {
    display: none;
}

.result-item.hidden {
    display: none;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.result-item {
    background: var(--surface-light);
    border-radius: 10px;
    padding: 14px;
}

.result-item .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.result-item .value {
    display: block;
    font-size: 1.25rem;
    color: var(--gold);
    font-weight: 700;
}

.result-item .desc {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.desc-lines p {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.fortune-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fortune-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-light);
    border-radius: 10px;
    padding: 12px 14px;
}

.fortune-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stars {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.advice-list {
    margin-top: 16px;
}

.advice-list p {
    margin: 0 0 10px;
    padding: 12px 14px;
    background: rgba(241, 196, 15, 0.08);
    border-left: 4px solid var(--gold);
    border-radius: 0 10px 10px 0;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
}

.advice-list p:last-child {
    margin-bottom: 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.tips-column {
    background: var(--surface-light);
    border-radius: 10px;
    padding: 14px;
}

.tips-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.dos .tips-title {
    color: #2ecc71;
}

.donts .tips-title {
    color: #e74c3c;
}

.tips-column ul {
    margin: 0;
    padding-left: 18px;
}

.tips-column li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text);
}

.tips-column li:last-child {
    margin-bottom: 0;
}

.lucky-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.lucky-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-light);
    border-radius: 10px;
    padding: 12px 14px;
}

.lucky-item .label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.lucky-item .value {
    color: var(--gold);
    font-size: 1.15rem;
    font-weight: 700;
}

.lucky-color-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-block {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.stick-text {
    margin: 0 0 12px;
    padding: 16px;
    background: rgba(241, 196, 15, 0.08);
    border-radius: 10px;
    color: var(--gold);
    font-size: 1.15rem;
    text-align: center;
    line-height: 1.7;
}

.stick-explain {
    margin: 0;
    padding: 12px 14px;
    background: var(--surface-light);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.share-wrap {
    text-align: center;
    margin: 24px 0 8px;
}

.btn-share {
    padding: 14px 24px;
    border: 1px solid var(--gold);
    border-radius: 10px;
    background: transparent;
    color: var(--gold);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn-share:hover {
    background: var(--gold);
    color: #1a1500;
}

.btn-share:active {
    transform: scale(0.98);
}

.btn-share.copied {
    background: var(--gold);
    color: #1a1500;
}

.footer {
    text-align: center;
    margin-top: 32px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer p {
    margin: 4px 0;
}

.privacy {
    color: #7a7f94;
    font-size: 0.8rem;
}

.fade-in {
    animation: fadeIn 0.6s ease-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 520px) {
    .result-grid {
        grid-template-columns: 1fr 1fr;
    }

    #hour-box {
        grid-column: 1 / -1;
    }

    .lucky-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
