@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Mono&display=swap');

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

:root {
    --bg:       #0d0d12;
    --surface:  #13131a;
    --surface2: #1a1a24;
    --border:   rgba(255,255,255,0.07);
    --border2:  rgba(255,255,255,0.12);
    --red:      #e8003d;
    --red-soft: rgba(232,0,61,0.12);
    --red-glow: rgba(232,0,61,0.25);
    --text:     #f0f0f5;
    --muted:    #6b6b7a;
    --muted2:   #9090a0;
    --success:  #22c55e;
    --radius:   14px;
    --radius-sm: 8px;
}

html, body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Background ────────────────────────────────────────────── */
.bg-mesh {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 20% 10%, rgba(232,0,61,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 90%, rgba(100,0,180,0.05) 0%, transparent 60%);
}

/* ── Layout ─────────────────────────────────────────────────── */
.page {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px;
}

/* ── Card ────────────────────────────────────────────────────── */
.card {
    width: 100%; max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

/* ── Logo / Brand ─────────────────────────────────────────────── */
.brand {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 32px;
}
.brand-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 8px var(--red-glow);
}
.brand-name {
    font-weight: 700; font-size: 0.85rem; letter-spacing: 2px;
    text-transform: uppercase; color: var(--muted2);
}

/* ── Headings ──────────────────────────────────────────────── */
.card-title {
    font-size: 1.5rem; font-weight: 700;
    color: var(--text); margin-bottom: 6px; letter-spacing: -0.3px;
}
.card-sub {
    font-size: 0.875rem; color: var(--muted);
    margin-bottom: 28px; line-height: 1.6;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 13px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif; font-size: 0.875rem; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.18s ease; text-decoration: none;
}
.btn-discord {
    background: #5865F2; color: #fff;
}
.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(88,101,242,0.35);
}
.btn-roblox {
    background: var(--red); color: #fff;
}
.btn-roblox:hover {
    background: #c5002f;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--red-glow);
}
.btn-ghost {
    background: var(--surface2); color: var(--muted2);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--border); color: var(--text); }

/* ── Steps ─────────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.step {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 0.82rem; color: var(--muted);
}
.step-num {
    flex-shrink: 0; width: 22px; height: 22px;
    border-radius: 50%; background: var(--surface2);
    border: 1px solid var(--border2);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: var(--muted2);
    margin-top: 1px;
}
.step strong { color: var(--text); }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0; color: var(--muted); font-size: 0.75rem;
}
.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── User pill ──────────────────────────────────────────────── */
.user-pill {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 14px; margin-bottom: 24px;
}
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--red), #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; overflow: hidden; flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info-name { font-weight: 600; font-size: 0.875rem; }
.user-info-sub  { font-size: 0.75rem; color: var(--muted); }
.pill-badge {
    margin-left: auto; padding: 3px 8px; border-radius: 100px;
    font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--red-soft); color: var(--red); border: 1px solid rgba(232,0,61,0.25);
}

/* ── Code box ──────────────────────────────────────────────── */
.code-wrap {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 16px 18px;
    margin-bottom: 14px;
}
.code-label {
    font-size: 0.7rem; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.code-row { display: flex; align-items: center; gap: 10px; }
.code-value {
    font-family: 'Space Mono', monospace; font-size: 1.4rem;
    font-weight: 700; color: var(--red); letter-spacing: 3px; flex: 1;
}
.copy-btn {
    background: none; border: 1px solid var(--border2); border-radius: 6px;
    padding: 5px 10px; color: var(--muted2); font-size: 0.72rem;
    cursor: pointer; transition: 0.15s; font-family: 'Inter', sans-serif; font-weight: 500;
    white-space: nowrap;
}
.copy-btn:hover { border-color: var(--red); color: var(--red); }
.copy-btn.ok { border-color: var(--success); color: var(--success); }
.timer-wrap { margin-top: 10px; }
.timer-bar-bg {
    width: 100%; height: 4px; border-radius: 100px;
    background: rgba(255,255,255,0.07); overflow: hidden; margin-bottom: 7px;
}
.timer-bar-fill {
    height: 100%; border-radius: 100px;
    background: linear-gradient(90deg, #e8003d, #ff4d6d);
    width: 100%;
    transition: width 1s linear, background 0.5s ease;
}
.code-timer {
    font-size: 0.75rem; color: var(--muted2); font-weight: 500;
}
.code-timer.warn { color: #f59e0b; }
.code-timer.expired { color: var(--red); font-size: 0.72rem; line-height: 1.5; }

/* ── Instruction block ─────────────────────────────────────── */
.instruct {
    background: var(--surface2); border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    border-radius: var(--radius-sm); padding: 14px 16px;
    font-size: 0.8rem; color: var(--muted); line-height: 1.8;
    margin-bottom: 16px;
}
.instruct code {
    font-family: 'Space Mono', monospace; font-size: 0.8em;
    color: var(--text); background: rgba(255,255,255,0.06);
    border-radius: 4px; padding: 1px 6px;
}

/* ── Status ────────────────────────────────────────────────── */
.status-bar {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; color: var(--muted); padding: 10px 0;
}
.status-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--muted); flex-shrink: 0;
    animation: pulse 1.6s ease-in-out infinite;
}
.status-bar.success { color: var(--success); }
.status-bar.success .status-dot { background: var(--success); animation: none; }

/* ── Error / Alert ─────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-sm); padding: 12px 14px;
    font-size: 0.8rem; margin-bottom: 16px; display: none;
}
.alert.error {
    background: rgba(232,0,61,0.08); border: 1px solid rgba(232,0,61,0.25);
    color: #ff6b8a;
}
.alert.show { display: block; }

/* ── Success overlay ──────────────────────────────────────── */
.overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(13,13,18,0.95); backdrop-filter: blur(16px);
    display: none; align-items: center; justify-content: center; padding: 24px;
}
.overlay.show { display: flex; }
.overlay-card {
    width: 100%; max-width: 380px; text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 48px 36px;
}
.overlay-icon {
    width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
    background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3);
}
.overlay-card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.overlay-card p  { font-size: 0.85rem; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.back-link {
    font-size: 0.78rem; color: var(--muted); text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.back-link:hover { color: var(--text); }

/* ── Footer ─────────────────────────────────────────────────── */
.page-footer {
    margin-top: 24px; font-size: 0.75rem; color: var(--muted);
    text-align: center;
}
.page-footer a { color: var(--muted); text-decoration: none; }
.page-footer a:hover { color: var(--text); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.card, .dashboard-container { animation: fadeUp 0.35s ease both; }

/* ── Dashboard & New Layouts ────────────────────────────────── */
.dashboard-container {
    width: 100%; max-width: 1400px;
    display: grid; grid-template-columns: 240px 1fr; gap: 24px;
    margin: 40px auto; padding: 0 24px;
}

.sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 24px;
    height: fit-content; position: sticky; top: 24px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 8px; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    color: var(--muted2); text-decoration: none; font-size: 0.85rem; font-weight: 500;
    transition: 0.2s;
}
.nav-label {
    font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--muted2); margin: 12px 16px 4px; font-weight: 700;
    opacity: 0.6;
}
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: var(--red-soft); color: var(--red); }
.nav-link svg { width: 18px; height: 18px; opacity: 0.7; }

