/* 八字输入弹窗样式 */
.bazi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.bazi-modal {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bazi-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
}

.bazi-modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.bazi-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10;
}

.bazi-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* 八字显示区域 */
.bazi-display {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.bazi-display-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.bazi-display-content {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 24px;
    font-weight: bold;
}

.bazi-pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.bazi-pillar-label {
    font-size: 12px;
    color: #999;
}

.bazi-pillar-value {
    padding: 8px 16px;
    background-color: #fff;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    min-width: 50px;
}

.bazi-gan,
.bazi-zhi {
    font-weight: bold;
    transition: color 0.3s;
}

.bazi-pillar-value.filled {
    border-color: #4CAF50;
    background-color: #e8f5e9;
}

/* 选择区域 */
.bazi-section {
    margin-bottom: 20px;
}

.bazi-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 4px solid #4CAF50;
}

/* 天干选择 */
.tiangang-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.tiangang-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tiangang-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 50px;
    flex: 1;
}

.tiangang-btn:hover {
    border-color: #4CAF50;
    background-color: #e8f5e9;
}

.tiangang-btn.selected {
    border-color: #4CAF50;
    background-color: #4CAF50;
    color: #fff;
}

.tiangang-btn.yang {
    color: #d32f2f;
}

.tiangang-btn.yin {
    color: #1976d2;
}

.tiangang-btn.yang.selected,
.tiangang-btn.yin.selected {
    color: #fff;
}

.yinyang-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.yinyang-label.yang {
    background-color: #ffebee;
    color: #d32f2f;
}

.yinyang-label.yin {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* 地支选择 */
.dizhi-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dizhi-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dizhi-btn {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 50px;
    flex: 1;
}

.dizhi-btn:hover {
    border-color: #2196F3;
    background-color: #e3f2fd;
}

.dizhi-btn.selected {
    border-color: #2196F3;
    background-color: #2196F3;
    color: #fff;
}

.dizhi-btn.yang {
    color: #d32f2f;
}

.dizhi-btn.yin {
    color: #1976d2;
}

.dizhi-btn.yang.selected,
.dizhi-btn.yin.selected {
    color: #fff;
}

/* 提示信息 */
.bazi-hint {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* 按钮组 */
.bazi-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.bazi-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.bazi-btn-primary {
    background-color: #4CAF50;
    color: #fff;
}

.bazi-btn-primary:hover {
    background-color: #45a049;
}

.bazi-btn-secondary {
    background-color: #f0f0f0;
    color: #666;
}

.bazi-btn-secondary:hover {
    background-color: #e0e0e0;
}

.bazi-date-select-dialog {
    padding: 10px 0;
}

.bazi-date-select-header {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.bazi-date-select-header strong {
    color: #4CAF50;
    font-size: 16px;
}

.bazi-date-select-list {
    max-height: 400px;
    overflow-y: auto;
}

.bazi-date-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.bazi-date-item:hover {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}

.bazi-date-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #4CAF50;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.bazi-date-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 响应式 */
@media (max-width: 768px) {
    .bazi-modal {
        padding: 20px;
        width: 95%;
        max-height: 95vh;
    }
    
    .bazi-display-content {
        font-size: 20px;
        gap: 15px;
    }
    
    .tiangang-btn,
    .dizhi-btn {
        padding: 10px 16px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .bazi-modal {
        padding: 16px;
        width: 95%;
    }
    
    .bazi-modal-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .bazi-modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    
    .bazi-hint {
        font-size: 13px;
        padding: 10px;
    }
    
    .bazi-display {
        padding: 15px;
    }
    
    .bazi-display-content {
        font-size: 16px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .bazi-pillar {
        min-width: 60px;
    }
    
    .bazi-pillar-label {
        font-size: 11px;
    }
    
    .bazi-pillar-value {
        padding: 6px 12px;
        font-size: 18px;
        min-width: 45px;
    }
    
    .bazi-section-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .tiangang-group,
    .dizhi-group {
        gap: 8px;
    }
    
    .tiangang-row {
        gap: 6px;
    }
    
    .tiangang-btn,
    .dizhi-btn {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 45px;
    }
    
    .bazi-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .bazi-btn {
        width: 100%;
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .bazi-date-select-header {
        font-size: 13px;
    }
    
    .bazi-date-select-header strong {
        font-size: 14px;
    }
    
    .bazi-date-item {
        padding: 10px 12px;
    }
    
    .bazi-date-index {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-right: 12px;
    }
    
    .bazi-date-value {
        font-size: 14px;
    }
}
