/* ===== VPN Hub - Modern UI ===== */
:root {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --primary-glow: rgba(99,102,241,0.3);
    --bg: #0b1120;
    --bg-elevated: #111827;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-solid: #1e293b;
    --bg-card-hover: #334155;
    --bg-glass: rgba(15, 23, 42, 0.6);
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: rgba(148, 163, 184, 0.1);
    --border-light: rgba(148, 163, 184, 0.2);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle grid background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Ambient glow blobs */
body::after {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }

::selection { background: var(--primary); color: white; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== 导航栏 ===== */
.navbar {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.navbar .logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.02em;
}

.navbar .logo .icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #c084fc);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    position: relative;
}
.nav-links a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}
.nav-links a.active {
    color: var(--primary-light);
    background: rgba(99,102,241,0.1);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-xs);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    font-family: var(--font);
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    box-shadow: 0 0 20px rgba(99,102,241,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(99,102,241,0.4);
}
.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
    border-color: rgba(255,255,255,0.2);
}
.btn-success {
    background: linear-gradient(135deg, #059669, #34d399);
    color: white;
    box-shadow: 0 0 20px rgba(52,211,153,0.3);
}
.btn-success:hover { transform: translateY(-2px); }
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #f87171);
    color: white;
    box-shadow: 0 0 20px rgba(248,113,113,0.3);
}
.btn-danger:hover { transform: translateY(-2px); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }

/* ===== Page containers ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; position: relative; z-index: 1; }
.container-sm { max-width: 440px; margin: 2.5rem auto; padding: 0 1rem; position: relative; z-index: 1; }

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 6rem 2rem 5rem;
    background: linear-gradient(180deg, rgba(99,102,241,0.08) 0%, transparent 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, rgba(192,132,252,0.05) 40%, transparent 70%);
    animation: heroGlow 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes heroGlow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
    50% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    position: relative;
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--primary-light), #c084fc, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    position: relative;
    line-height: 1.8;
}
.hero .hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    position: relative;
}

/* Floating particles */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.hero-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}
.hero-particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 25%; top: 60%; animation-delay: 1s; }
.hero-particles span:nth-child(3) { left: 50%; top: 30%; animation-delay: 2s; }
.hero-particles span:nth-child(4) { left: 70%; top: 70%; animation-delay: 3s; }
.hero-particles span:nth-child(5) { left: 85%; top: 40%; animation-delay: 4s; }
.hero-particles span:nth-child(6) { left: 40%; top: 80%; animation-delay: 5s; }
@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; }
    50% { transform: translateY(-30px) scale(1.5); opacity: 0.5; }
}

/* ===== Features ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: -3rem;
    position: relative;
    z-index: 1;
}
.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #c084fc);
    opacity: 0;
    transition: opacity 0.3s;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99,102,241,0.2);
}
.feature-card:hover::before { opacity: 1; }
.feature-card .icon-lg {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(192,132,252,0.2));
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.5rem;
    transition: var(--transition);
}
.feature-card:hover .icon-lg {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--primary-glow);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; font-weight: 700; }
.feature-card p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; }

/* ===== Plan cards ===== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.plan-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}
.plan-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 8px 40px rgba(99,102,241,0.15);
}
.plan-card:hover::before { opacity: 1; }
.plan-card.featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(192,132,252,0.05));
    box-shadow: 0 0 40px rgba(99,102,241,0.1);
}
.plan-card.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #c084fc);
}
.plan-card.featured:hover {
    box-shadow: 0 8px 50px rgba(99,102,241,0.2);
}
.featured-badge {
    position: absolute;
    top: -1px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), #c084fc);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 0 0 var(--radius-xs) var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.plan-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; font-weight: 700; position: relative; z-index: 1; }
.plan-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1.25rem 0;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}
.plan-card .price span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.plan-card ul {
    list-style: none;
    margin: 1.5rem 0;
    position: relative;
    z-index: 1;
}
.plan-card ul li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.plan-card ul li::before {
    content: '';
    width: 18px;
    height: 18px;
    background: var(--success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2334d399' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.78 4.97a.75.75 0 0 0-1.06 0L6.75 8.94 5.28 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l4.5-4.5a.75.75 0 0 0 0-1.06z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ===== Auth Cards ===== */
.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #c084fc);
}
.auth-card h2 { text-align: center; margin-bottom: 0.5rem; font-size: 1.5rem; font-weight: 700; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: var(--transition);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-elevated);
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 5.5l3.5 4 3.5-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
.form-error {
    background: var(--danger-bg);
    border: 1px solid rgba(248,113,113,0.3);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-xs);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-error::before { content: '!'; font-weight: 700; }

/* ===== Dashboard ===== */
.dashboard { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .dashboard { grid-template-columns: 1fr; } }

