/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-link {
    font-size: 1.1rem;
    margin-left: 1rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

/* 主内容区样式 */
.container {
    max-width: 1200px;
}

/* 英雄区块样式 */
.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.jumbotron h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.jumbotron p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* 功能卡片样式 */
.feature-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-card .card-body {
    padding: 2rem;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* 系统特点样式 */
.system-features-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
}

/* 用户反馈样式 */
.testimonial-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.testimonial-card .card-body {
    padding: 2rem;
}

.rating .fa {
    color: #ffc107;
    margin-right: 5px;
}

.avatar-small {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* 常见问题样式 */
.faq-section .card {
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.faq-section .card-header {
    background-color: #f8f9fa;
    cursor: pointer;
}

.faq-section .btn-link {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    width: 100%;
    text-align: left;
}

.faq-section .btn-link:hover {
    color: #007bff;
    text-decoration: none;
}

.faq-section .btn-link:focus {
    text-decoration: none;
    box-shadow: none;
}

/* 快速测算样式 */
.quick-calculation-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 2rem;
}

.quick-calculation-section .form-control {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.quick-calculation-section .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.quick-calculation-section .form-control:focus {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* 页脚样式 */
footer {
    background-color: #343a40;
    color: white;
}

footer a {
    color: #adb5bd;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    text-decoration: none;
}

/* 返回顶部按钮样式 */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

#back-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

/* 八字排盘页面样式 */
.bazi-form-section {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.bazi-form-section .form-group {
    margin-bottom: 1.5rem;
}

.bazi-form-section .form-control {
    border-radius: 5px;
}

/* 八字结果页面样式 */
.bazi-result-section {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.bazi-chart {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.element-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.element-table th,
.element-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.element-table th {
    background-color: #f8f9fa;
}

/* 五行颜色样式 */
.wuxing-wood {
    color: #28a745;
}

.wuxing-fire {
    color: #dc3545;
}

.wuxing-earth {
    color: #fd7e14;
}

.wuxing-metal {
    color: #6c757d;
}

.wuxing-water {
    color: #17a2b8;
}

/* 运势预测页面样式 */
.fortune-year {
    display: flex;
    overflow-x: auto;
    padding: 1rem 0;
}

.fortune-year-item {
    min-width: 120px;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-right: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fortune-year-item:hover,
.fortune-year-item.active {
    background-color: #007bff;
    color: white;
    transform: translateY(-3px);
}

/* 风水建议页面样式 */
.fengshui-room {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* 改运方法页面样式 */
.improvement-method {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.improvement-method h4 {
    color: #007bff;
    margin-bottom: 1rem;
}

/* 关于页面样式 */
.about-content {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.about-content h3 {
    color: #007bff;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* 登录页面样式 */
.login-container {
    max-width: 500px;
    margin: 5rem auto;
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #007bff;
}

.login-container .form-group {
    margin-bottom: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .jumbotron p {
        font-size: 1rem;
    }
    
    .feature-card .card-body {
        padding: 1.5rem;
    }
    
    .icon-circle {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .jumbotron h1 {
        font-size: 1.8rem;
    }
    
    .nav-link {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .quick-calculation-section,
    .system-features-section,
    .bazi-form-section,
    .bazi-result-section {
        padding: 1rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    #back-to-top {
        display: none;
    }
    
    .bazi-result-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}