/* 全局重置与基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

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

.nav-brand a {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
}

.nav-brand i { margin-right: 8px; }

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-menu a {
    color: rgba(255,255,255,0.85);
    padding: 8px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.nav-menu .admin-link {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: white;
    margin: 4px 0;
    border-radius: 3px;
    transition: 0.3s;
}

/* 汉堡菜单响应式 */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #6c5ce7, #a29bfe);
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    .nav-menu.active { display: flex; }
    .nav-menu a { padding: 12px 20px; }
}

/* Hero Banner */
.hero {
    background: linear-gradient(135deg, #6c5ce7 0%, #fd79a8 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero-stats { flex-direction: column; gap: 20px; }
}

/* 筛选栏 */
.filter-section {
    background: white;
    padding: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 70px;
    z-index: 999;
}

.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 30px;
    padding: 0 15px;
    flex: 1;
    min-width: 200px;
}

.search-box i { color: #999; margin-right: 10px; }

.search-box input {
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.filter-bar select {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
}

.filter-bar select:focus {
    border-color: #6c5ce7;
}

.filter-bar .btn {
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .filter-bar { flex-direction: column; }
    .search-box { width: 100%; }
    .filter-bar select { width: 100%; }
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.5);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-block { width: 100%; }

/* 通用标题 */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2d3436;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #6c5ce7, #fd79a8);
    border-radius: 2px;
}

.section-title i { margin-right: 10px; color: #6c5ce7; }

/* 学校卡片网格 */
.schools-section {
    padding: 60px 0;
    background: #fff;
}

.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.school-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid #f0f0f0;
}

.school-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.15);
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(232, 67, 147, 0.3);
}

.school-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: 0.4s;
}

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

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2d3436;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #636e72;
    font-size: 0.95rem;
}

.card-meta i { margin-right: 5px; }

.rating i { color: #fdcb6e; }
.rating i.active { color: #fdcb6e; }

.card-desc {
    color: #636e72;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #6c5ce7;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-actions .btn-compare {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.card-actions .btn-compare:hover {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
}

@media (max-width: 768px) {
    .schools-grid { grid-template-columns: 1fr; }
}

/* 排行榜 */
.ranking-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa, #fff);
}

.ranking-list {
    max-width: 800px;
    margin: 0 auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    gap: 20px;
}

.ranking-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.1);
}

.rank-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ranking-item:nth-child(1) .rank-number { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.ranking-item:nth-child(2) .rank-number { background: linear-gradient(135deg, #bdc3c7, #95a5a6); }
.ranking-item:nth-child(3) .rank-number { background: linear-gradient(135deg, #e67e22, #d35400); }

.ranking-item img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.rank-info {
    flex: 1;
}

.rank-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.rank-info p {
    color: #636e72;
    font-size: 0.9rem;
}

.rank-rating {
    text-align: center;
}

.rank-rating .stars {
    margin-bottom: 5px;
}

.rank-rating .stars i {
    color: #ddd;
    font-size: 0.9rem;
}

.rank-rating .stars i.active {
    color: #fdcb6e;
}

.rank-rating span {
    font-weight: 700;
    color: #2d3436;
}

/* 用户评价 */
.reviews-section {
    padding: 60px 0;
    background: #fff;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.review-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 16px;
    transition: 0.3s;
}

.review-card:hover {
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.review-header i {
    font-size: 2.5rem;
    color: #6c5ce7;
}

.review-header .stars i { font-size: 0.9rem; }

.review-card p {
    color: #636e72;
    margin-bottom: 10px;
}

.review-card small {
    color: #999;
}

/* 地图 */
.map-section {
    padding: 60px 0;
    background: #f8f9fa;
}

#map {
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 2px solid white;
}

/* 咨询表单 */
.consult-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #6c5ce7, #fd79a8);
    color: white;
}

.consult-section .section-title { color: white; }
.consult-section .section-title::after { background: white; }

.consult-form {
    max-width: 600px;
    margin: 30px auto 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.consult-form input,
.consult-form select,
.consult-form textarea {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    background: rgba(255,255,255,0.95);
    transition: 0.3s;
}

.consult-form input:focus,
.consult-form select:focus,
.consult-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.4);
}

.consult-form .btn {
    background: white;
    color: #6c5ce7;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.consult-form .btn:hover {
    transform: translateY(-2px);
}

/* 对比栏 */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 15px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.compare-bar span { font-weight: 600; }

/* 页脚 */
.footer {
    background: #2d3436;
    color: #dfe6e9;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 15px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #b2bec3;
    transition: 0.3s;
}

.footer-col a:hover {
    color: #6c5ce7;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #636e72;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #a29bfe;
}

/* 管理后台 */
.admin-body { background: #f0f2f5; }

.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #2d3436;
    color: white;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar h2 {
    margin-bottom: 30px;
    font-size: 1.4rem;
}

.admin-sidebar ul li {
    margin-bottom: 5px;
}

.admin-sidebar ul li a {
    display: block;
    padding: 12px 15px;
    border-radius: 10px;
    color: #b2bec3;
    transition: 0.3s;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-main {
    margin-left: 250px;
    padding: 30px;
    flex: 1;
}

.admin-section {
    background: white;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #2d3436;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    font-size: 1.2rem;
}

.stat-card i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.stat-card span {
    font-size: 2rem;
    font-weight: 700;
}

.admin-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    width: 100%;
    outline: none;
    transition: 0.3s;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: #6c5ce7;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #2d3436;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #6c5ce7, #fd79a8);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 400px;
    max-width: 90%;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3436;
}

.alert {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.text-center { text-align: center; }
.mt-2 { margin-top: 20px; }

/* 静态内页通用样式 */
.page-banner {
    background: linear-gradient(135deg, #6c5ce7, #fd79a8);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-content {
    padding: 60px 0;
    background: #fff;
}

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

.detail-header img {
    width: 400px;
    max-width: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.detail-info {
    flex: 1;
}

.detail-info h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.detail-meta span {
    background: #f0f0f0;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
}

.detail-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-courses .tag {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 新闻资讯列表 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card .news-body {
    padding: 20px;
}

.news-card h3 {
    margin-bottom: 10px;
}

.news-card p {
    color: #636e72;
    margin-bottom: 15px;
}

.news-card .news-meta {
    color: #999;
    font-size: 0.9rem;
}

/* 对比页面 */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.compare-table th,
.compare-table td {
    padding: 15px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.compare-table th {
    background: #f8f9fa;
    font-weight: 700;
}

.compare-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-sidebar { width: 100%; height: auto; position: relative; }
    .admin-main { margin-left: 0; }
    .detail-header { flex-direction: column; }
    .news-grid { grid-template-columns: 1fr; }
    .reviews-grid { grid-template-columns: 1fr; }
}

/* 工具类 */
.text-center { text-align: center; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }