:root {
    --bg-dark: #0a0a1a;
    --bg-card: #111128;
    --bg-card-hover: #16163a;
    --bg-input: #0d0d22;
    --accent: #6c5ce7;
    --accent-hover: #5a4bd1;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --text: #e8e6f0;
    --text-muted: #8888aa;
    --border: #222244;
    --radius: 12px;
    --discord: #5865F2;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; }

/* ── Navigation ── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 48px; height: 72px;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.navbar-brand {
    font-size: 22px; font-weight: 800;
    text-decoration: none; color: var(--text);
}
.navbar-brand span { color: var(--accent); }
.navbar-links { display: flex; gap: 32px; align-items: center; }
.navbar-links a {
    text-decoration: none; color: var(--text-muted);
    font-size: 14px; font-weight: 500; transition: color 0.2s;
}
.navbar-links a:hover { color: var(--text); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: all 0.2s;
    font-family: inherit;
}
.btn-primary {
    background: var(--accent); color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-outline {
    background: transparent; color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-discord {
    background: var(--discord); color: #fff;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
}
.btn-discord:hover { background: #4752c4; transform: translateY(-1px); }

/* ── Hero Section ── */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 120px 48px 80px;
    background: radial-gradient(ellipse at 30% 0%, rgba(108, 92, 231, 0.12) 0%, transparent 60%);
}
.hero-split {
    display: flex; align-items: center; gap: 60px;
    max-width: 1200px; width: 100%;
}
.hero-content { flex: 1; }
.hero h1 {
    font-size: 48px; font-weight: 800; line-height: 1.1; margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; color: var(--text-muted); margin-bottom: 32px; max-width: 480px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-video { flex: 1; max-width: 520px; }
.hero-video-wrap {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    aspect-ratio: 16/10;
}
.hero-video-wrap video {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.hero-video-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card);
    color: var(--text-muted); font-size: 16px; font-weight: 500;
}
/* Hide placeholder when video loads */
.hero-video-wrap video:not([src=""]) + .hero-video-placeholder { display: none; }

.hero-price {
    margin-top: 48px; padding: 24px 40px; display: inline-block;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.hero-price .amount { font-size: 48px; font-weight: 800; color: var(--accent); }
.hero-price .period { font-size: 16px; color: var(--text-muted); }
.hero-price .note { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Features ── */
.features {
    padding: 100px 48px; max-width: 1200px; margin: 0 auto;
}
.features h2 {
    text-align: center; font-size: 36px; font-weight: 700; margin-bottom: 60px;
}
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px;
    transition: border-color 0.3s, transform 0.3s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.feature-card .icon {
    width: 48px; height: 48px; border-radius: 10px;
    background: var(--accent); display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 20px;
}
.feature-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-muted); }

/* ── Auth Pages ── */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 120px 24px 80px;
}
.auth-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 48px; width: 100%; max-width: 440px;
}
.auth-card h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.auth-card .subtitle { color: var(--text-muted); margin-bottom: 32px; font-size: 14px; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 13px; font-weight: 500;
    color: var(--text-muted); margin-bottom: 6px;
}
.form-group input, .form-group select {
    width: 100%; padding: 12px 16px; border-radius: 8px;
    background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text); font-size: 14px; outline: none; transition: border-color 0.2s;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.auth-card .btn-primary { width: 100%; margin-top: 8px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--accent); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Auth divider */
