:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: #334155;
    --border-light: #475569;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--accent-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select {
    font-family: inherit;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    transition: var(--transition);
    outline: none;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.2);
}
textarea { resize: vertical; min-height: 100px; }

/* ── Header ── */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 700; color: var(--text);
}
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; font-weight: 900;
}
.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
    padding: 8px 16px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--bg-card); }
.nav-btn {
    background: var(--primary); color: #fff;
    padding: 8px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; border: none;
    transition: var(--transition);
}
.nav-btn:hover { background: var(--primary-light); color: #fff; transform: translateY(-1px); }
.nav-user {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 12px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 14px;
}
.nav-user:hover { color: var(--text); background: var(--bg-card); }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff;
}
.mobile-toggle {
    display: none; background: none; border: none; color: var(--text);
    font-size: 24px; padding: 8px;
}

/* ── Hero ── */
.hero {
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(79,70,229,0.15) 0%, transparent 60%);
    position: relative; overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(79,70,229,0.2) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 800; line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-muted); max-width: 600px; margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius);
    font-size: 15px; font-weight: 600;
    transition: var(--transition); border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79,70,229,0.4); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--primary)); color: #fff; }
.btn-accent:hover { opacity: 0.9; transform: translateY(-2px); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

/* ── Stats ── */
.stats-bar {
    display: flex; justify-content: center; gap: 48px;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num { font-size: 32px; font-weight: 800; color: var(--accent-light); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Section ── */
.section { padding: 64px 24px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.section-desc { color: var(--text-muted); font-size: 15px; }

/* ── Cards Grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-light); box-shadow: var(--shadow); }
.card-img {
    width: 100%; height: 160px; object-fit: cover;
    background: linear-gradient(135deg, var(--bg-card-hover), var(--bg));
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: var(--text-dim);
}
.card-body { padding: 20px; }
.card-tag {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    background: rgba(79,70,229,0.2); color: var(--primary-light);
    font-size: 12px; font-weight: 600; margin-bottom: 10px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); }
.card-meta { font-size: 12px; color: var(--text-dim); }
.card-price { font-size: 14px; font-weight: 700; color: var(--accent-light); }
.card-price.free { color: var(--success); }
.card-lock { font-size: 12px; margin-right: 4px; }
.course-price-tag {
    display: inline-block; padding: 3px 12px; border-radius: 20px;
    background: rgba(245,158,11,0.2); color: #fcd34d;
    font-size: 13px; font-weight: 700; margin-left: 8px;
}

/* ── Member Cards ── */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.member-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.member-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.6;
}
.member-card:hover { transform: translateY(-4px); border-color: var(--border-light); box-shadow: var(--shadow); }
.member-card-active {
    border-color: var(--accent);
    box-shadow: 0 0 24px rgba(6,182,212,0.2);
}
.member-card-active::before {
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    opacity: 1;
    height: 4px;
}
.member-card-header { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.member-card-name { font-size: 18px; font-weight: 800; }
.member-card-tag {
    padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
    background: rgba(6,182,212,0.2); color: var(--accent-light);
}
.member-card-price {
    font-size: 32px; font-weight: 800; color: var(--accent-light);
    margin-bottom: 12px;
}
.member-card-price span { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.member-card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; min-height: 40px; }
.member-card-features {
    list-style: none; text-align: left; margin-bottom: 24px;
    font-size: 13px; color: var(--text-muted);
}
.member-card-features li { padding: 5px 0; border-bottom: 1px solid var(--border); }
.member-card-features li:last-child { border-bottom: none; }

/* ── Level Badges ── */
.level-badge {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; white-space: nowrap;
}
.level-free { background: rgba(100,116,139,0.2); color: #94a3b8; }
.level-monthly { background: rgba(79,70,229,0.2); color: #818cf8; }
.level-quarterly { background: rgba(6,182,212,0.2); color: #22d3ee; }
.level-yearly {
    background: linear-gradient(135deg, rgba(245,158,11,0.3), rgba(239,68,68,0.3));
    color: #fcd34d;
}
.nav-user {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 14px;
}
.nav-user:hover { color: var(--text); background: var(--bg-card); }
.user-info-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.user-info-wrap span { font-size: 13px; }

/* ── Locked Content ── */
.locked-content {
    background: var(--bg-card); border: 1px dashed var(--border-light);
    border-radius: var(--radius); padding: 48px 24px;
    text-align: center; margin-bottom: 32px;
}
.lock-icon { font-size: 48px; margin-bottom: 16px; }
.locked-content p { color: var(--text-muted); margin-bottom: 20px; font-size: 15px; }

/* ── Profile Layout ── */
.profile-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px; max-width: 1000px; margin: 0 auto;
}
.profile-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
}
.profile-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.profile-card.full-width { grid-column: 1 / -1; }
.member-status { display: flex; align-items: center; gap: 8px; margin-top: 4px; }

/* ── Orders List ── */
.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-item {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 16px; background: var(--bg); border-radius: var(--radius-sm);
    font-size: 13px;
}
.order-no { font-weight: 700; color: var(--accent-light); min-width: 130px; }
.order-info { flex: 1; color: var(--text-muted); }
.order-date { color: var(--text-dim); font-size: 12px; }

/* ── Category Cards ── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 0 20px rgba(79,70,229,0.2); }
.cat-icon {
    width: 56px; height: 56px; margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.cat-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.cat-count { font-size: 12px; color: var(--text-muted); }

/* ── Course Detail ── */
.course-detail { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.course-hero {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
}
.course-cover {
    width: 100%; height: 280px; object-fit: cover;
    background: linear-gradient(135deg, var(--primary-dark), var(--bg));
    display: flex; align-items: center; justify-content: center;
    font-size: 72px; color: var(--text-dim);
}
.course-info { padding: 32px; }
.course-info h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.course-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.course-meta span { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.course-desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 24px; }
.course-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tag { padding: 4px 12px; border-radius: 20px; background: var(--bg); color: var(--text-muted); font-size: 12px; border: 1px solid var(--border); }
.course-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.course-content-area {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
}
.course-content-area h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.course-content-area p { color: var(--text-muted); line-height: 1.8; white-space: pre-wrap; }
.comments-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.comments-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.comment-form { margin-bottom: 24px; }
.comment-form textarea { margin-bottom: 10px; }
.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-user { font-size: 14px; font-weight: 600; color: var(--accent-light); margin-bottom: 6px; }
.comment-date { font-size: 12px; color: var(--text-dim); margin-left: 8px; }
.comment-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Auth Pages ── */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%; max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.auth-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; text-align: center; }
.auth-card .subtitle { color: var(--text-muted); text-align: center; margin-bottom: 28px; font-size: 14px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-group input { background: var(--bg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-footer a { color: var(--accent-light); }
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--text-dim); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.msg { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px; }
.msg-error { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.msg-success { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }

/* ── Admin Panel ── */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
    width: 240px; background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 24px 0; flex-shrink: 0;
}
.admin-sidebar-title {
    padding: 0 20px 16px;
    font-size: 12px; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; color: var(--text-muted);
    font-size: 14px; transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active { color: var(--text); background: rgba(79,70,229,0.1); border-left: 3px solid var(--primary); }
.admin-main { flex: 1; padding: 32px; overflow-y: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-header h1 { font-size: 22px; font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.stat-card-num { font-size: 28px; font-weight: 800; color: var(--accent-light); }
.stat-card-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.admin-table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    text-align: left; padding: 12px 16px;
    font-size: 12px; font-weight: 600; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
}
.admin-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(79,70,229,0.05); }
.badge {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.badge-pending { background: rgba(245,158,11,0.2); color: #fcd34d; }
.badge-approved { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.badge-active { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.badge-inactive { background: rgba(100,116,139,0.2); color: #94a3b8; }
.action-btns { display: flex; gap: 6px; }
.action-btns button, .action-btns a {
    padding: 5px 10px; border-radius: 6px; font-size: 12px;
    border: none; font-weight: 600; transition: var(--transition);
}
.btn-edit { background: rgba(79,70,229,0.2); color: var(--primary-light); }
.btn-edit:hover { background: var(--primary); color: #fff; }
.btn-del { background: rgba(239,68,68,0.2); color: #fca5a5; }
.btn-del:hover { background: var(--danger); color: #fff; }
.btn-approve { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.btn-approve:hover { background: var(--success); color: #fff; }

/* ── Modal ── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 22px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px;
}

/* ── WeChat Card ── */
.wechat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    max-width: 360px; margin: 0 auto;
}
.wechat-card-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: #07c160; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
}
.wechat-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.wechat-id {
    display: inline-block; padding: 6px 16px;
    background: rgba(7,193,96,0.15); color: #07c160;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
    margin-bottom: 12px;
}
.wechat-desc { font-size: 13px; color: var(--text-muted); }
.wechat-qr { margin-top: 16px; }
.wechat-qr img { border-radius: var(--radius-sm); max-width: 200px; }

/* ── WeChat Card V2 (Business Card) ── */
.wechat-card-v2 {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(7,193,96,0.3);
    border-radius: 20px;
    max-width: 420px; margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(7,193,96,0.1);
}
.wechat-card-header {
    display: flex; align-items: center; gap: 16px;
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.wechat-avatar {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #07c160, #1aad19);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
}
.wechat-name { font-size: 17px; font-weight: 700; color: #fff; }
.wechat-tag {
    display: inline-block; padding: 2px 8px;
    background: rgba(7,193,96,0.2); color: #07c160;
    border-radius: 10px; font-size: 12px; margin-top: 4px;
}
.wechat-card-body { padding: 16px 24px; }
.wechat-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
}
.wechat-field { color: var(--text-dim); font-size: 13px; width: 70px; flex-shrink: 0; }
.wechat-value { color: #fff; font-size: 14px; flex: 1; font-weight: 500; }
.wechat-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 0; }
.btn-copy-sm {
    padding: 4px 10px; background: rgba(7,193,96,0.2); color: #07c160;
    border: 1px solid rgba(7,193,96,0.3); border-radius: 6px;
    font-size: 12px; cursor: pointer; transition: var(--transition);
}
.btn-copy-sm:hover { background: rgba(7,193,96,0.3); }
.wechat-qr-section { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.wechat-qr img { border-radius: var(--radius-sm); max-width: 140px; }
.wechat-card-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}
.wechat-desc-text { color: var(--text-muted); font-size: 14px; }

/* ── Catalog Page (Reference Site Style) ── */
.catalog-page {
    position: relative;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #0a0b0d 0%, #1a1d24 100%);
}
.catalog-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(0,82,255,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(168,85,247,0.08) 0%, transparent 50%);
    pointer-events: none;
}
.catalog-wrap {
    position: relative; z-index: 1;
    max-width: 920px; width: 100%;
    text-align: center;
}
.catalog-title {
    font-size: 3rem; font-weight: 800;
    background: linear-gradient(90deg, #0052ff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
.catalog-subtitle {
    color: #8a8f98; font-size: 1.1rem; margin-bottom: 4rem;
}
.catalog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}
.catalog-card {
    background: rgba(40, 43, 49, 0.6);
    border: 1px solid rgba(91, 97, 110, 0.3);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    text-decoration: none; color: #fff;
    transition: all 0.25s ease;
    position: relative; overflow: hidden;
    text-align: left;
    display: block;
}
.catalog-card-glow {
    content: '';
    position: absolute; top: -100px; right: -100px;
    width: 300px; height: 300px;
    border-radius: 50%;
    opacity: 0.15;
    transition: opacity 0.3s;
    pointer-events: none;
}
.catalog-card:hover { transform: translateY(-6px); border-color: rgba(0,82,255,0.5); box-shadow: 0 20px 50px rgba(0,82,255,0.15); }
.catalog-card-blue .catalog-card-glow { background: radial-gradient(circle, #0052ff, transparent 70%); }
.catalog-card-blue:hover { border-color: rgba(0,82,255,0.5); box-shadow: 0 20px 50px rgba(0,82,255,0.15); }
.catalog-card-purple .catalog-card-glow { background: radial-gradient(circle, #a855f7, transparent 70%); }
.catalog-card-purple:hover { border-color: rgba(168,85,247,0.5); box-shadow: 0 20px 50px rgba(168,85,247,0.15); }
.catalog-card-gold .catalog-card-glow { background: radial-gradient(circle, #f59e0b, transparent 70%); }
.catalog-card-gold:hover { border-color: rgba(245,158,11,0.5); box-shadow: 0 20px 50px rgba(245,158,11,0.15); }
.catalog-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.catalog-card h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; }
.catalog-card-blue h2 { color: #578bfa; }
.catalog-card-purple h2 { color: #c084fc; }
.catalog-card-gold h2 { color: #f59e0b; }
.catalog-desc { color: #8a8f98; font-size: 1rem; line-height: 1.5; margin-bottom: 1.5rem; }
.catalog-count {
    display: inline-block;
    background: rgba(0, 82, 255, 0.15); color: #578bfa;
    padding: 6px 14px; border-radius: 20px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; font-weight: 600;
}
.catalog-card-purple .catalog-count { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.catalog-card-gold .catalog-count { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.catalog-footer { margin-top: 3rem; }
.catalog-wx {
    display: inline-flex; align-items: center; gap: 16px;
    background: rgba(40, 43, 49, 0.6);
    border: 1px solid rgba(91, 97, 110, 0.3);
    border-radius: 16px; padding: 16px 24px;
}
.wx-label { color: #8a8f98; font-size: 14px; }
.wx-id { color: #07c160; font-size: 18px; font-weight: 700; font-family: monospace; }
.btn-copy-wx {
    padding: 6px 14px; background: rgba(7,193,96,0.2); color: #07c160;
    border: 1px solid rgba(7,193,96,0.3); border-radius: 8px;
    font-size: 13px; cursor: pointer; transition: var(--transition);
}
.btn-copy-wx:hover { background: rgba(7,193,96,0.3); }
.foot { margin-top: 1rem; color: #5b616e; font-size: 0.85rem; }

@media (max-width: 480px) {
    .catalog-title { font-size: 2.2rem; }
    .catalog-card { padding: 2rem 1.5rem; }
    .catalog-wx { flex-direction: column; gap: 10px; }
}
@media (max-width: 768px) {
    .catalog-cards { grid-template-columns: 1fr; }
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent-light); }

/* ── Toast ── */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: var(--shadow);
}
.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--primary); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(10px); } }

/* ── Loading ── */
.loading { display: flex; align-items: center; justify-content: center; padding: 48px; color: var(--text-muted); }
.loading::after {
    content: ''; width: 24px; height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.resource-count { font-size: 13px; color: var(--text-muted); }

/* ── Resource Upload ── */
.resource-upload-area { margin-bottom: 16px; }
.upload-dropzone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(79,70,229,0.03);
}
.upload-dropzone:hover { border-color: var(--primary); background: rgba(79,70,229,0.08); }
.upload-icon { font-size: 36px; margin-bottom: 12px; }
.upload-hint { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.upload-formats { font-size: 12px; color: var(--text-dim); }

/* ── Resource List ── */
.resource-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.resource-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--transition);
}
.resource-item:hover { border-color: var(--border-light); background: var(--bg-card-hover); }
.resource-type {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 6px;
    font-size: 11px; font-weight: 700; white-space: nowrap;
    min-width: 64px; justify-content: center;
}
.resource-type-video { background: rgba(239,68,68,0.15); color: #fca5a5; }
.resource-type-image { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.resource-type-audio { background: rgba(79,70,229,0.15); color: #a5b4fc; }
.resource-type-document { background: rgba(100,116,139,0.15); color: #94a3b8; }
.resource-name { flex: 1; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-size { color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.resource-access { white-space: nowrap; }

/* ── Progress Bar ── */
.progress-bar {
    width: 100%; height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%; width: 0%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ── Resource Links (Course Detail) ── */
.resources-link-list { display: flex; flex-direction: column; gap: 8px; }
.resource-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    font-size: 13px;
}
.resource-link:hover { border-color: var(--primary); background: var(--bg-card-hover); }
.resource-link-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-link-size { color: var(--text-dim); font-size: 12px; white-space: nowrap; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-dim); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 14px; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination button {
    padding: 8px 14px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted); font-size: 13px; cursor: pointer;
    transition: var(--transition);
}
.pagination button:hover, .pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Search Bar ── */
.search-bar {
    display: flex; gap: 10px; margin-bottom: 24px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 6px;
}
.search-bar input { border: none; background: transparent; flex: 1; padding: 8px 12px; }
.search-bar input:focus { box-shadow: none; }
.search-bar button { padding: 8px 20px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 14px; }

/* ── Tab bar ── */
.tab-bar { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab-btn {
    padding: 10px 20px; background: none; border: none;
    color: var(--text-muted); font-size: 14px; font-weight: 500;
    cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent-light); border-bottom-color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav { display: none; }
    .mobile-toggle { display: block; }
    .nav.open {
        display: flex; flex-direction: column;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--bg-card); border-bottom: 1px solid var(--border);
        padding: 16px; gap: 4px;
    }
    .nav.open a { padding: 12px 16px; }
    .hero { padding: 48px 16px; }
    .stats-bar { gap: 24px; }
    .section { padding: 40px 16px; }
    .admin-sidebar { display: none; }
    .admin-main { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .auth-card { padding: 24px; }
    .course-info { padding: 20px; }
    .course-info h1 { font-size: 22px; }
    .cards-grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
