/* ============================================
   永劫无间Lua脚本售卖站 - 暗黑电竞风主题
   ============================================ */
:root {
    --bg: #000000;
    --card-bg: #0D0D0D;
    --card-border: #1A1A1A;
    --gold: #C8A84E;
    --gold-light: #E0C872;
    --gold-dark: #8B7332;
    --blue: #4A9EFF;
    --blue-dark: #2B6CB0;
    --text: #E0E0E0;
    --text-dim: #888888;
    --text-muted: #555555;
    --danger: #E74C3C;
    --success: #2ECC71;
    --warning: #F39C12;
    --border: #222222;
    --radius: 8px;
    --shadow: 0 2px 16px rgba(0,0,0,0.5);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--gold); cursor: pointer; text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ==================== 页面切换 ==================== */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ==================== 登录页 ==================== */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-logo { text-align: center; margin-bottom: 40px; }
.auth-logo h1 { font-size: 48px; color: var(--text); letter-spacing: 4px; }
.auth-logo p { color: var(--text-dim); margin-top: 8px; font-size: 14px; }

.auth-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.auth-tabs { display: flex; margin-bottom: 30px; border-bottom: 1px solid var(--border); }
.auth-tab {
    flex: 1; padding: 12px; background: none; border: none; color: var(--text-dim);
    font-size: 16px; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.3s;
}
.auth-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.auth-form { display: none; }
.auth-form.active { display: flex; flex-direction: column; gap: 16px; }

.auth-form input {
    background: #111; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 16px; color: var(--text); font-size: 14px; outline: none; transition: border-color 0.3s;
}
.auth-form input:focus { border-color: var(--gold); }