.auth-divider {
    display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
    color: var(--text-muted); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Alerts ── */
.alert {
    padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 20px;
    display: none;
}
.alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.alert-error { background: rgba(231, 76, 60, 0.15); border: 1px solid rgba(231, 76, 60, 0.3); color: #e74c3c; }
.alert-success { background: rgba(46, 204, 113, 0.15); border: 1px solid rgba(46, 204, 113, 0.3); color: #2ecc71; }

/* ── Checkout ── */
.checkout-price-box {
    background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px;
    padding: 16px 20px; margin-bottom: 28px;
}
.checkout-price-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 16px; font-weight: 600;
}
.checkout-price-amount { color: var(--accent); font-size: 20px; }
.checkout-price-note { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.checkout-section {
    margin-bottom: 28px;
}
.checkout-section-label {
    display: block; font-size: 15px; font-weight: 600; margin-bottom: 12px;
    color: var(--text);
}
.checkout-discord-note {
    font-size: 12px; color: var(--text-muted); margin-top: 8px; text-align: center;
}

/* Billing Toggle */
.billing-toggle {
    display: flex; gap: 8px; margin-bottom: 12px;
}
.billing-option {
    flex: 1; padding: 14px 12px; border-radius: 8px; cursor: pointer;
    background: var(--bg-input); border: 2px solid var(--border);
    color: var(--text-muted); font-size: 13px; font-weight: 500;
    text-align: center; transition: all 0.2s; position: relative;
    font-family: inherit; line-height: 1.4;
}
.billing-option:hover { border-color: var(--accent); }
.billing-option.active {
    border-color: var(--accent); color: var(--text);
    background: rgba(108, 92, 231, 0.08);
}
.billing-amount { font-size: 18px; font-weight: 700; color: var(--accent); }
.billing-save {
    display: inline-block; font-size: 10px; font-weight: 700;
    background: var(--success); color: #000; padding: 2px 6px;
    border-radius: 4px; margin-top: 4px; text-transform: uppercase;
}

/* Square Card Container */
.square-card-container {
    min-height: 50px; padding: 12px; border-radius: 8px;
    background: var(--bg-input); border: 1px solid var(--border);
}

/* Subscription status badges */
.status-sub-active { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.status-sub-canceled { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.status-sub-paused { background: rgba(243, 156, 18, 0.15); color: var(--warning); }
.status-sub-pending { background: rgba(136, 136, 170, 0.15); color: var(--text-muted); }

.checkout-terms {
    margin-bottom: 20px;
}
.checkout-checkbox {
    display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
    font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.checkout-checkbox input[type="checkbox"] {
    width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
    accent-color: var(--accent); cursor: pointer;
}
.checkout-checkbox a {
    color: var(--accent); text-decoration: none;
}
.checkout-checkbox a:hover { text-decoration: underline; }

.discord-linked {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 8px; padding: 12px 16px;
}
.discord-avatar {
    width: 40px; height: 40px; border-radius: 50%;
}
.discord-name { font-weight: 600; font-size: 14px; }
.discord-status { font-size: 12px; color: var(--success); }

/* ── Dashboard ── */
.dashboard {
    padding: 100px 48px 48px; max-width: 1000px; margin: 0 auto;
}
.dashboard h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.dashboard .subtitle { color: var(--text-muted); margin-bottom: 40px; }
.dashboard-actions { display: flex; gap: 12px; margin-bottom: 32px; }

.license-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin-bottom: 16px; transition: border-color 0.2s;
}
.license-card:hover { border-color: var(--accent); }
.license-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.license-key {
    font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: 16px; font-weight: 600;
    color: var(--accent); letter-spacing: 1px;
}
.license-status {
    padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: uppercase;
}
.status-active { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.status-expired { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.status-cancelled { background: rgba(231, 76, 60, 0.15); color: var(--danger); }

.license-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.license-detail label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 2px; }
.license-detail span { font-size: 14px; }

.license-actions { margin-top: 16px; display: flex; gap: 8px; }

/* ── Admin Layout ── */
.admin-layout {
    display: flex; min-height: 100vh; padding-top: 72px;
}
.admin-sidebar {
    width: 240px; background: var(--bg-card); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; position: fixed; top: 72px; bottom: 0; left: 0;
    z-index: 50;
}
.admin-sidebar-brand {
    padding: 24px 20px 16px; font-size: 18px; font-weight: 700;
    border-bottom: 1px solid var(--border);
}
.admin-badge {
    font-size: 10px; background: var(--warning); color: #000; padding: 2px 8px;
    border-radius: 4px; margin-left: 8px; font-weight: 700; text-transform: uppercase;
    vertical-align: middle;
}
.admin-nav {
    flex: 1; padding: 12px 0;
}
.admin-nav a {
    display: block; padding: 10px 20px; font-size: 14px; font-weight: 500;
    color: var(--text-muted); text-decoration: none; transition: all 0.2s;
}
.admin-nav a:hover { color: var(--text); background: var(--bg-card-hover); }
.admin-nav a.active {
    color: var(--accent); background: rgba(108, 92, 231, 0.1);
    border-right: 3px solid var(--accent);
}
.admin-sidebar-footer {
    padding: 16px 20px; border-top: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 8px;
}
.admin-sidebar-footer a {
    font-size: 13px; color: var(--text-muted); text-decoration: none;
}
.admin-sidebar-footer a:hover { color: var(--text); }

.admin-main {
    flex: 1; margin-left: 240px; padding: 32px 40px;
}
.admin-main h1 { font-size: 28px; font-weight: 700; margin-bottom: 24px; }

/* Admin Stats */
.admin-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;
}
.admin-stat-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; text-align: center;
}
.admin-stat-value { font-size: 32px; font-weight: 800; color: var(--accent); }
.admin-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Admin Card */
.admin-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px;
}

/* Admin Tables */
.admin-table-wrap {
    overflow-x: auto; margin-top: 16px;
}
.admin-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.admin-table thead th {
    text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border); background: var(--bg-card);
}
.admin-table tbody td {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-table tbody tr:hover { background: var(--bg-card-hover); }
.admin-table code {
    background: var(--bg-input); padding: 2px 6px; border-radius: 4px;
}

.admin-status {
    padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; display: inline-block;
}
.status-completed { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.status-pending { background: rgba(243, 156, 18, 0.15); color: var(--warning); }
.status-failed { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.status-refunded { background: rgba(136, 136, 170, 0.15); color: var(--text-muted); }

/* Admin User Meta */
.admin-user-meta { display: flex; flex-direction: column; gap: 0; }
.admin-user-meta-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 8px 0; border-bottom: 1px solid var(--border);
    font-size: 13px; gap: 12px;
}
.admin-user-meta-row:last-child { border-bottom: none; }
.admin-user-meta-label {
    color: var(--text-muted); font-weight: 500; white-space: nowrap; min-width: 110px;
}
.admin-user-meta-row > span:last-child { text-align: right; word-break: break-all; }

/* Admin table clickable rows */
.admin-table tbody tr { cursor: default; }
.admin-table a:hover { text-decoration: underline !important; }

/* ── Pricing Page ── */
.pricing-page {
    padding: 120px 48px 80px; max-width: 960px; margin: 0 auto;
}
.pricing-header {
    text-align: center; margin-bottom: 60px;
}
.pricing-header h1 {
    font-size: 40px; font-weight: 800; margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.pricing-header p { font-size: 18px; color: var(--text-muted); }

.pricing-cards {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 80px;
}
.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 40px 32px; position: relative; transition: border-color 0.3s;
}
.pricing-card:hover { border-color: var(--accent); }
.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(108, 92, 231, 0.15);
}
.pricing-card-badge {
    position: absolute; top: -12px; right: 24px;
    background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
    padding: 4px 14px; border-radius: 20px; text-transform: uppercase;
}
.pricing-card-header { margin-bottom: 32px; }
.pricing-card-header h3 {
    font-size: 18px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px;
    text-transform: uppercase; letter-spacing: 1px;
}
.pricing-card-price { margin-bottom: 8px; }
.pricing-amount { font-size: 48px; font-weight: 800; color: var(--accent); }
.pricing-period { font-size: 16px; color: var(--text-muted); }
.pricing-note { font-size: 13px; color: var(--text-muted); }
.pricing-equiv {
    font-size: 14px; color: var(--success); font-weight: 600; margin-top: 4px;
}

.pricing-features {
    list-style: none; padding: 0; margin: 0 0 32px;
}
.pricing-features li {
    padding: 10px 0; font-size: 14px; color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-left: 24px; position: relative;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before {
    content: '\2713'; position: absolute; left: 0;
    color: var(--success); font-weight: 700;
}

/* Pricing FAQ */
.pricing-faq { margin-top: 40px; }
.pricing-faq h2 {
    font-size: 28px; font-weight: 700; margin-bottom: 32px; text-align: center;
}
.faq-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.faq-item {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px;
}
.faq-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.faq-item p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── Footer ── */
.footer {
    padding: 48px; text-align: center; border-top: 1px solid var(--border);
    color: var(--text-muted); font-size: 13px;
}
.footer p { margin-bottom: 12px; }
.footer p:last-child { margin-bottom: 0; }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-legal {
    font-size: 11px; max-width: 640px; margin-inline: auto;
    line-height: 1.6; opacity: 0.7;
}
.footer-disclaimer {
    font-size: 11px; font-style: italic; opacity: 0.6;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .hero { padding: 100px 20px 60px; }
    .hero-split { flex-direction: column; gap: 40px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero-video { max-width: 100%; }
    .features { padding: 60px 20px; }
    .dashboard { padding: 100px 20px 20px; }
    .pricing-page { padding: 100px 20px 60px; }
    .pricing-cards { grid-template-columns: 1fr; }
    .faq-grid { grid-template-columns: 1fr; }

    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; padding: 20px; }
}
