/* bazi.css - Version 3.0 */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* 基础容器 */
.bazi-wrapper {
    max-width: 800px;
    margin: 2rem auto;
    background: #f8f5f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* 表单样式 */
.bazi-form {
    padding: 2rem;
    background: linear-gradient(135deg, #fffaf5 0%, #f8f2eb 100%);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 日期输入定制 */
input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #d4c8b8;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%239C8B6F' d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V9h14v10zM7 11h2v2H7zm4 0h2v2h-2zm4 0h2v2h-2z'/%3E%3C/svg%3E") no-repeat 95% 50%;
    background-size: 24px;
    font-family: inherit;
    color: #5a4d3e;
    transition: all 0.3s ease;
}

/* 结果区域 */
.bazi-result {
    padding: 0 2rem 2rem;
}

.result-container {
}

/* 四柱显示 */
.pillars-section {
    padding: 2rem;
    border-bottom: 2px solid #f0ebe4;
}

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

.pillar-card {
    text-align: center;
    padding: 1rem;
    background: #faf8f5;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.pillar-card:hover {
    transform: translateY(-2px);
}

.pillar-label {
    color: #9C8B6F;
    font-size: 0.9em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* 五行元素样式 */
.elements-section {
    padding: 2rem;
    border-bottom: 2px solid #f0ebe4;
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.element-item {
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.element-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0.1;
}

.element-item.missing {
    background: repeating-linear-gradient(
        45deg,
        #fff5f5,
        #fff5f5 10px,
        #ffecec 10px,
        #ffecec 20px
    );
}

.element-icon {
    font-size: 2.5rem !important;
    margin-bottom: 1rem;
    display: block;
}

.element-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.element-name {
    color: #5a4d3e;
    font-weight: 600;
}

.element-count {
    background: rgba(0,0,0,0.08);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-weight: 700;
}

/* 调整建议样式 */
.adjustment-section {
    padding: 2rem;
    background: #fdfcfb;
}

.adjustment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.adjustment-card {
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    border-left: 4px solid currentColor;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.adjustment-card h4 {
    margin: 1rem 0;
    color: #5a4d3e;
}

.recommendations {
    list-style: none;
    padding-left: 0;
}

.recommendations li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.recommendations li::before {
    content: "•";
    color: currentColor;
    position: absolute;
    left: 0;
}

/* 均衡提示 */
.balance-section {
    padding: 2rem;
    text-align: center;
    background: #f8faf7;
    border-radius: 12px;
    margin: 2rem;
}

.balance-icon {
    font-size: 3rem !important;
    color: #78ab46;
    margin-bottom: 1rem;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .element-item {
        padding: 1rem;
    }
}
/* 缺失元素样式 */
.missing-section {
    padding: 2rem;
    background: #fff9f9;
    border-top: 2px solid #f0ebe4;
    border-bottom: 2px solid #f0ebe4;
}

.missing-element-item {
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--element-color);
    animation: pulseWarning 1.5s infinite;
}

.missing-element-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,0,0,0.05) 10px,
        rgba(255,0,0,0.05) 20px
    );
}

.element-status {
    color: #e74c3c;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
}

@keyframes pulseWarning {
    0% { box-shadow: 0 0 0 0 rgba(231,76,60,0.2); }
    70% { box-shadow: 0 0 0 10px rgba(231,76,60,0); }
    100% { box-shadow: 0 0 0 0 rgba(231,76,60,0); }
}