.sidebar {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 84px;
}
.sidebar .user-info { text-align: center; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.sidebar .user-info .avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #c084fc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 25px var(--primary-glow);
}
.sidebar .user-info h3 { font-size: 1rem; font-weight: 600; }
.sidebar .user-info p { font-size: 0.8rem; color: var(--text-muted); }
.sidebar .sub-status {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}
.sidebar .sub-status .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.sidebar .sub-status .value { font-weight: 700; margin-top: 0.25rem; font-size: 0.95rem; }
.sidebar .sub-status .value.active { color: var(--success); }
.sidebar .sub-status .value.expired { color: var(--danger); }

/* Subscription progress bar */
.sub-progress {
    margin-top: 0.75rem;
}
.sub-progress .bar-bg {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}
.sub-progress .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #c084fc);
    border-radius: 2px;
    transition: width 0.5s ease;
}
.sub-progress .bar-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-align: right;
}

.sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}
.sidebar nav a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}
.sidebar nav a.active {
    background: rgba(99,102,241,0.1);
    color: var(--primary-light);
}
.sidebar nav a .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.main-content { min-width: 0; }

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}
.section-title .title-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(192,132,252,0.2));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* ===== Cards & Tables ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.card-header h3 { font-size: 1rem; font-weight: 600; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}
.stat-card:hover {
    border-color: rgba(99,102,241,0.2);
    transform: translateY(-2px);
}
.stat-card .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-card .value { font-size: 1.75rem; font-weight: 800; margin-top: 0.25rem; letter-spacing: -0.02em; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}
th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.02);
}
tr { transition: var(--transition); }
tr:hover { background: rgba(99,102,241,0.04); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(52,211,153,0.2); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(251,191,36,0.2); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(96,165,250,0.2); }
.badge-primary { background: rgba(99,102,241,0.1); color: var(--primary-light); border: 1px solid rgba(99,102,241,0.2); }

/* ===== Config Generator ===== */
.config-generator {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.config-generator h3 { margin-bottom: 1.25rem; font-weight: 700; }
.config-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.config-list .config-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
.config-item:hover {
    border-color: var(--border-light);
    background: var(--bg-elevated);
}
.config-item .info h4 { font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.config-item .info p { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }
.config-item .actions { display: flex; gap: 0.5rem; }

.code-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    position: relative;
    line-height: 1.6;
    color: var(--text-secondary);
}
.code-block .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}
.code-block .copy-btn:hover {
    color: var(--text);
    border-color: var(--primary);
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}
@keyframes modalSlide {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal h3 { margin-bottom: 1rem; font-weight: 700; }
.modal .close-btn {
    float: right;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}
.modal .close-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.1);
}

/* ===== Admin ===== */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.admin-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.admin-card:nth-child(1)::before { background: linear-gradient(90deg, var(--primary), #c084fc); }
.admin-card:nth-child(2)::before { background: linear-gradient(90deg, #34d399, #6ee7b7); }
.admin-card:nth-child(3)::before { background: linear-gradient(90deg, #fbbf24, #fde68a); }
.admin-card:nth-child(4)::before { background: linear-gradient(90deg, #60a5fa, #93c5fd); }
.admin-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.admin-card .icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.2rem;
}
.admin-card:nth-child(1) .icon-wrap { background: rgba(99,102,241,0.15); }
.admin-card:nth-child(2) .icon-wrap { background: var(--success-bg); }
.admin-card:nth-child(3) .icon-wrap { background: var(--warning-bg); }
.admin-card:nth-child(4) .icon-wrap { background: var(--info-bg); }
.admin-card .num { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.admin-card:nth-child(1) .num { color: var(--primary-light); }
.admin-card:nth-child(2) .num { color: var(--success); }
.admin-card:nth-child(3) .num { color: var(--warning); }
.admin-card:nth-child(4) .num { color: var(--info); }
.admin-card .lbl { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.admin-section { margin-bottom: 2.5rem; }
.admin-section > h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.25rem;
    font-size: 0.875rem;
    animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(12px);
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes toastIn {
    from { transform: translateX(100%) scale(0.95); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 2.5rem 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}
.footer a { color: var(--primary-light); }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    width: 64px;
    height: 64px;
    background: rgba(99,102,241,0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}
.empty-state p { font-size: 0.9rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .dashboard { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .nav-links {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--bg-card-solid);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.75rem 1rem; width: 100%; }
    .nav-toggle { display: block; }

    .hero h1 { font-size: 2rem; }
    .hero .hero-btns { flex-direction: column; align-items: center; }
    .plans-grid { grid-template-columns: 1fr; }
    .config-form { grid-template-columns: 1fr; }
    .container { padding: 1rem; }

    .admin-section .card { overflow-x: auto; }
    table { font-size: 0.8rem; }
    th, td { padding: 0.6rem 0.75rem; }
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* ===== Loading skeleton ===== */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-xs);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Page section header ===== */
.page-header {
    text-align: center;
    padding: 3rem 0 1rem;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ===== Usage guide section ===== */
.guide-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.guide-item {
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.guide-item strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: var(--text);
}
.guide-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}
