/* 公共头部样式 */
header.header {
    background: linear-gradient(135deg, #1a535c 0%, #2b7a78 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header.header h1 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: bold;
}

/* 导航按钮组样式 */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.nav-buttons a {
    text-decoration: none;
    display: inline-block;
}

.nav-btn {
    padding: 10px 20px;
    font-size: 14px;
    border: 2px solid transparent;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: white;
    transition: width 0.3s ease;
}

.nav-btn:hover::after {
    width: 100%;
}

.nav-btn:active {
    transform: translateY(0);
}

/* 选中状态 */
.nav-btn.selected {
    transform: scale(1.05);
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.nav-btn.selected::after {
    width: 100%;
}

/* 不同颜色的导航按钮 */
.nav-btn.home {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border-color: #4361ee;
}

.nav-btn.home:hover {
    background: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

.nav-btn.wengua {
    background: linear-gradient(135deg, #f72585 0%, #7209b7 100%);
    border-color: #f72585;
}

.nav-btn.wengua:hover {
    background: linear-gradient(135deg, #7209b7 0%, #f72585 100%);
    box-shadow: 0 4px 12px rgba(247, 37, 133, 0.4);
}

.nav-btn.calendar {
    background: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
    border-color: #4cc9f0;
}

.nav-btn.calendar:hover {
    background: linear-gradient(135deg, #4361ee 0%, #4cc9f0 100%);
    box-shadow: 0 4px 12px rgba(76, 201, 240, 0.4);
}

.nav-btn.qigua {
    background: linear-gradient(135deg, #f9c80e 0%, #f8961e 100%);
    color: #1a535c;
    border-color: #f9c80e;
}

.nav-btn.qigua:hover {
    background: linear-gradient(135deg, #f8961e 0%, #f9c80e 100%);
    box-shadow: 0 4px 12px rgba(249, 200, 14, 0.4);
}

.nav-btn.help {
    background: linear-gradient(135deg, #06d6a0 0%, #118ab2 100%);
    border-color: #06d6a0;
}

.nav-btn.help:hover {
    background: linear-gradient(135deg, #118ab2 0%, #06d6a0 100%);
    box-shadow: 0 4px 12px rgba(6, 214, 160, 0.4);
}

.nav-btn.suanfa {
    background: linear-gradient(135deg, #ef476f 0%, #ffd166 100%);
    border-color: #ef476f;
}

.nav-btn.suanfa:hover {
    background: linear-gradient(135deg, #ffd166 0%, #ef476f 100%);
    box-shadow: 0 4px 12px rgba(239, 71, 111, 0.4);
}

/* 原有的primary和highlight类保留但调整 */
.nav-btn.primary {
    font-weight: bold;
}

.nav-btn.primary.highlight {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-size: 15px;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    justify-content: center;
    margin: 15px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #2b7a78;
    border-radius: 30px 0 0 30px;
    background: white;
    color: #1a535c;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #6b7b7b;
}

.search-input:focus {
    border-color: #1a535c;
    box-shadow: inset 0 0 0 2px rgba(26, 83, 92, 0.2);
}

.search-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #f9c80e 0%, #f8961e 100%);
    color: #1a535c;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #f8961e 0%, #f9c80e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 200, 14, 0.4);
}

/* 底部按钮悬浮固定样式 */
.footer-actions {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    margin-top: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    flex-direction: row !important;
    justify-content: center !important;
    display: flex !important;
    gap: 20px;
}

.footer-btn {
    padding: 10px 25px;
    background: linear-gradient(135deg, #1a535c 0%, #2b7a78 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.3);
}

.footer-btn:hover {
    background: linear-gradient(135deg, #2b7a78 0%, #1a535c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 122, 120, 0.5);
}

/* 为滚动区域添加底部内边距，避免被固定按钮遮挡 */
.content-wrapper {
    padding-bottom: 80px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header.header h1 {
        font-size: 20px;
    }
    
    .nav-buttons {
        gap: 8px;
        margin: 10px 0;
    }
    
    .nav-btn {
        padding: 8px 15px;
        font-size: 13px;
        min-width: 70px;
    }
    
    /* 优化搜索框在中等屏幕上的显示 */
    .search-box {
        margin: 10px 0;
        padding: 0 10px;
        max-width: 90%;
    }
    
    .search-input {
        padding: 11px 18px;
        font-size: 13px;
    }
    
    .search-btn {
        padding: 11px 22px;
        font-size: 13px;
    }
    
    .footer-actions {
        padding: 12px 10px;
        gap: 10px;
    }
    
    .footer-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    header.header {
        padding: 15px 10px;
    }
    
    .nav-buttons {
        gap: 6px;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 60px;
    }
    
    /* 修改搜索框在移动端为水平排列，更适合手机显示 */
    .search-box {
        flex-direction: row;
        max-width: 90%;
        padding: 0 10px;
    }
    
    .search-input {
        flex: 1;
        padding: 10px 15px;
        border-radius: 25px 0 0 25px;
        margin-bottom: 0;
        font-size: 13px;
    }
    
    .search-btn {
        padding: 10px 20px;
        border-radius: 0 25px 25px 0;
        font-size: 13px;
        white-space: nowrap;
    }
}