/* 八字页面专用样式 */
.bazi-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: calc(100vh - 200px);
    margin-top: 80px;
}

.page-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 1px;
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* 输入表单样式 */
.input-section {
    background: var(--secondary-color);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.form-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 1.2rem;
}

.form-group {
    margin-bottom: 0.8rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.form-control {
    background: var(--dark-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.5rem 0.7rem;
    color: var(--text-color);
    font-size: 0.8rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
    background: var(--dark-color);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.submit-btn {
    background: var(--gradient-accent);
    border: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 212, 255, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.results-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.results-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
}

.results-subtitle {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.rerun-btn {
    background: var(--gradient-gold);
    border: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.4rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.2rem;
}

.rerun-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* 八字摘要 */
.summary-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    text-align: center;
}

.summary-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
}

.summary-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.bazi-summary {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 1px;
}

.info-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
}

.info-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-color);
    transform: scale(1.1);
}

.day-master {
    font-size: 0.8rem;
    color: var(--text-color);
    font-weight: 500;
}

/* 四柱网格 */
.bazi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.bazi-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bazi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
}

.bazi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.pillar-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ganzhi {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.4rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.wuxing {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.wuxing-item {
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    border: 1px solid;
    min-width: 24px;
    text-align: center;
}

/* 五行配色方案 */
.wuxing-item.jin {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border-color: #FFA500;
    box-shadow: 0 1px 3px rgba(255, 215, 0, 0.3);
}

.wuxing-item.mu {
    background: linear-gradient(135deg, #228B22, #32CD32);
    color: #fff;
    border-color: #228B22;
    box-shadow: 0 1px 3px rgba(34, 139, 34, 0.3);
}

.wuxing-item.shui {
    background: linear-gradient(135deg, #4169E1, #87CEEB);
    color: #fff;
    border-color: #4169E1;
    box-shadow: 0 1px 3px rgba(65, 105, 225, 0.3);
}

.wuxing-item.huo {
    background: linear-gradient(135deg, #DC143C, #FF6347);
    color: #fff;
    border-color: #DC143C;
    box-shadow: 0 1px 3px rgba(220, 20, 60, 0.3);
}

.wuxing-item.tu {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: #fff;
    border-color: #8B4513;
    box-shadow: 0 1px 3px rgba(139, 69, 19, 0.3);
}

.shishen {
    font-size: 0.7rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.shensha-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    margin-bottom: 0.4rem;
}

.shensha-tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-color);
    padding: 0.15rem 0.3rem;
    border-radius: 10px;
    font-size: 0.55rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.nayin {
    padding: 0.25rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 3px;
    color: var(--accent-gold);
    font-weight: 500;
    font-size: 0.65rem;
}

/* 十神解析按钮样式 */
.shishen-analysis-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    padding: 0;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin-left: 0.5rem;
}

.shishen-analysis-btn:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.analysis-section {
    margin-bottom: 1rem;
}

.analysis-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-content {
    font-size: 0.8rem;
    color: var(--text-color);
    line-height: 1.5;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    border-left: 3px solid var(--accent-color);
}

.fuxing-list {
    margin-top: 0.8rem;
}

.fuxing-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
}

.fuxing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.fuxing-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
}

.fuxing-detail {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.fuxing-analysis {
    font-size: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
}

/* 称骨信息弹窗样式 */
.chenggu-info {
    max-height: 60vh;
    overflow-y: auto;
}

.info-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-section h4 {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section h4 i {
    color: var(--accent-gold);
}

.info-section p {
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-section li {
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.info-section li:before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.info-section strong {
    color: var(--accent-gold);
    font-weight: 600;
}

/* 大运展示样式 */
.dayun-section {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.dayun-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
}

.dayun-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin-bottom: 1rem;
}

.dayun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.dayun-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dayun-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
}

.dayun-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-gold);
}

.dayun-card.current {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, var(--secondary-color), rgba(0, 212, 255, 0.05));
}

.dayun-card.current::before {
    background: var(--gradient-accent);
}

.dayun-number {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dayun-ganzhi {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.3rem;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

.dayun-age {
    font-size: 0.6rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.dayun-year {
    font-size: 0.55rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.dayun-shishen {
    font-size: 0.6rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.dayun-nayin {
    padding: 0.15rem 0.3rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 2px;
    color: var(--accent-gold);
    font-weight: 500;
    font-size: 0.55rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* 加载动画 */
.loading {
    display: none;
    text-align: center;
    padding: 0.8rem;
}

.spinner {
    width: 25px;
    height: 25px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.4rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 错误提示 */
.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
    padding: 0.6rem;
    border-radius: 5px;
    margin-bottom: 0.8rem;
    display: none;
    font-size: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bazi-container {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .bazi-grid {
        grid-template-columns: 1fr;
    }

    .dayun-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.4rem;
    }

    .dayun-card {
        min-height: 100px;
        padding: 0.5rem;
    }

    .dayun-ganzhi {
        font-size: 0.9rem;
    }

    .ganzhi {
        font-size: 1.1rem;
    }

    .wuxing-item {
        font-size: 0.6rem;
        min-width: 20px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 结果页面加载容器 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    min-height: 400px;
}

.loading-container .spinner {
    margin-bottom: 1rem;
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 错误容器 */
.error-container {
    text-align: center;
    padding: 3rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-container h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}