/* ============================================
   绿龙日语俱乐部 - 全站统一样式
   （无需额外 style.css）
   ============================================ */

   @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

   * {
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', 'Noto Sans CJK SC', 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
    padding: 20px;
    min-height: 100vh;
}
.container {
    max-width: 700px;
    margin: auto;
    background: white;
    padding: 25px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 600;
}
h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}
label {
    font-weight: 500;
    color: #34495e;
    display: block;
    margin-bottom: 8px;
}
input, select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    transition: 0.3s;
    background: white;
}
input:focus, select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.2);
}
.row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.row .input-group {
    flex: 1;
}
button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76,175,80,0.4);
}
.result {
    margin-top: 25px;
}
/* 卡片通用样式 */
.card {
    background: #f8f9fc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
/* 八字命盘卡片 - 绿色主题 */
.card-bazi {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 5px solid #22c55e;
}
/* 元衡五维卡片 - 紫色主题 */
.card-wuwei {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-left: 5px solid #a855f7;
}
/* 五行能量卡片 - 橙色主题 */
.card-wuxing {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-left: 5px solid #f97316;
}
/* 建议卡片 - 蓝色主题 */
.card-advice {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 5px solid #3b82f6;
}
/* 状态测评卡片 - 青色主题 */
.card-state {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border-left: 5px solid #14b8a6;
    cursor: pointer;
    transition: all 0.2s ease;
}
.card-state:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20,184,166,0.15);
}
.card-state-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-state-header h3 {
    margin-bottom: 0;
}
.expand-icon {
    font-size: 24px;
    color: #14b8a6;
    transition: transform 0.3s ease;
}
.card-state.expanded .expand-icon {
    transform: rotate(180deg);
}
.card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px dashed rgba(0,0,0,0.1);
}
.card p {
    margin: 10px 0;
    line-height: 1.6;
}
.bazi-box {
    background: white;
    padding: 18px;
    border-radius: 16px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 4px;
    margin: 15px 0;
    color: #15803d;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.score-bar {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.score-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
}
.score-label {
    width: 45px;
    font-weight: bold;
    font-size: 16px;
}
.score-fill {
    flex: 1;
    height: 28px;
    background: #e8eaf0;
    border-radius: 14px;
    overflow: hidden;
    margin: 0 12px;
}
.score-fill span {
    display: block;
    height: 100%;
    border-radius: 14px;
    transition: width 0.5s ease;
}
.score-value {
    width: 50px;
    text-align: right;
    font-weight: 500;
}
.error {
    color: #c62828;
    background: #ffebee;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #c62828;
}
.loading {
    text-align: center;
    padding: 30px;
    color: #666;
    background: #f8f9fc;
    border-radius: 16px;
}
ul {
    padding-left: 20px;
    margin: 10px 0;
}
li {
    margin: 8px 0;
    line-height: 1.5;
}
.badge {
    display: inline-block;
    background: rgba(0,0,0,0.08);
    color: #555;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 8px;
}
.status-tag {
    font-size: 12px;
    text-align: center;
    margin-bottom: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #fff3e0;
    color: #e65100;
}
.footer-note {
    font-size: 11px;
    color: #999;
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 12px;
}
.wuwei-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.wuwei-item {
    flex: 1;
    min-width: 100px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.wuwei-item .label {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}
.wuwei-item .value {
    font-size: 24px;
    font-weight: bold;
}
.wuwei-item .value.strong { color: #22c55e; }
.wuwei-item .value.weak { color: #ef4444; }
.wuwei-item .value.mid { color: #f59e0b; }
.wuwei-item .value.up { color: #22c55e; }
.wuwei-item .value.down { color: #ef4444; }
.wuwei-item .value.steady { color: #f59e0b; }

/* 状态测评专用样式 - 初始隐藏 */
.state-content {
    display: none;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(20,184,166,0.3);
}
.card-state.expanded .state-content {
    display: block;
}
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.slider-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #cbdfda;
    border-radius: 10px;
    outline: none;
}
input[type="range"]:focus {
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2c8f82;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,0.2);
    border: none;
}
.slider-value {
    min-width: 45px;
    background: #eef3f1;
    padding: 4px 12px;
    border-radius: 40px;
    text-align: center;
    font-weight: 600;
    color: #1e6b60;
    font-size: 0.9rem;
}
.question-item {
    margin-bottom: 28px;
    border-bottom: 1px solid #d4e2de;
    padding-bottom: 18px;
}
.question-text {
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.radar-container {
    background: #ffffffc9;
    border-radius: 32px;
    padding: 20px;
}
.result-area {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
}
.advice-container {
    flex: 1.2;
    background: #f2fbf8;
    border-radius: 32px;
    padding: 24px;
}
.advice-list {
    list-style: none;
    margin-top: 20px;
}
.advice-list li {
    background: white;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 24px;
    border-left: 8px solid #14b8a6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.btn-state {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}
.btn-state:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}
@media (max-width: 740px) {
    .result-area { flex-direction: column; }
}

/* 第二个按钮样式（与第一个按钮一致） */
#analyzeBtn, #stateToggleBtn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

#analyzeBtn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

#stateToggleBtn {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
}

#analyzeBtn:hover, #stateToggleBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}


/* ==================== 八字增强版样式 ==================== */

.bazi-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
}

.bazi-table th,
.bazi-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
}

.bazi-table th {
    background: #dcfce7;
    color: #166534;
    font-weight: 700;
}

.bazi-table td:first-child {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
    width: 88px;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.meta-item {
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.meta-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.meta-value {
    font-size: 14px;
    color: #0f172a;
    font-weight: 700;
}

.mini-summary {
    margin-top: 16px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 14px;
    padding: 14px 16px;
}

.mini-summary-title {
    font-size: 15px;
    font-weight: 800;
    color: #166534;
    margin-bottom: 8px;
}

.mini-summary ul {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    line-height: 1.75;
}

.score-note {
    margin-top: 14px;
    font-size: 12px;
    color: #666;
    background: rgba(255,255,255,0.65);
    padding: 10px 12px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .bazi-table {
        font-size: 12px;
    }

    .bazi-table th,
    .bazi-table td {
        padding: 8px 6px;
    }
}