/* ==================== 按钮 ==================== */
.btn-primary {
    background: var(--gold); color: #000; border: none; border-radius: var(--radius);
    padding: 12px 24px; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn-outline {
    background: transparent; color: var(--gold); border: 1px solid var(--gold);
    border-radius: var(--radius); padding: 10px 20px; font-size: 13px; cursor: pointer;
    transition: all 0.3s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-outline:hover { background: var(--gold); color: #000; }

.btn-link { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 13px; padding: 8px; }
.btn-link:hover { color: var(--gold); }

.btn-danger { background: var(--danger); color: #fff; border: none; border-radius: var(--radius); padding: 8px 16px; font-size: 13px; cursor: pointer; }
.btn-danger:hover { opacity: 0.8; }

.btn-success { background: var(--success); color: #000; border: none; border-radius: var(--radius); padding: 8px 16px; font-size: 13px; cursor: pointer; font-weight: 600; }

.btn-back { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: var(--radius); padding: 8px 16px; cursor: pointer; margin-bottom: 20px; font-size: 13px; }
.btn-back:hover { border-color: var(--gold); color: var(--gold); }

.btn-small { padding: 6px 12px; font-size: 12px; border-radius: 4px; }

/* ==================== 顶部导航 ==================== */
.top-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(0,0,0,0.95); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.top-bar-inner {
    max-width: 1400px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; height: 60px; gap: 20px; position: relative;
}

.logo { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: 2px; cursor: pointer; white-space: nowrap; }
.gold { color: var(--gold); }

.mobile-menu { display: flex; align-items: center; flex: 1; gap: 0; order: 1; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-item {
    padding: 8px 14px; color: var(--text-dim); font-size: 14px; cursor: pointer;
    border-radius: var(--radius); transition: all 0.3s; white-space: nowrap;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-item.active { color: var(--gold); }

.nav-user { display: flex; align-items: center; gap: 10px; white-space: nowrap; order: 2; margin-left: auto; }
.user-nickname { color: var(--gold); font-size: 14px; font-weight: 500; }

.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ==================== 主内容区 ==================== */
.main-content { padding-top: 80px; min-height: 100vh; }
.view { display: none; max-width: 1400px; margin: 0 auto; padding: 0 20px 40px; }
.view.active { display: block; }

.view-header { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; flex-wrap: wrap; gap: 12px; }
.view-header h2 { font-size: 24px; color: var(--text); }

/* ==================== Hero横幅 ==================== */
.hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1200 50%, #0a0a0a 100%);
    border: 1px solid var(--gold-dark);
    border-radius: 10px; padding: 60px 140px; text-align: center; margin: 0 0 20px;
}
.hero h1 { font-size: 24px; margin-bottom: 6px; line-height: 1.4; }
.hero h1 .gold { margin-left: 6px; }
.hero-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 14px; display: flex; justify-content: center; gap: 8px; align-items: center; }
.hero-sub .dot { color: var(--gold); }
.hero-actions { display: flex; gap: 10px; justify-content: center; }
.hero-actions button { padding: 8px 24px; font-size: 14px; }

/* ==================== 区块 ==================== */
.section { margin: 40px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.section-title { font-size: 20px; color: var(--text); }
.section-more { color: var(--text-dim); font-size: 13px; cursor: pointer; }
.section-more:hover { color: var(--gold); }

/* ==================== 公告大板块 ==================== */
.section-announcements {
    margin: 30px 0 40px;
    padding: 28px 32px;
    background: linear-gradient(180deg, #0f0f0f 0%, #000 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.section-announcements .section-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
}
.section-announcements .section-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--gold), #e8c84e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 置顶公告 ==================== */
.pinned-announcements { margin-bottom: 16px; }
.pinned-card {
    background: linear-gradient(135deg, #1a1500 0%, #111 50%, #0d0d0d 100%);
    border: 1px solid var(--gold-dark);
    border-radius: 10px; padding: 24px 28px;
    margin-bottom: 14px; cursor: pointer; transition: all 0.3s;
    position: relative; overflow: hidden;
}
.pinned-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: var(--gold); border-radius: 10px 0 0 10px;
}
.pinned-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(200,168,78,0.1); }
.pinned-card .pinned-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pinned-card .pinned-badge { background: var(--gold); color: #000; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 4px; letter-spacing: 1px; }
.pinned-card .pinned-title { font-size: 18px; color: var(--text); font-weight: 600; }
.pinned-card .pinned-meta { color: var(--text-muted); font-size: 13px; display: flex; gap: 12px; padding-left: 4px; }
.pinned-card .pinned-preview { color: var(--text-dim); font-size: 13px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==================== 脚本卡片网格 ==================== */
.script-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.script-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); overflow: hidden; transition: all 0.3s; cursor: pointer;
}
.script-card:hover { border-color: var(--gold-dark); transform: translateY(-2px); box-shadow: var(--shadow); }

.script-card-cover {
    width: 100%; height: 180px; background: #111; display: flex;
    align-items: center; justify-content: center; overflow: hidden;
}
.script-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.script-card-cover .no-image { color: var(--text-muted); font-size: 14px; }

.script-card-body { padding: 16px; }
.script-card-body h3 { font-size: 16px; margin-bottom: 8px; color: var(--text); }
.script-card-body .desc { color: var(--text-dim); font-size: 13px; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }

.script-card-footer { display: flex; justify-content: space-between; align-items: center; }
.script-price { color: var(--blue); font-size: 18px; font-weight: 700; }
.script-price::before { content: '¥'; font-size: 14px; }

.badge { padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge-unlocked { background: rgba(46,204,113,0.15); color: var(--success); }
.badge-locked { background: rgba(136,136,136,0.15); color: var(--text-dim); }
.badge-gold { background: rgba(200,168,78,0.15); color: var(--gold); }

/* ==================== 脚本详情 ==================== */
.detail-header { display: flex; gap: 30px; margin-bottom: 30px; }
.detail-cover { width: 300px; height: 200px; background: #111; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; }
.detail-info h1 { font-size: 28px; margin-bottom: 12px; }
.detail-info .meta { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.detail-info .detail-price { color: var(--blue); font-size: 32px; font-weight: 700; margin-bottom: 20px; }
.detail-info .detail-price::before { content: '¥'; font-size: 20px; }
.detail-info .actions { display: flex; gap: 12px; }

.detail-desc { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; margin-bottom: 30px; }
.detail-desc h3 { margin-bottom: 12px; color: var(--gold); }
.detail-desc .content { color: var(--text-dim); line-height: 1.8; }

.detail-materials { margin-bottom: 30px; }
.detail-materials h3 { margin-bottom: 16px; color: var(--gold); }
.materials-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.materials-gallery img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius); cursor: pointer; }
.materials-gallery video { width: 100%; border-radius: var(--radius); }

/* ==================== 搜索栏 ==================== */
.search-bar { display: flex; gap: 8px; }
.search-bar input {
    background: #111; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 8px 16px; color: var(--text); font-size: 14px; width: 250px; outline: none;
}
.search-bar input:focus { border-color: var(--gold); }

/* ==================== 分类标签 ==================== */
.category-tabs { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.cat-tab {
    padding: 8px 16px; background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 20px; color: var(--text-dim); font-size: 13px; cursor: pointer; transition: all 0.3s;
}
.cat-tab.active, .cat-tab:hover { background: var(--gold); color: #000; border-color: var(--gold); }

/* ==================== 分页 ==================== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 30px 0; }
.pagination button {
    padding: 8px 14px; background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-dim); cursor: pointer; font-size: 13px;
}
.pagination button.active, .pagination button:hover { background: var(--gold); color: #000; border-color: var(--gold); }

/* ==================== 公告列表 ==================== */
.announcement-list { display: flex; flex-direction: column; gap: 12px; }
.announcement-item {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 18px 22px; cursor: pointer; transition: all 0.3s;
    display: flex; justify-content: space-between; align-items: center;
}
.announcement-item:hover { border-color: var(--gold-dark); transform: translateX(4px); }
.announcement-item .title { font-size: 16px; color: var(--text); }
.announcement-item .meta { color: var(--text-muted); font-size: 13px; }
.announcement-item .title { font-size: 15px; color: var(--text); }
.announcement-item .meta { color: var(--text-muted); font-size: 12px; }
.announcement-item .pin-badge { color: var(--gold); font-size: 12px; margin-right: 8px; }

.announcement-type { padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.type-update { background: rgba(74,158,255,0.15); color: var(--blue); }
.type-warning { background: rgba(231,76,60,0.15); color: var(--danger); }
.type-general { background: rgba(136,136,136,0.15); color: var(--text-dim); }

/* ==================== 教程列表 ==================== */
.tutorial-list { display: flex; flex-direction: column; gap: 12px; }
.tutorial-item {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 20px; cursor: pointer; transition: all 0.3s;
}
.tutorial-item:hover { border-color: var(--gold-dark); }
.tutorial-item h3 { font-size: 16px; margin-bottom: 8px; }
.tutorial-item .meta { color: var(--text-dim); font-size: 13px; }

/* ==================== 素材网格 ==================== */
.materials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.material-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); overflow: hidden;
}
.material-card img { width: 100%; height: 200px; object-fit: cover; }
.material-card video { width: 100%; }
.material-card .caption { padding: 12px; font-size: 13px; color: var(--text-dim); }

/* ==================== 解锁步骤 ==================== */
.unlock-steps { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 30px; margin-bottom: 30px; }
.unlock-steps h3 { margin-bottom: 20px; color: var(--gold); }

.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
    width: 32px; height: 32px; background: var(--gold); color: #000;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.step p { color: var(--text-dim); font-size: 14px; padding-top: 4px; }

/* ==================== 支付方式 ==================== */
.payment-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.payment-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 30px; text-align: center;
}
.payment-card h3 { margin-bottom: 20px; color: var(--gold); }
.qr-placeholder {
    width: 200px; height: 200px; margin: 0 auto; background: #111;
    border: 1px dashed var(--border); border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 14px;
}
.qr-placeholder small { font-size: 11px; margin-top: 8px; padding: 0 16px; }
.qr-placeholder img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius); }

/* ==================== 案例展示 ==================== */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.showcase-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 20px;
}
.showcase-card h4 { color: var(--gold); margin-bottom: 8px; }
.showcase-card .features { color: var(--text-dim); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.showcase-card .date { color: var(--text-muted); font-size: 12px; margin-top: 12px; }

/* ==================== 引导卡片 ==================== */
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.guide-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 24px; text-align: center;
}
.guide-icon {
    width: 48px; height: 48px; background: var(--gold); color: #000;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; margin: 0 auto 12px;
}
.guide-card h3 { font-size: 15px; margin-bottom: 6px; }
.guide-card p { color: var(--text-dim); font-size: 13px; }

/* ==================== 表单 ==================== */
.form-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 30px; max-width: 1600px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-dim); font-size: 13px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; background: #111; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px 14px; color: var(--text);
    font-size: 14px; outline: none; font-family: var(--font);
}
.form-group textarea { resize: vertical; min-height: 60px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.search-results {
    background: #111; border: 1px solid var(--border); border-radius: var(--radius);
    max-height: 200px; overflow-y: auto; margin-top: 4px;
}
.search-results .result-item {
    padding: 8px 14px; cursor: pointer; font-size: 13px; color: var(--text-dim);
}
.search-results .result-item:hover { background: rgba(200,168,78,0.1); color: var(--gold); }

/* ==================== Tab切换 ==================== */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab {
    padding: 10px 18px; background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-dim); font-size: 14px; cursor: pointer; transition: all 0.3s;
}
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ==================== 管理后台 ==================== */
.admin-layout { display: flex; gap: 24px; min-height: 600px; }

.admin-sidebar {
    width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px;
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 16px;
}
.admin-nav {
    padding: 12px 18px; background: none; border: none; color: var(--text-dim);
    font-size: 15px; text-align: left; cursor: pointer; border-radius: var(--radius); transition: all 0.3s;
}
.admin-nav.active { background: rgba(200,168,78,0.1); color: var(--gold); }
.admin-nav:hover { color: var(--text); }

.admin-content { flex: 1; min-width: 0; }
.admin-tab { display: none; }
.admin-tab.active { display: block; }

.admin-toolbar { display: flex; gap: 12px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; }
.admin-toolbar input, .admin-toolbar select {
    background: #111; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 16px; color: var(--text); font-size: 14px; outline: none;
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 24px; text-align: center;
}
.stat-card .stat-value { font-size: 36px; font-weight: 700; color: var(--gold); }
.stat-card .stat-label { font-size: 14px; color: var(--text-dim); margin-top: 4px; }

/* ==================== 管理表格 ==================== */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
    padding: 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px;
}
.admin-table th { color: var(--text-dim); font-weight: 500; }
.admin-table td { color: var(--text); }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ==================== 购买记录表格 ==================== */
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td {
    padding: 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px;
}
.history-table th { color: var(--text-dim); }