.main-content { display: flex; flex-direction: column; gap: 24px; }

/* ── Tables (CAD Style) ─────────────────────────────────────── */
.data-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 24px;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th { text-align: left; padding: 12px 16px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); }
td { padding: 16px; border-bottom: 1px solid var(--border); color: var(--text); }
tr:last-child td { border-bottom: none; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center;
    padding: 4px 10px; border-radius: 100px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-red { background: var(--red-soft); color: var(--red); border: 1px solid rgba(232,0,61,0.2); }
.badge-success { background: rgba(34,197,94,0.1); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.badge-muted { background: var(--surface2); color: var(--muted); border: 1px solid var(--border2); }

/* ── Legal / Article Style ─────────────────────────────────── */
.article-card {
    width: 100%; max-width: 800px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 60px 50px;
    margin: 40px auto;
}
.article-content h2 { margin: 32px 0 16px; font-size: 1.25rem; color: var(--text); }
.article-content p { margin-bottom: 16px; color: var(--muted2); line-height: 1.8; }
.article-content ul { margin: 16px 0; padding-left: 20px; color: var(--muted2); }
.article-content li { margin-bottom: 8px; }

@media (max-width: 800px) {
    .dashboard-container { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .article-card { padding: 40px 24px; border-radius: 0; border-left: none; border-right: none; }
}

/* ── Live Search ────────────────────────────────────────────── */
.search-container { position: relative; width: 100%; }
.search-results {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-top: 8px; z-index: 100;
    display: none; box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    overflow: hidden;
}
.search-results.show { display: block; }
.search-item {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 12px;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--surface2); }
.search-item .name { font-weight: 600; font-size: 0.9rem; }
.search-item .sub { font-size: 0.75rem; color: var(--muted); }

/* ── Profile Card ───────────────────────────────────────────── */
.profile-card { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.profile-sidebar { display: flex; flex-direction: column; gap: 20px; }
.profile-main { display: flex; flex-direction: column; gap: 24px; }

.user-header-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 32px; text-align: center;
}
.user-pfp {
    width: 100px; height: 100px; border-radius: 50%;
    margin: 0 auto 16px; background: var(--surface2);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; color: var(--muted);
    border: 3px solid var(--red-soft);
    overflow: hidden;
}
.user-pfp img { width: 100%; height: 100%; object-fit: cover; }
.user-status-tag {
    display: inline-block; padding: 4px 12px; border-radius: 100px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    margin-top: 8px;
}
.status-verified { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.status-unverified { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.blurred { filter: blur(4px); opacity: 0.6; pointer-events: none; user-select: none; }

.action-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.action-btn {
    padding: 8px 16px; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
    cursor: pointer; transition: 0.2s; border: 1px solid var(--border);
    background: var(--surface); color: var(--text);
}
.action-btn:hover { background: var(--surface2); }
.action-btn.active { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.action-btn.red { color: var(--red); border-color: var(--red-soft); }
.action-btn.red:hover { background: var(--red-soft); }
.action-btn.green { color: #22c55e; border-color: rgba(34, 197, 94, 0.2); }
.action-btn.green:hover { background: rgba(34, 197, 94, 0.1); }
