:root {
    --metal-color: #9b9b9b;
    --wood-color: #8bc34a;
    --water-color: #2196f3;
    --fire-color: #f44336;
    --earth-color: #795548;
}

body {
    background: radial-gradient(circle at 20% 20%, rgba(101, 165, 255, 0.2), transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(255, 185, 113, 0.2), transparent 40%),
                #f5f7fb;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
}

.card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.card-body {
    padding: 2.25rem;
}

.form-label {
    font-weight: 600;
    color: #334155;
}

.form-select, .form-control {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 0.65rem 1rem;
    background-color: #fff;
    transition: all 0.2s ease;
}

.form-select:focus, .form-control:focus {
    border-color: #4c6ef5;
    box-shadow: 0 0 0 0.25rem rgba(76, 110, 245, 0.15);
}

.form-check-input {
    border-radius: 0.5rem;
    border: 1px solid #94a3b8;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 25px rgba(99, 102, 241, 0.3);
}

.result-header {
    border-radius: 16px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(76, 110, 245, 0.08), rgba(14, 165, 233, 0.12));
}

.result-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e293b;
}

.result-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-top: 0.35rem;
}

.result-bazi {
    text-align: center;
}

.result-bazi-label {
    font-size: 0.85rem;
    color: #64748b;
}

.result-bazi-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: #4338ca;
    letter-spacing: 1rem;
}

.summary-panel {
    background: #fff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.25rem;
    position: relative;
    display: inline-block;
}

.panel-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    margin-top: 0.5rem;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.pillar-card {
    border-radius: 14px;
    background: linear-gradient(145deg, #eef2ff, #e0f2fe);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: #312e81;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pillar-card:nth-child(2n) {
    background: linear-gradient(145deg, #fce7f3, #e0f2fe);
    color: #9d174d;
}

.pillar-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.7;
}

.pillar-card-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.element-bars {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.element-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.element-name {
    width: 2.5rem;
    font-weight: 600;
    color: #1f2937;
    text-align: right;
}

.progress {
    height: 1rem;
    border-radius: 999px;
    background-color: #e2e8f0;
    flex: 1;
    overflow: hidden;
}

.progress-bar {
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.bg-metal { background: linear-gradient(135deg, #a855f7, #6366f1); }
.bg-wood { background: linear-gradient(135deg, #22c55e, #4ade80); }
.bg-water { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.bg-fire { background: linear-gradient(135deg, #f97316, #facc15); }
.bg-earth { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.analysis-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.analysis-label {
    width: 110px;
    font-weight: 600;
    color: #475569;
}

.analysis-value {
    flex: 1;
    font-weight: 600;
    color: #4338ca;
    background: rgba(67, 56, 202, 0.08);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.analysis-text {
    margin-bottom: 1rem;
}

.analysis-text-label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.analysis-text-body {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: #334155;
    line-height: 1.7;
}

.priority-list, .lifestyle-suggestion {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.priority-item,
.lifestyle-item {
    border-radius: 12px;
    border-left: 4px solid transparent;
    background: #f8fafc;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-left-color: rgba(99, 102, 241, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.priority-header, .lifestyle-header {
    margin-bottom: 0.4rem;
}

.priority-element, .lifestyle-element {
    font-weight: 600;
}

.chart-container {
    padding: 1.25rem;
    height: auto;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.08));
    border-radius: 14px;
}

.daily-fortune-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.daily-fortune-card {
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(79, 70, 229, 0.08));
    padding: 1.25rem 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.daily-fortune-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.daily-fortune-card-headline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.daily-fortune-card-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.05rem;
}

.daily-fortune-card-level {
    font-size: 0.85rem;
}

.daily-fortune-card-score {
    font-weight: 600;
    color: #4338ca;
    font-size: 1.15rem;
}

.daily-fortune-card-message {
    color: #1e3a8a;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 0.6rem;
}

.daily-fortune-card-notes {
    color: #334155;
    background: rgba(226, 232, 240, 0.6);
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.6rem;
}

.daily-fortune-card-meta {
    font-size: 0.9rem;
    color: #475569;
    margin-top: 0.35rem;
}

.daily-fortune-card-meta span {
    font-weight: 600;
    margin-right: 0.35rem;
}

.priority-list,
.lifestyle-suggestion {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.priority-item,
.lifestyle-item {
    border-left: 4px solid #4e73df;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.priority-item:last-child,
.lifestyle-item:last-child {
    margin-bottom: 0;
}

.priority-header,
.lifestyle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.priority-element,
.lifestyle-element {
    font-weight: 600;
    color: #4e73df;
    font-size: 1.1rem;
}

.priority-role {
    font-weight: 500;
    color: #495057;
}

.priority-intention,
.lifestyle-detail {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
}

.lifestyle-detail span {
    font-weight: 500;
    color: #495057;
    margin-right: 0.25rem;
}

.daily-fortune {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.daily-summary {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.daily-fortune-item {
    border-left: 4px solid #1cc88a;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.daily-fortune-item:last-child {
    margin-bottom: 0;
}

.daily-fortune-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.daily-fortune-element {
    font-weight: 600;
    color: #4e73df;
    font-size: 1.05rem;
}

.daily-fortune-level {
    font-weight: 500;
}

.daily-fortune-message {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.daily-fortune-notes {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.25rem;
}

.daily-fortune-remedy {
    font-size: 0.85rem;
    color: #4e73df;
    margin-bottom: 0.25rem;
}

.daily-fortune-remedy span {
    font-weight: 500;
    margin-right: 0.25rem;
}

.daily-fortune-colors {
    font-size: 0.85rem;
    color: #495057;
}

.daily-fortune-colors span {
    font-weight: 500;
    margin-right: 0.25rem;
}

#result {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .result-bazi-text {
        font-size: 1.4rem;
        letter-spacing: 0.35rem;
    }
    .analysis-label {
        width: 100px;
    }
}
