/* === 全局样式 === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans SC', sans-serif; background: #f9f9fb; color: #222; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { font-weight: 700; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; color: #1a1a2e; }
img { max-width: 100%; display: block; }
.btn { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none; padding: 12px 30px; border-radius: 30px; font-size: 1rem; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(102,126,234,0.3); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102,126,234,0.4); }
.count { font-size: 1rem; color: #888; font-weight: 400; }
.no-result { text-align: center; padding: 40px; color: #999; font-size: 1.2rem; }

/* === 导航栏 === */
.navbar { background: #fff; box-shadow: 0 2px 20px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.logo a { font-size: 1.5rem; font-weight: 900; color: #667eea; }
.logo i { margin-right: 8px; }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { color: #555; font-weight: 500; transition: color 0.3s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: #667eea; }
.nav-links a.active::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 3px; background: #667eea; border-radius: 2px; }
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.hamburger span { width: 28px; height: 3px; background: #333; border-radius: 2px; transition: all 0.3s; }

/* === 英雄区 === */
.hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; text-align: center; padding: 80px 20px; }
.hero h1 { font-size: 2.6rem; margin-bottom: 1rem; font-weight: 900; letter-spacing: 1px; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 2rem; }
.hero-search form { display: flex; max-width: 600px; margin: 0 auto; background: #fff; border-radius: 50px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.hero-search input { flex: 1; border: none; padding: 18px 25px; font-size: 1rem; outline: none; }
.hero-search button { background: #1a1a2e; color: #fff; border: none; padding: 18px 35px; cursor: pointer; font-size: 1rem; transition: background 0.3s; }
.hero-search button:hover { background: #333; }

/* === 分类筛选 === */
.filters { background: #fff; padding: 40px 0; border-bottom: 1px solid #eee; }
.filter-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.filter-btn { padding: 10px 25px; border-radius: 30px; border: 2px solid #e0e0e0; background: #fff; color: #555; font-weight: 500; transition: all 0.3s; }
.filter-btn:hover, .filter-btn.active { background: #667eea; color: #fff; border-color: #667eea; }

/* === 案例卡片网格 === */
.cases-grid { padding: 60px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.card { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 5px 25px rgba(0,0,0,0.06); transition: all 0.3s; }
.card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.card-img { position: relative; cursor: pointer; overflow: hidden; height: 240px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-img img { transform: scale(1.05); }
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; opacity: 0; transition: opacity 0.3s; border-radius: 20px; }
.card-img:hover .overlay { opacity: 1; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 1.3rem; margin-bottom: 8px; }
.card-body p { color: #777; font-size: 0.95rem; margin-bottom: 12px; }
.meta { display: flex; justify-content: space-between; color: #555; font-size: 0.9rem; }

/* === 评分与评论 === */
.reviews-section { background: #fff; padding: 60px 0; }
.reviews-list { max-width: 800px; margin: 0 auto; }
.review-item { background: #f7f7fc; padding: 20px; border-radius: 15px; margin-bottom: 15px; }
.review-header { display: flex; align-items: center; gap: 15px; margin-bottom: 8px; flex-wrap: wrap; }
.stars { color: #ffc107; }
.date { color: #999; font-size: 0.85rem; }
.review-form { max-width: 600px; margin: 40px auto 0; }
.review-form h3 { margin-bottom: 15px; }
.review-form form { display: flex; flex-direction: column; gap: 15px; }
.review-form input, .review-form select, .review-form textarea { padding: 14px; border: 2px solid #e0e0e0; border-radius: 12px; font-size: 1rem; outline: none; transition: border 0.3s; }
.review-form input:focus, .review-form select:focus, .review-form textarea:focus { border-color: #667eea; }
.review-form textarea { min-height: 120px; resize: vertical; }

/* === 预约咨询 === */
.appointment-form { padding: 60px 0; background: linear-gradient(135deg, #f5f7fa, #c3cfe2); }
.appointment-form h2 { text-align: center; }
.appointment-form p { text-align: center; color: #666; margin-bottom: 30px; }
.appointment-form form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.appointment-form input, .appointment-form textarea { padding: 16px; border: 2px solid #ddd; border-radius: 12px; font-size: 1rem; outline: none; }
.appointment-form textarea { min-height: 120px; }
.appointment-form .btn { align-self: center; }

/* === 模态框 === */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; }
.modal-content { position: relative; max-width: 90%; max-height: 90%; }
.close { position: absolute; top: 20px; right: 35px; color: #fff; font-size: 40px; cursor: pointer; }
.compare-container { display: flex; position: relative; width: 800px; height: 500px; max-width: 100%; }
.compare-before, .compare-after { width: 50%; overflow: hidden; position: relative; }
.compare-before img, .compare-after img { width: 100%; height: 100%; object-fit: cover; }
.compare-before span, .compare-after span { position: absolute; bottom: 10px; left: 10px; background: rgba(0,0,0,0.6); color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; }
.compare-slider { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: #fff; cursor: ew-resize; z-index: 10; }
.slider-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: #667eea; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; box-shadow: 0 0 10px rgba(0,0,0,0.3); }

/* === 页脚 === */
footer { background: #1a1a2e; color: #ccc; padding: 40px 0; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { color: #aaa; transition: color 0.3s; }
.footer-links a:hover { color: #fff; }
footer p { font-size: 0.9rem; }

/* === 管理后台样式 === */
.admin-login { display: flex; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, #667eea, #764ba2); }
.login-box { background: #fff; padding: 40px; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); width: 360px; text-align: center; }
.login-box h2 { margin-bottom: 20px; }
.login-box input { width: 100%; padding: 14px; margin-bottom: 15px; border: 2px solid #eee; border-radius: 10px; }
.login-box button { width: 100%; padding: 14px; background: #667eea; color: #fff; border: none; border-radius: 10px; cursor: pointer; font-size: 1rem; }
.login-box a { display: block; margin-top: 15px; color: #667eea; }
.error { color: #e74c3c; margin-bottom: 15px; }

.admin-page { background: #f0f2f5; }
.admin-nav { background: #1a1a2e; color: #fff; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; }
.admin-nav a { color: #ccc; margin-left: 20px; }
.admin-container { max-width: 1200px; margin: 30px auto; padding: 0 20px; }
.admin-container section { background: #fff; border-radius: 15px; padding: 25px; margin-bottom: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.admin-form { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 15px; background: #f7f7fc; border-radius: 12px; }
.admin-form input, .admin-form select { flex: 1 1 180px; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; }
.admin-form button { padding: 12px 25px; background: #667eea; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.admin-list .admin-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #eee; }
.admin-item button { background: #e74c3c; color: #fff; border: none; padding: 6px 15px; border-radius: 6px; cursor: pointer; }
.msg { background: #2ecc71; color: #fff; padding: 15px; border-radius: 10px; margin-bottom: 20px; }

/* === 响应式 === */
@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.1); padding: 20px; gap: 15px; }
    .nav-links.active { display: flex; }
    .hamburger { display: flex; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .hero-search input { padding: 14px 18px; }
    .hero-search button { padding: 14px 20px; }
    .grid { grid-template-columns: 1fr; }
    .compare-container { flex-direction: column; height: auto; }
    .compare-before, .compare-after { width: 100%; height: 250px; }
    .compare-slider { display: none; }
    .modal-content { max-width: 100%; }
}

/* === 内页通用 === */
.page-hero { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; text-align: center; padding: 60px 20px; }
.page-hero h1 { font-size: 2.2rem; }
.page-content { padding: 60px 0; }