/* 16:9 宽屏容器 - 横向全屏满屏 */
.bazi-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 输入表单 - 全屏满屏 */
.bazi-form {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 30px 50px;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    margin-bottom: 0;
    border: none;
    width: 100%;
}
.bazi-form h2 {
    font-size: 26px;
    color: white;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.form-row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: nowrap; }
.form-group { flex: 1; min-width: 0; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: white;
    font-size: 14px;
}
.form-group select, .form-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}
.form-group select:focus, .form-group input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.3);
    background: white;
}
.radio-group { display: flex; gap: 30px; align-items: center; height: 48px; }
.radio-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 16px; color: white; }
.radio-label input[type="radio"] { width: 20px; height: 20px; cursor: pointer; accent-color: #ffd700; }

/* 按钮美化 */
.btn-group { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 30px; }
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-primary {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}
.btn-success {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}
.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}
.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
}
.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.6);
}

/* 结果区域 - 全屏满屏 */
.bazi-result {
    display: none;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8e8e8 100%);
    margin-top: 0;
    padding: 30px 50px;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: none;
    width: 100%;
}
.bazi-result.show { display: block; animation: fadeIn 0.6s ease; }

/* 加载动画 */
.loading { text-align: center; padding: 50px; }
.loading h3 { margin: 20px 0 10px; font-size: 20px; color: #667eea; }
.loading p { margin: 10px 0 30px; font-size: 16px; color: #666; }
.loading-spinner { width: 80px; height: 80px; border: 6px solid #f3f3f3; border-top: 6px solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 25px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-progress { width: 200px; height: 8px; background: #f0f0f0; border-radius: 4px; margin: 20px auto; overflow: hidden; }
.loading-bar { width: 0%; height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); border-radius: 4px; animation: progress 2s ease-in-out infinite; }
@keyframes progress { 0% { width: 0%; } 50% { width: 70%; } 100% { width: 100%; } }

/* 分析结果样式 */
.result-title {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}
.section-title {
    font-size: 18px;
    color: #333;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* 八字排盘样式 */
.bazi-pan {
    margin-bottom: 30px;
}
.pillars-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.pillar-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 120px;
    transition: all 0.3s ease;
}
.pillar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.pillar-card.highlight {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.pillar-label {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.8;
}
.pillar-ganzhi {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
.pillar-wuxing {
    font-size: 14px;
    margin-bottom: 6px;
}
.pillar-nayin {
    font-size: 12px;
    opacity: 0.7;
}
.pillar-shishen {
    font-size: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* 基本信息样式 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.info-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.info-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.info-value.highlight {
    color: #667eea;
}

/* 命宫胎元样式 */
.minggong-section {
    margin-bottom: 30px;
}
.minggong-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
.minggong-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.minggong-item .label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.minggong-item .value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 神煞分析样式 */
.shensha-section {
    margin-bottom: 30px;
}
.shensha-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
.shensha-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.shensha-item.main {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    grid-column: 1 / -1;
}
.shensha-label {
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
}
.shensha-value {
    font-size: 14px;
    color: #666;
}
.shensha-item.main .shensha-value {
    color: white;
}

/* 五行分布样式 */
.wuxing-section {
    margin-bottom: 30px;
}
.wuxing-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.wuxing-bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.wuxing-bar-label {
    font-size: 16px;
    font-weight: 600;
    min-width: 40px;
}
.wuxing-bar-track {
    flex: 1;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}
.wuxing-bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}
.wuxing-木 { background: linear-gradient(90deg, #9c27b0, #7b1fa2); }
.wuxing-火 { background: linear-gradient(90deg, #4caf50, #388e3c); }
.wuxing-土 { background: linear-gradient(90deg, #f44336, #d32f2f); }
.wuxing-金 { background: linear-gradient(90deg, #ff9800, #f57c00); }
.wuxing-水 { background: linear-gradient(90deg, #2196f3, #1976d2); }
.wuxing-bar-count {
    min-width: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}
.wuxing-desc {
    margin-top: 20px;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

/* 用神分析样式 */
.yongshen-section {
    margin-bottom: 30px;
}
.yongshen-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.yongshen-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.yongshen-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}
.yongshen-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.yongshen-detail-section {
    margin-top: 20px;
    padding: 20px;
    background: #f5f7fa;
    border-radius: 10px;
}
.yongshen-detail h4 {
    margin-top: 0;
    color: #667eea;
}

/* 分析部分样式 */
.analysis-section {
    margin-bottom: 30px;
}
.analysis-text {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}
.analysis-text p {
    margin-bottom: 15px;
}
.analysis-text ul {
    margin-bottom: 15px;
    padding-left: 20px;
}
.analysis-text li {
    margin-bottom: 8px;
}
.analysis-text strong {
    color: #667eea;
}

/* 大运样式 */
.dayun-section {
    margin-bottom: 30px;
}
.dayun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}
.dayun-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 10px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}
.dayun-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.dayun-age {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}
.dayun-pillar {
    font-size: 18px;
    font-weight: 700;
}

/* AI批语样式 */
.ai-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}
.ai-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.ai-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}
.ai-section .ai-avatar {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

/* 对比分析样式 */
.comparison-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #667eea;
}
.comp-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.comp-side {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.comp-side h4 {
    margin-bottom: 18px;
    color: #333;
    font-size: 18px;
}
.comp-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}
.comp-form select:focus {
    border-color: #667eea;
    outline: none;
}

/* 年度运势样式 */
.forecast-content {
    padding: 10px;
}
.forecast-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.forecast-info {
    font-size: 14px;
    color: #666;
    margin: 0;
}
.forecast-current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    margin-bottom: 20px;
}
.forecast-current p {
    margin: 0;
    font-size: 16px;
}
.forecast-section {
    margin: 25px 0;
}
.forecast-section h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}
.forecast-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 10px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}
.forecast-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.forecast-item.current {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.6);
}
.forecast-year {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}
.forecast-pillar {
    font-size: 18px;
    font-weight: 700;
}
.forecast-now {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffd700;
    color: #333;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}
.forecast-tip {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 错误提示样式 */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #f44336;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        flex-wrap: wrap;
    }
    .comp-container {
        grid-template-columns: 1fr;
    }
    .pillars-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .yongshen-values {
        grid-template-columns: repeat(2, 1fr);
    }
    .wuxing-bar-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .wuxing-bar-track {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bazi-form,
    .bazi-result {
        padding: 20px;
    }
    .form-group select,
    .form-group input {
        padding: 12px;
        font-size: 14px;
    }
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    .pillars-container {
        grid-template-columns: 1fr;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .yongshen-values {
        grid-template-columns: 1fr;
    }
    .dayun-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
