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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮 */
.btn-primary {
    background: #1890ff;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-large {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-large:hover {
    background: #ff8555;
    transform: translateY(-2px);
}

/* 头部 */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: #f0f5ff;
    padding: 6px 0;
    font-size: 12px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    background: #1890ff;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 8px;
    font-size: 11px;
}

.header-right a {
    color: #666;
    text-decoration: none;
    margin-left: 20px;
    font-size: 13px;
}

.header-right a:hover {
    color: #1890ff;
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #1890ff;
    font-size: 28px;
    font-weight: bold;
}

.logo span {
    color: #999;
    font-size: 13px;
    margin-left: 10px;
}

.search-box {
    display: flex;
    flex: 0 0 400px;
    margin: 0 40px;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #1890ff;
    border-right: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background: #1890ff;
    color: white;
    border: 2px solid #1890ff;
    padding: 10px 24px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

/* 导航 */
.nav {
    background: #1890ff;
    padding: 0;
}

.nav .container {
    display: flex;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    font-size: 15px;
    transition: background 0.3s;
}

.nav a:hover,
.nav a.active {
    background: rgba(255,255,255,0.15);
}

/* 轮播图 */
.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.banner-item {
    position: relative;
    width: 100%;
    height: 100%;
    display: none;
}

.banner-item.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.banner-content {
    position: relative;
    text-align: center;
    color: white;
    z-index: 1;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* 分类 */
.categories {
    padding: 40px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.category-item {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.category-item:hover {
    background: #e6f7ff;
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(24,144,255,0.15);
}

.category-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.category-item h3 {
    font-size: 15px;
    color: #333;
}

/* 服务列表 */
.services {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    color: #666;
    font-size: 14px;
}

.filter-btn {
    padding: 6px 16px;
    border: 1px solid #d9d9d9;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.service-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b35;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.service-info {
    padding: 16px;
}

.service-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.price-special {
    color: #ff6b35;
    font-size: 18px;
    font-weight: bold;
}

.price-special span {
    font-size: 24px;
}

.price-original {
    color: #999;
    font-size: 13px;
    text-decoration: line-through;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 13px;
}

.service-cycle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.service-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.service-actions button {
    flex: 1;
    padding: 8px;
    border: 1px solid #1890ff;
    background: white;
    color: #1890ff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.service-actions button:hover {
    background: #1890ff;
    color: white;
}

.service-actions button.btn-book {
    background: #1890ff;
    color: white;
}

.service-actions button.btn-book:hover {
    background: #40a9ff;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover,
.pagination button.active {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-large {
    max-width: 700px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.modal-content input:focus {
    outline: none;
    border-color: #1890ff;
}

.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.modal-content textarea:focus {
    outline: none;
    border-color: #1890ff;
}

.modal-content .form-group {
    margin-bottom: 16px;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 详情页 */
.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.detail-image {
    width: 300px;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.detail-price {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 15px;
}

.detail-price .special {
    color: #ff6b35;
    font-size: 28px;
    font-weight: bold;
}

.detail-price .original {
    color: #999;
    font-size: 16px;
    text-decoration: line-through;
}

.detail-meta {
    color: #666;
    margin-bottom: 20px;
}

.detail-meta span {
    margin-right: 20px;
}

.detail-desc {
    line-height: 1.8;
    color: #555;
}

.detail-desc h3 {
    margin: 20px 0 10px;
    color: #333;
}

/* 页脚 */
.footer {
    background: #1a1a2e;
    color: #999;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: #999;
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 14px;
}

.footer-section a:hover {
    color: #1890ff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state img {
    width: 120px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* 响应式 */
@media (max-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-main .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
        margin: 0;
    }
    
    .nav .container {
        flex-wrap: wrap;
    }
    
    .nav a {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner {
        height: 300px;
    }
    
    .banner-content h2 {
        font-size: 32px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-wrap: wrap;
    }
}
