/* ============================================
   星之翼 AI 创作平台 — Dark Tech Theme
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0f18;
    --bg-secondary: #0e1520;
    --bg-card: #151d28;
    --bg-card-hover: #1a2433;
    --bg-input: #0d1219;
    --bg-nav: rgba(10, 15, 24, 0.92);

    --accent: #49b5ff;
    --accent-light: #6fc7ff;
    --accent-dark: #2e9be6;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #5ce46f;
    --accent-orange: #f3d46d;
    --accent-red: #ff6b78;

    --text-primary: #e8f0fa;
    --text-secondary: #8fa4bd;
    --text-muted: #5a7290;

    --border: #1e2d3d;
    --border-light: #2a3d52;

    --glow-cyan: 0 0 20px rgba(73, 181, 255, 0.15);
    --glow-cyan-strong: 0 0 30px rgba(73, 181, 255, 0.25), 0 0 60px rgba(73, 181, 255, 0.1);
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

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

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, button, textarea, select { font-family: inherit; font-size: inherit; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

/* ---------- Background Effects ---------- */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse 600px 400px at 20% 10%, rgba(73, 181, 255, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Layout ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.page-content {
    padding-top: 80px;
    min-height: 100vh;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 40px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.nav-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--glow-cyan);
}

.nav-logo .logo-text-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.nav-links a {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    background: rgba(73, 181, 255, 0.08);
}