.status-pending { color: var(--warning); }
.status-confirmed { color: var(--success); }
.status-rejected { color: var(--danger); }
.status-in_progress { color: var(--blue); }
.status-completed { color: var(--success); }

/* ==================== 底部 ==================== */
.footer { margin-top: 60px; padding: 30px 0; border-top: 1px solid var(--border); }
.footer-content { text-align: center; }
.disclaimer { color: var(--text-muted); font-size: 12px; line-height: 1.8; max-width: 800px; margin: 0 auto 16px; }
.footer-links { color: var(--text-dim); font-size: 13px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--gold); }

/* ==================== 弹窗 ==================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 30px; max-width: 600px; width: 100%;
    max-height: 80vh; overflow-y: auto;
}
.modal-box h3 { margin-bottom: 20px; color: var(--gold); }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; justify-content: flex-end; }

/* ==================== Toast ==================== */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 20px; border-radius: var(--radius); font-size: 14px;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    min-width: 200px; box-shadow: var(--shadow);
}
.toast-success { background: rgba(46,204,113,0.9); color: #000; }
.toast-error { background: rgba(231,76,60,0.9); color: #fff; }
.toast-info { background: rgba(74,158,255,0.9); color: #fff; }

@keyframes toastIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(50px); } }

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .top-bar-inner { height: 60px; padding: 0 12px; padding-right: 48px; }
    .logo { font-size: 16px; }
    .menu-toggle {
        display: block; position: absolute; right: 12px; top: 50%;
        transform: translateY(-50%); z-index: 102;
    }
    .nav-user {
        display: flex; align-items: center; gap: 4px;
        font-size: 12px; margin-left: 8px; flex: 1; min-width: 0;
    }
    .nav-user .btn-outline { padding: 3px 6px; font-size: 11px; white-space: nowrap; }
    .nav-loggedin { display: flex; align-items: center; gap: 4px; min-width: 0; }
    .user-nickname { font-size: 12px; max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-menu {
        display: none; position: absolute; top: 100%; right: 12px;
        background: var(--card-bg); border: 1px solid var(--border);
        border-radius: var(--radius); padding: 8px 0; z-index: 101;
        box-shadow: 0 8px 24px rgba(0,0,0,0.6);
        min-width: 160px; max-height: 80vh; overflow-y: auto;
    }
    .mobile-menu.open { display: block; }
    .nav-links {
        display: flex; flex-direction: column; width: 100%; gap: 0;
    }
    .nav-item { padding: 10px 20px; font-size: 15px; border-radius: 0; }
    .nav-item:hover { background: rgba(255,255,255,0.05); }

    .hero { padding: 14px 16px; }
    .hero h1 { font-size: 18px; }
    .hero-actions { flex-direction: column; }
    .hero-actions button { width: 100%; }

    .section-announcements { padding: 20px 16px; margin: 20px 0 30px; }
    .section-announcements .section-title { font-size: 20px; }
    .pinned-card { padding: 18px 20px; }
    .pinned-card .pinned-title { font-size: 16px; }
    .announcement-item { flex-direction: column; align-items: flex-start; gap: 6px; }

    .script-grid { grid-template-columns: 1fr; }
    .detail-header { flex-direction: column; }
    .detail-cover { width: 100%; }

    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .admin-nav { flex: 0 0 auto; }

    .form-row { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .payment-methods { grid-template-columns: 1fr; }

    .search-bar input { width: 150px; }

    .btn-back { display: block; width: 100%; text-align: left; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
