/* Isleocean 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* 亮色模式 */
    --bg-primary: #f9fbfd;
    --bg-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e5e7eb;
    --accent-color: #0F52BA;
    --accent-hover: #0a3d8f;
    --success-color: #065f46;
    --success-bg: #d1fae5;
    --error-color: #991b1b;
    --error-bg: #fee2e2;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(15, 82, 186, 0.15);
}

body.dark-mode {
    /* 暗色模式 */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --success-color: #10b981;
    --success-bg: #065f46;
    --error-color: #ef4444;
    --error-bg: #7f1d1d;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: transparent;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: all 0.3s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* 导航栏 */
nav {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 2px 20px rgba(15, 82, 186, 0.1);
    padding: 16px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    transition: all 0.3s ease;
}

body.dark-mode nav {
    background: rgba(30, 41, 59, 0.88);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex; align-items: center; gap: 12px;
    font-size: 22px; font-weight: 700; color: var(--accent-color);
}

.logo img { width: 36px; height: 36px; object-fit: contain; }

.nav-links {
    display: flex; gap: 28px; font-weight: 500; color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* 主内容区域 */
main {
    padding-top: 80px;
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 82, 186, 0.3);
}

.btn-outline {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hero 区域 */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
    background: linear-gradient(135deg, rgba(240,249,255,0.85) 0%, rgba(224,242,254,0.85) 100%);
    transition: all 0.3s ease;
}

body.dark-mode .hero {
    background: linear-gradient(135deg, rgba(30,41,59,0.85) 0%, rgba(51,65,85,0.85) 100%);
}

.hero h1 {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Section 标题 */
.section-title {
    text-align: center;
    font-size: 28px;
    color: var(--text-primary);
    margin: 40px 0 30px;
}

/* 卡片 */
.card, .price-card {
    background: rgba(255,255,255,0.85);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

body.dark-mode .card, body.dark-mode .price-card {
    background: rgba(30,41,59,0.85);
}

.card:hover, .price-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card h3 {
    font-size: 18px;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.card .price {
    font-size: 24px;
    color: #dc2626;
    margin-bottom: 16px;
}

.card-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--accent-color);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-btn:hover {
    background: var(--accent-hover);
}

/* 价格网格 */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 6%;
    max-width: 1200px;
    margin: 0 auto;
}

.price-card h3 {
    font-size: 20px;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.price-card .item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.price-card .item span {
    color: var(--accent-color);
    font-weight: 600;
}

.price-card .price {
    font-size: 28px;
    color: #dc2626;
    margin: 16px 0;
}

.price-card .btn {
    width: 100%;
    text-align: center;
}

/* 工具区域 */
.tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px 6%;
    max-width: 1000px;
    margin: 0 auto;
}

/* 论坛区域 */
.forum {
    text-align: center;
    padding: 60px 20px;
    background: rgba(240,249,255,0.8);
    transition: all 0.3s ease;
}

body.dark-mode .forum {
    background: rgba(30,41,59,0.8);
}

.forum h2 {
    font-size: 32px;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.forum p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.forum-tags {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.forum-tags span {
    background: #e0f2fe;
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

body.dark-mode .forum-tags span {
    background: #334155;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255,255,255,0.92);
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

body.dark-mode .modal-content {
    background: rgba(30,41,59,0.92);
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    margin: 10px 0;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.modal-content input:focus,
.modal-content select:focus {
    border-color: var(--accent-color);
    outline: none;
}

.close {
    float: right;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-primary);
}

/* 认证选项卡 */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
}

.auth-tabs button {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f1f5f9;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

body.dark-mode .auth-tabs button {
    background: #334155;
}

.auth-tabs button:first-child {
    border-radius: 8px 0 0 8px;
}

.auth-tabs button:last-child {
    border-radius: 0 8px 8px 0;
}

.auth-tabs button.active {
    background: var(--accent-color);
    color: white;
}

/* 验证码输入组 */
.code-group {
    display: flex;
    gap: 12px;
}

.code-group input {
    flex: 1;
}

.code-group button {
    padding: 12px 16px;
    white-space: nowrap;
}

/* 消息提示 */
.message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.message.success {
    background: var(--success-bg);
    color: var(--success-color);
}

.message.error {
    background: var(--error-bg);
    color: var(--error-color);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 32px 20px;
    background: #1e293b;
    color: #94a3b8;
    margin-top: 60px;
    transition: all 0.3s ease;
}

body.dark-mode footer {
    background: #0f172a;
}

footer a {
    color: #60a5fa;
    margin: 0 8px;
}

footer a:hover {
    color: #93c5fd;
}

/* 法律页面 */
.terms-content, .privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.terms-content h1, .privacy-content h1 {
    font-size: 36px;
    color: #0F52BA;
    margin-bottom: 12px;
}

.update-date {
    color: #64748b;
    margin-bottom: 40px;
}

.terms-content section, .privacy-content section {
    margin-bottom: 32px;
}

.terms-content h2, .privacy-content h2 {
    font-size: 22px;
    color: #1e293b;
    margin-bottom: 16px;
}

.terms-content ul, .privacy-content ul {
    padding-left: 24px;
    list-style: disc;
}

.terms-content li, .privacy-content li {
    margin: 8px 0;
    color: #475569;
}

/* Toast 提示 */
.error-toast, .success-toast {
    animation: fadeIn 0.3s ease;
}

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

/* ── 原生 CSS 响应式残留精简（responsive.css 已接管） ── */
@media (max-width: 768px) {
    nav { padding: 12px 4%; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .section-title { font-size: 24px; }
    .price-grid, .tools { padding: 20px 4%; }
    .modal-content { padding: 24px; margin: 20px; }
}

@media (max-width: 480px) {
    .nav-links { gap: 12px; }
}

/* ===== 全局响应式增强 ===== */

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
    z-index: 200;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 1024px) {
    .hamburger { display: flex; }
    
    /* 导航下拉菜单 */
    .nav-links {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 12px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 150;
        gap: 0;
    }
    .nav-links.mobile-open { display: flex; }
    .nav-links a {
        padding: 12px 20px;
        font-size: 15px;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-links a:hover, .nav-links a.active {
        background: #f5f5ff;
    }
}

@media (max-width: 768px) {
    /* 表格响应式 - 横向滚动 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 通用网格单列 */
    .schools-grid, .tools-grid, .price-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Hero 区域 */
    .hero h1 { font-size: 1.6rem !important; }
    .hero p { font-size: 0.95rem !important; }
    
    /* 搜索框 */
    .search-box {
        flex-direction: column !important;
        border-radius: 12px !important;
        padding: 8px !important;
    }
    .search-box button { width: 100% !important; }
    
    /* 卡片 */
    .card, .price-card, .school-card, .tool-card {
        padding: 16px !important;
    }
    
    /* 论坛帖子 */
    .thread-card { padding: 10px !important; }
    .thread-header { gap: 8px !important; }
    .thread-avatar { width: 36px !important; height: 36px !important; }
    .thread-content { font-size: 13px !important; }
    .thread-actions { flex-wrap: wrap; gap: 4px; }
    
    /* 个人主页 */
    .profile-header {
        flex-direction: column !important;
        text-align: center;
        padding: 20px !important;
    }
    .profile-avatar {
        width: 80px !important;
        height: 80px !important;
    }
    .profile-stats { justify-content: center !important; }
    .profile-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 管理后台 */
    .admin-sidebar {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
    }
    .admin-content {
        margin-left: 0 !important;
    }
    .sidebar-menu {
        display: flex !important;
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px !important;
    }
    .sidebar-menu li {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    /* 模态框 */
    .modal-content, .new-thread-form, .thread-detail-content {
        width: 95% !important;
        max-height: 85vh !important;
        border-radius: 12px !important;
    }
    
    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* 余额区域 */
    .balance-amount { font-size: 28px !important; }
    .recharge-options { gap: 8px !important; }
    .recharge-btn { padding: 10px 16px !important; font-size: 13px !important; }
    
    /* 弹窗 */
    .profile-popup { width: 95% !important; }
    
    /* 表单 */
    .form-input, .form-textarea, .form-select {
        font-size: 16px !important; /* 防止 iOS 缩放 */
    }
    
    /* 表情选择器 */
    .emoji-grid, .comment-emoji-grid {
        grid-template-columns: repeat(8, 1fr) !important;
    }
    .emoji-cell, .comment-emoji-cell {
        font-size: 18px !important;
    }
    
    /* 评论图片 */
    .comment-image {
        max-width: 150px !important;
        max-height: 150px !important;
    }
    
    /* 用户菜单 */
    .user-menu { gap: 8px !important; }
    
    /* 分页 */
    .pagination { gap: 4px !important; }
    .page-btn { padding: 6px 12px !important; font-size: 13px !important; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.4rem !important; }
    .stats-grid { grid-template-columns: 1fr !important; }
    .info-grid { grid-template-columns: repeat(2, 1fr) !important; }
    
    /* 论坛 */
    .forum-container { padding: 0 8px !important; margin-top: 60px !important; }
    .post-box { padding: 12px !important; }
    .post-header { flex-direction: column; }
    
    /* 签证页面 */
    .visa-form-grid { grid-template-columns: 1fr !important; }
    
    /* 文书页面 */
    .doc-form-grid { grid-template-columns: 1fr !important; }
    
    /* 管理后台统计 */
    .stat-card { padding: 12px !important; }
    .stat-value { font-size: 1.2rem !important; }
    
    /* 表情选择器 */
    .emoji-grid, .comment-emoji-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }
    .emoji-cell, .comment-emoji-cell {
        font-size: 16px !important;
        width: 28px !important;
        height: 28px !important;
    }
    .comment-image {
        max-width: 120px !important;
        max-height: 120px !important;
    }
    
    /* 客服 */
    .cs-chat { width: calc(100vw - 16px) !important; right: 8px !important; bottom: 70px !important; }
    .cs-float { width: 44px !important; height: 44px !important; font-size: 18px !important; bottom: 12px !important; right: 12px !important; }
    
    /* 页脚 */
    footer { padding: 20px 12px !important; }
}