.nav-links a.active {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: #0a0e17;
    box-shadow: var(--glow-cyan);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    box-shadow: var(--glow-cyan-strong);
    color: #0a0e17;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent-dark);
}
.btn-secondary:hover {
    background: rgba(73, 181, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

.btn-danger {
    background: rgba(255, 107, 120, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 107, 120, 0.3);
}
.btn-danger:hover {
    background: rgba(255, 107, 120, 0.25);
}

.btn-success {
    background: rgba(92, 228, 111, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(92, 228, 111, 0.3);
}
.btn-success:hover {
    background: rgba(92, 228, 111, 0.25);
}

/* ---------- Hero Section ---------- */
.hero {
    text-align: center;
    padding: 120px 0 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(73, 181, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(73, 181, 255, 0.08);
    border: 1px solid rgba(73, 181, 255, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 24px;
}

.hero-badge .dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ---------- Search Bar ---------- */
.search-bar {
    max-width: 640px;
    margin: 0 auto 60px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 14px 56px 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition);
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar input:focus {
    border-color: var(--accent-dark);
    box-shadow: var(--glow-cyan);
}

.search-bar button {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: var(--bg-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.search-bar button:hover {
    box-shadow: var(--glow-cyan-strong);
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(73, 181, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.card:hover::before { opacity: 1; }

.card-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
    background: rgba(73, 181, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(73, 181, 255, 0.15);
}

.card-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); border-color: rgba(59, 130, 246, 0.15); }
.card-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); border-color: rgba(139, 92, 246, 0.15); }
.card-icon.green { background: rgba(92, 228, 111, 0.1); color: var(--accent-green); border-color: rgba(92, 228, 111, 0.15); }
.card-icon.orange { background: rgba(243, 212, 109, 0.1); color: var(--accent-orange); border-color: rgba(243, 212, 109, 0.15); }

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------- Section ---------- */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header h2 .gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Grid ---------- */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ---------- Feature Cards (Home) ---------- */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 20px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}

.feature-card:hover {
    border-color: rgba(73, 181, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--glow-cyan);
}

.feature-card .icon {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(73, 181, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(73, 181, 255, 0.12);
    transition: all var(--transition);
}

.feature-card:hover .icon {
    background: rgba(73, 181, 255, 0.15);
    box-shadow: var(--glow-cyan);
}

.feature-card .label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ---------- Stats ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Pricing ---------- */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    position: relative;
    transition: all var(--transition);
}

.pricing-card.featured {
    border-color: var(--accent-dark);
    box-shadow: var(--glow-cyan);
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-blue));
}

.pricing-badge {
    position: absolute;
    top: -12px; right: 24px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    color: var(--bg-primary);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.pricing-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 16px 0;
}

.pricing-card .price .currency { font-size: 1.2rem; vertical-align: top; margin-right: 2px; }
.pricing-card .price .period { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }

.pricing-card .features-list {
    margin: 24px 0;
}

.pricing-card .features-list li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-card .features-list li .check {
    color: var(--accent-green);
    font-size: 1rem;
}

/* ---------- Dashboard Layout ---------- */
.dashboard {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 64px);
    padding-top: 64px;
}

/* ---------- Console Sidebar ---------- */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-brand .logo-text,
.sidebar.collapsed .sidebar-footer .sidebar-link span { display: none; }
.sidebar.collapsed .sidebar-link { justify-content: center; padding: 10px; }
.sidebar.collapsed .sidebar-brand { justify-content: center; }

.sidebar-brand {
    padding: 20px 16px 16px;
    display: flex;
    align-items: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
}

.sidebar-logo .logo-icon {
    font-size: 1.3rem;
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.sidebar-link:hover {
    background: rgba(73, 181, 255, 0.06);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(73, 181, 255, 0.1);
    color: var(--accent);
}

.sidebar-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 8px 10px 16px;
    border-top: 1px solid var(--border);
}

/* ---------- Dashboard Main ---------- */
.dashboard-main {
    padding: 28px 36px;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-balance {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-green);
    background: rgba(92, 228, 111, 0.08);
    padding: 4px 12px;
    border-radius: 100px;
}

.header-user {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---------- Stat Cards (Console) ---------- */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.stat-card.mini {
    padding: 14px 20px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg { width: 18px; height: 18px; }

.stat-icon.cyan  { background: rgba(73,181,255,0.1);  color: var(--accent); }
.stat-icon.blue  { background: rgba(59,130,246,0.1);  color: var(--accent-blue); }
.stat-icon.purple{ background: rgba(139,92,246,0.1);  color: var(--accent-purple); }
.stat-icon.green { background: rgba(92,228,111,0.1);  color: var(--accent-green); }

.stat-body { flex: 1; min-width: 0; }

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-value.sm { font-size: 1.15rem; }
.stat-value.tier { color: var(--accent); }

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---------- Tables ---------- */
.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-wrap .table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.table-wrap .table-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    padding: 12px 24px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 14px 24px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

table tbody tr:last-child td { border-bottom: none; }

table tbody tr:hover { background: rgba(73, 181, 255, 0.03); }

/* ---------- Status Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(92, 228, 111, 0.12); color: var(--accent-green); }
.badge-warning { background: rgba(243, 212, 109, 0.12); color: var(--accent-orange); }
.badge-danger { background: rgba(255, 107, 120, 0.12); color: var(--accent-red); }
.badge-info { background: rgba(73, 181, 255, 0.12); color: var(--accent); }
.badge-neutral { background: rgba(100, 116, 139, 0.12); color: var(--text-muted); }

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
    border-color: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(73, 181, 255, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ---------- Auth Pages ---------- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 24px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-blue));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-card .auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Console Cards ---------- */
.console-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.console-card.no-pad .console-card-body { padding: 0; }

.console-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.console-card-header h3 {
    font-size: 0.92rem;
    font-weight: 600;
}

.console-card-body {
    padding: 16px 20px;
}

.link-more {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.link-more:hover { color: var(--accent); }

/* ---------- Console Table ---------- */
.console-table {
    width: 100%;
    border-collapse: collapse;
}

.console-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.console-table td {
    padding: 10px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.console-table tbody tr:last-child td { border-bottom: none; }
.console-table tbody tr:hover { background: rgba(73, 181, 255, 0.03); }

.mono { font-family: var(--font-mono); font-size: 0.8rem; }
.text-xs { font-size: 0.75rem; }

.cell-name { font-weight: 600; color: var(--text-primary); }

.key-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.key-masked {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    background: rgba(73,181,255,0.06);
    padding: 2px 8px;
    border-radius: 4px;
}

.usage-cell { line-height: 1.6; }

.badge-sm { font-size: 0.7rem; padding: 2px 8px; }

/* ---------- Action Buttons ---------- */
.action-btns {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-icon-sm {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-sm:hover { color: var(--accent); background: rgba(73,181,255,0.08); }
.btn-icon-sm.danger:hover { color: var(--accent-red); background: rgba(255,107,120,0.08); }
.btn-icon-sm.copied { color: var(--accent-green); }

/* ---------- Filter Bar ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.filter-select {
    padding: 6px 28px 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.82rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%2394a3b8' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.filter-select:focus { border-color: var(--accent-dark); }
.filter-select.sm { padding: 4px 24px 4px 8px; font-size: 0.78rem; }

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 10px;
    transition: border-color 0.2s;
}

.search-input-wrap:focus-within { border-color: var(--accent-dark); }

.filter-search {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 6px 0;
    outline: none;
    width: 160px;
}

.filter-search::placeholder { color: var(--text-muted); }

.time-range-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---------- Pagination ---------- */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-top: 8px;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-btns { display: flex; gap: 4px; }

.page-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

.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: 1.05rem; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 20px 24px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ---------- Toggle Switch ---------- */
.form-row-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-row-toggle:last-of-type { border-bottom: none; }

.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border-light);
    border-radius: 22px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ---------- Mini Table (Dashboard charts) ---------- */
.mini-table {
    width: 100%;
    border-collapse: collapse;
}

.mini-table th {
    text-align: left;
    padding: 6px 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
}

.mini-table td {
    padding: 8px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(30,45,61,0.5);
}

.mini-table tbody tr:last-child td { border-bottom: none; }

.mini-bar {
    width: 100%;
    height: 6px;
    background: rgba(73,181,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.mini-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.mini-bar-fill.blue { background: var(--accent-blue); }

.empty-cell {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Empty States ---------- */
.empty-state-sm {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
}

.empty-state-sm .empty-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    opacity: 0.4;
}

.empty-state-sm p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state-center {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-center .empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.empty-state-center h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-center p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ---------- Quick Actions (Dashboard) ---------- */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: background 0.2s;
}

.quick-action-item:hover { background: rgba(73,181,255,0.04); }

.qa-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qa-icon svg { width: 18px; height: 18px; }
.qa-icon.cyan  { background: rgba(73,181,255,0.1); color: var(--accent); }
.qa-icon.green { background: rgba(92,228,111,0.1); color: var(--accent-green); }
.qa-icon.purple{ background: rgba(139,92,246,0.1); color: var(--accent-purple); }

.qa-text { flex: 1; }
.qa-text strong { display: block; font-size: 0.88rem; font-weight: 600; }
.qa-text span { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.qa-arrow { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Grid variants ---------- */
.grid-3-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.span-2 { grid-column: span 1; } /* actually 2fr already covers it */

/* ---------- Redeem / Recharge Page ---------- */
.redeem-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

.redeem-main { min-width: 0; }
.redeem-aside { min-width: 0; }

.balance-card {
    background: linear-gradient(135deg, #0d9373, #14b8a6, #0d9373);
    border-radius: var(--radius);
    padding: 2px;
    margin-bottom: 16px;
}

.balance-card-inner {
    background: linear-gradient(135deg, rgba(13,147,115,0.9), rgba(20,184,166,0.8));
    border-radius: calc(var(--radius) - 2px);
    padding: 28px 24px;
    text-align: center;
    color: #fff;
}

.balance-label {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 12px;
}

.balance-amount {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 4px 0;
}

.balance-sub {
    font-size: 0.75rem;
    opacity: 0.6;
}

.redeem-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
}

.redeem-input-wrap .form-control {
    border: none;
    background: none;
    padding: 10px 0;
}

.redeem-input-wrap .form-control:focus { box-shadow: none; }

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    position: relative;
    padding: 6px 0 6px 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

.pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.pack-item {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    transition: border-color 0.2s;
}

.pack-item:hover { border-color: var(--accent-dark); }

.pack-item-name { font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.pack-item-credits { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.pack-item-price { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- Activity List ---------- */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(30,45,61,0.5);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-muted);
}

.activity-dot.green { background: var(--accent-green); }
.activity-dot.red { background: var(--accent-red); }

.activity-body { flex: 1; min-width: 0; }
.activity-desc { font-size: 0.82rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.activity-amount { font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.activity-amount.green { color: var(--accent-green); }
.activity-amount.red { color: var(--accent-red); }

/* ---------- Subscription Page ---------- */
.subscription-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.sub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.sub-card-badge {
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 10px 20px;
}

.sub-card-body { padding: 16px 20px; }

.sub-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(30,45,61,0.5);
    font-size: 0.85rem;
}

.sub-info-row:last-child { border-bottom: none; }

/* ---------- Profile Page ---------- */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.profile-stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.profile-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-user-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.profile-user-info { flex: 1; }

.profile-username {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ---------- Download Cards ---------- */
.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all var(--transition);
}

.download-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--glow-cyan);
}

.download-card .platform-icon {
    width: 64px; height: 64px;
    border-radius: var(--radius);
    background: rgba(73, 181, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent);
    flex-shrink: 0;
}

.download-card .dl-info { flex: 1; }
.download-card .dl-info h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.download-card .dl-info p { font-size: 0.9rem; color: var(--text-secondary); }
.download-card .dl-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- Tutorial Cards ---------- */
.tutorial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.tutorial-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.tutorial-card .tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(73, 181, 255, 0.1);
    color: var(--accent);
    margin-bottom: 14px;
    width: fit-content;
}

.tutorial-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.tutorial-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.tutorial-card .read-more {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

/* ---------- Feedback / Ticket ---------- */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

.ticket-item:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.ticket-item .ticket-id {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 80px;
    flex-shrink: 0;
}

.ticket-item .ticket-content { flex: 1; }
.ticket-item .ticket-subject { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.ticket-item .ticket-date { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 32px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-brand h3 span {
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(92, 228, 111, 0.1); border: 1px solid rgba(92, 228, 111, 0.2); color: var(--accent-green); }
.alert-danger { background: rgba(255, 107, 120, 0.1); border: 1px solid rgba(255, 107, 120, 0.2); color: var(--accent-red); }
.alert-warning { background: rgba(243, 212, 109, 0.1); border: 1px solid rgba(243, 212, 109, 0.2); color: var(--accent-orange); }
.alert-info { background: rgba(73, 181, 255, 0.1); border: 1px solid rgba(73, 181, 255, 0.2); color: var(--accent); }

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; margin-bottom: 20px; }

/* ---------- Chart Placeholder ---------- */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.chart-card .chart-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.chart-placeholder {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 0 10px;
}

.chart-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--accent), rgba(73, 181, 255, 0.3));
    min-height: 20px;
    transition: all var(--transition);
    position: relative;
}

.chart-bar:hover {
    background: linear-gradient(180deg, var(--accent-light), rgba(73, 181, 255, 0.5));
    box-shadow: 0 0 10px rgba(73, 181, 255, 0.3);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }

@keyframes glow-pulse {
    0%, 100% { box-shadow: var(--glow-cyan); }
    50% { box-shadow: var(--glow-cyan-strong); }
}

.glow-animate { animation: glow-pulse 3s ease infinite; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .dashboard { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .dashboard-main { padding: 24px; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .grid-3-2 { grid-template-columns: 1fr; }
    .redeem-layout { grid-template-columns: 1fr; }
    .profile-stats { grid-template-columns: repeat(3, 1fr); }
    .console-table { font-size: 0.8rem; }
    .console-table th, .console-table td { padding: 8px 10px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: var(--bg-nav);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        gap: 4px;
    }

    .hero { padding: 100px 0 60px; }
    .hero h1 { font-size: 2rem; }

    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .feature-cards { grid-template-columns: repeat(2, 1fr); }
    .pricing-cards { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    .download-card { flex-direction: column; text-align: center; }

    .section { padding: 50px 0; }
    .container { padding: 0 16px; }
    .dashboard-main { padding: 16px; }

    .stat-row { grid-template-columns: 1fr 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-left, .filter-right { flex-wrap: wrap; }
    .dashboard-header { flex-direction: column; gap: 12px; }
    .header-right { align-self: flex-start; }
    .pagination-bar { flex-direction: column; gap: 12px; align-items: flex-start; }
    .redeem-layout { grid-template-columns: 1fr; }
    .pack-grid { grid-template-columns: repeat(2, 1fr); }
    .subscription-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .feature-cards { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .stat-row { grid-template-columns: 1fr; }
    .profile-stats { grid-template-columns: 1fr; }
    .pack-grid { grid-template-columns: 1fr; }
}
