/* ================================================================
   DASHBOARD — Premium Dark UI
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #04040a;
    --bg-secondary: #080814;
    --bg-card: #0c0c1a;
    --bg-card-hover: #10102a;
    --bg-input: #12122a;
    --bg-sidebar: #070712;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --text-primary: #f0f0ff;
    --text-secondary: #8888a8;
    --text-muted: #555578;

    --accent-cyan: #00d4ff;
    --accent-cyan-rgb: 0, 212, 255;
    --accent-magenta: #ff2d78;
    --accent-magenta-rgb: 255, 45, 120;
    --accent-purple: #9b6dff;
    --accent-purple-rgb: 155, 109, 255;
    --accent-green: #00ff88;
    --accent-green-rgb: 0, 255, 136;
    --accent-yellow: #ffcc00;
    --accent-yellow-rgb: 255, 204, 0;
    --accent-blue: #00d4ff;
    --accent-blue-rgb: 0, 212, 255;

    --radius-xl: 20px;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { border: none; cursor: pointer; font-family: inherit; outline: none; }

/* ========== LAYOUT ========== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s var(--ease);
}

.sidebar-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    padding: 0 24px 28px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease);
    cursor: pointer;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-link.active {
    color: var(--accent-cyan);
    background: rgba(var(--accent-cyan-rgb), 0.08);
}

.sidebar-link .icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 12px;
}

/* Sidebar user card */
.sidebar-user {
    padding: 16px 16px;
    margin: 0 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--accent-cyan-rgb), 0.3);
    background: var(--bg-card);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-plan {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

.sidebar-user-plan.free {
    color: var(--text-muted);
}

.sidebar-user-plan.pro {
    color: var(--accent-cyan);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px 48px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 40px;
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ========== PLAN BANNER ========== */
.plan-banner {
    padding: 24px 28px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.plan-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.3s;
}

.plan-banner.is-pro::before {
    opacity: 1;
}

.plan-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.plan-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.plan-icon.free {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
}

.plan-icon.pro {
    background: rgba(var(--accent-cyan-rgb), 0.1);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
    color: var(--accent-cyan);
}

.plan-icon svg {
    stroke: currentColor;
}

.plan-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.plan-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-upgrade {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, var(--accent-cyan), #00b4d8);
    transition: all 0.3s var(--ease);
    white-space: nowrap;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(var(--accent-cyan-rgb), 0.3);
}

.btn-cancel-sub {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
    cursor: pointer;
    transition: all 0.3s var(--ease);
    width: 100%;
}
.btn-cancel-sub:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.4);
}

.btn-upgrade-yearly {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    width: 100%;
}
.btn-upgrade-yearly:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
}

/* Cancel / Upgrade Popups */
.cancel-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cancel-popup {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}
.cancel-popup h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.cancel-popup p {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.cancel-popup-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}
.btn-cancel-confirm {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    background: #ff6b6b;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-cancel-confirm:hover { background: #e05555; }
.btn-cancel-back {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--surface-3);
    color: var(--text-primary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}
.btn-cancel-back:hover { background: var(--surface-hover); }

.plan-badge-pro {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-cyan);
    background: rgba(var(--accent-cyan-rgb), 0.1);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
}

/* ========== MODES SECTION ========== */
.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.mode-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s var(--ease);
}

.mode-card.coming-soon {
    opacity: 0.4;
    pointer-events: none;
}

.mode-card:hover {
    border-color: rgba(var(--accent-cyan-rgb), 0.3);
    transform: translateY(-4px);
    box-shadow:
        0 16px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(var(--accent-cyan-rgb), 0.05);
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
    z-index: 3;
}

.mode-card:hover::before {
    transform: scaleX(1);
}

/* ── Visual Preview ── */
.mode-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 10;
    background: linear-gradient(180deg, #020208 0%, #050510 50%, #020208 100%);
    overflow: hidden;
}

.placeholder-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.placeholder-icon {
    opacity: 0.3;
}

/* ── Arena ── */
.preview-arena {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arena-ring {
    position: absolute;
    width: 70%;
    height: 60%;
    top: 28%;
    border-radius: 50%;
    border: 2px solid rgba(0, 200, 255, 0.25);
    box-shadow:
        0 0 30px rgba(0, 200, 255, 0.06),
        inset 0 0 30px rgba(0, 200, 255, 0.03);
    animation: arenaBreath 4s ease-in-out infinite;
}

.arena-glow {
    position: absolute;
    width: 50%;
    height: 40%;
    top: 35%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 120, 255, 0.08) 0%, transparent 70%);
    animation: arenaBreath 4s ease-in-out infinite 1s;
}

@keyframes arenaBreath {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

/* ── Balls ── */
.preview-ball {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    z-index: 2;
}

.preview-ball.red {
    left: 22%;
    top: 45%;
    background: radial-gradient(circle at 35% 30%, #ff8888, #ff3333 50%, #cc1111 100%);
    box-shadow:
        0 0 20px rgba(255, 51, 51, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.5);
    animation: ballFloat 3s ease-in-out infinite;
}

.preview-ball.blue {
    right: 22%;
    top: 45%;
    background: radial-gradient(circle at 35% 30%, #88bbff, #3399ff 50%, #1166cc 100%);
    box-shadow:
        0 0 20px rgba(51, 153, 255, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.5);
    animation: ballFloat 3s ease-in-out infinite 1.5s;
}

@keyframes ballFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ── Ball faces ── */
.ball-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.ball-eye {
    position: absolute;
    width: 8px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    top: 36%;
}

.ball-eye::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #111;
    top: 2.5px;
    left: 2px;
}

.ball-eye.left { left: 28%; }
.ball-eye.right { left: 56%; }

/* Red ball eyes look right, blue ball eyes look left */
.preview-ball.red .ball-eye::after { left: 3px; }
.preview-ball.blue .ball-eye::after { left: 1px; }

.ball-brow {
    position: absolute;
    width: 10px;
    height: 3px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 2px;
    top: 30%;
}

.ball-brow.left {
    left: 26%;
    transform: rotate(-15deg);
}

.ball-brow.right {
    left: 56%;
    transform: rotate(15deg);
}

.preview-ball.blue .ball-brow.left { transform: rotate(15deg); }
.preview-ball.blue .ball-brow.right { transform: rotate(-15deg); }

/* ── Particles ── */
.preview-particle {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
    opacity: 0;
    animation: particleDrift 5s ease-in-out infinite;
}

.preview-particle.p1 {
    width: 4px; height: 4px;
    background: var(--accent-cyan);
    top: 55%; left: 45%;
    animation-delay: 0s;
}
.preview-particle.p2 {
    width: 3px; height: 3px;
    background: #ff3333;
    top: 50%; left: 35%;
    animation-delay: 1s;
}
.preview-particle.p3 {
    width: 3px; height: 3px;
    background: #3399ff;
    top: 60%; left: 60%;
    animation-delay: 2s;
}
.preview-particle.p4 {
    width: 2px; height: 2px;
    background: var(--accent-cyan);
    top: 42%; left: 50%;
    animation-delay: 3s;
}
.preview-particle.p5 {
    width: 3px; height: 3px;
    background: rgba(255,255,255,0.5);
    top: 48%; left: 55%;
    animation-delay: 0.5s;
}

@keyframes particleDrift {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    20% { opacity: 0.8; transform: translate(-5px, -10px) scale(1); }
    60% { opacity: 0.4; transform: translate(8px, -25px) scale(0.6); }
    100% { opacity: 0; transform: translate(3px, -40px) scale(0); }
}

/* ── Preview title ── */
.preview-title {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
    z-index: 2;
    white-space: nowrap;
}

/* ── Preview HUD ── */
.preview-hud {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 2;
}

.hud-hp {
    display: flex;
    gap: 3px;
}

.hud-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.hud-hp.red .hud-dot {
    background: #ff3333;
    box-shadow: 0 0 4px rgba(255, 51, 51, 0.5);
}

.hud-hp.blue .hud-dot {
    background: #3399ff;
    box-shadow: 0 0 4px rgba(51, 153, 255, 0.5);
}

/* ── Card body (below preview) ── */
.mode-card-body {
    padding: 20px 24px 24px;
}

.mode-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mode-badge {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.mode-badge.pro-required {
    color: var(--accent-yellow);
    background: rgba(var(--accent-yellow-rgb), 0.1);
    border: 1px solid rgba(var(--accent-yellow-rgb), 0.2);
}

.mode-badge.available {
    color: var(--accent-green);
    background: rgba(var(--accent-green-rgb), 0.1);
    border: 1px solid rgba(var(--accent-green-rgb), 0.2);
}

.mode-badge.free-preview {
    color: var(--accent-blue);
    background: rgba(var(--accent-blue-rgb), 0.1);
    border: 1px solid rgba(var(--accent-blue-rgb), 0.2);
}

.mode-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
}

.mode-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.mode-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mode-tag {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.mode-card-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    color: var(--text-muted);
    transition: all 0.3s var(--ease);
    line-height: 0;
}

.mode-card:hover .mode-card-arrow {
    color: var(--accent-cyan);
    transform: translateX(4px);
}

/* ========== ZOMBIE MODE CARD ========== */
.mode-card.zombie-mode::before {
    background: linear-gradient(90deg, #39d353, #1fa838);
}

.mode-card.zombie-mode:hover {
    border-color: rgba(var(--accent-green-rgb), 0.3);
    box-shadow:
        0 16px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(var(--accent-green-rgb), 0.05);
}

.zombie-preview {
    background: linear-gradient(180deg, #010804 0%, #020a06 50%, #010804 100%) !important;
}

.zombie-ring {
    border-color: rgba(57, 211, 83, 0.25) !important;
    box-shadow:
        0 0 30px rgba(57, 211, 83, 0.06),
        inset 0 0 30px rgba(57, 211, 83, 0.03) !important;
}

.zombie-glow {
    background: radial-gradient(ellipse, rgba(57, 211, 83, 0.08) 0%, transparent 70%) !important;
}

/* Boss ball in zombie card */
.boss-ball {
    left: 43% !important;
    top: 42% !important;
    width: 60px !important;
    height: 60px !important;
    z-index: 3;
}

/* Zombie balls */
.preview-ball.zombie {
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at 35% 30%, #6def8a, #39d353 50%, #1fa838 100%);
    box-shadow: 0 0 12px rgba(57, 211, 83, 0.25), 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.preview-ball.zombie.z1 { left: 14%; top: 34%; animation: zombieFloat 3.5s ease-in-out infinite 0s; }
.preview-ball.zombie.z2 { left: 22%; top: 60%; animation: zombieFloat 3.2s ease-in-out infinite 0.4s; }
.preview-ball.zombie.z3 { left: 30%; top: 24%; animation: zombieFloat 3.8s ease-in-out infinite 0.8s; }
.preview-ball.zombie.z4 { left: 64%; top: 22%; animation: zombieFloat 3.4s ease-in-out infinite 1.2s; }
.preview-ball.zombie.z5 { left: 74%; top: 52%; animation: zombieFloat 3.6s ease-in-out infinite 1.6s; }
.preview-ball.zombie.z6 { left: 58%; top: 68%; animation: zombieFloat 3.3s ease-in-out infinite 2.0s; }
.preview-ball.zombie.z7 { left: 18%; top: 48%; animation: zombieFloat 3.7s ease-in-out infinite 0.6s; }
.preview-ball.zombie.z8 { left: 70%; top: 36%; animation: zombieFloat 3.1s ease-in-out infinite 1.0s; }

@keyframes zombieFloat {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(3px, -4px); }
    50% { transform: translate(-2px, -6px); }
    75% { transform: translate(-4px, -2px); }
}

/* Zombie particles */
.preview-particle.zp1 {
    width: 3px; height: 3px;
    background: #39d353;
    top: 48%; left: 40%;
    animation: particleDrift 4s ease-in-out infinite 0s;
}
.preview-particle.zp2 {
    width: 2px; height: 2px;
    background: rgba(57, 211, 83, 0.7);
    top: 55%; left: 58%;
    animation: particleDrift 5s ease-in-out infinite 1.2s;
}
.preview-particle.zp3 {
    width: 3px; height: 3px;
    background: #ff3333;
    top: 42%; left: 52%;
    animation: particleDrift 4.5s ease-in-out infinite 0.6s;
}
.preview-particle.zp4 {
    width: 2px; height: 2px;
    background: rgba(255, 255, 255, 0.5);
    top: 50%; left: 45%;
    animation: particleDrift 3.5s ease-in-out infinite 1.8s;
}

.zombie-title {
    text-shadow: 0 0 20px rgba(57, 211, 83, 0.4) !important;
    color: rgba(200, 255, 210, 0.9) !important;
}

/* Zombie preview health bars */
.zombie-hud {
    flex-direction: column !important;
    gap: 6px !important;
    width: 60%;
}

.hud-bar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.hud-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.boss-fill {
    width: 70%;
    background: linear-gradient(90deg, #ff6666, #ff3333);
    box-shadow: 0 0 6px rgba(255, 51, 51, 0.4);
}

.zombie-fill {
    width: 85%;
    background: linear-gradient(90deg, #5df07a, #39d353);
    box-shadow: 0 0 6px rgba(57, 211, 83, 0.4);
}

.mode-card.zombie-mode:hover .mode-card-arrow {
    color: var(--accent-green);
}

/* Duo Zombie: two boss balls */
.boss-ball.boss1 {
    left: 30% !important;
    top: 35% !important;
}
.boss-ball.boss2 {
    left: 55% !important;
    top: 50% !important;
}

/* ========== PROFILE PAGE ========== */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
}

.profile-card.full-width {
    grid-column: 1 / -1;
}

.profile-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(var(--accent-cyan-rgb), 0.25);
    background: var(--bg-input);
}

.profile-avatar-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.profile-avatar-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-field {
    margin-bottom: 16px;
}

.profile-field:last-child {
    margin-bottom: 0;
}

.profile-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.profile-field-value {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
}

.profile-stat-row {
    display: flex;
    gap: 20px;
}

.profile-stat {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.profile-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-signout {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    margin-top: 20px;
    transition: all 0.3s var(--ease);
}

.btn-signout:hover {
    color: var(--accent-magenta);
    border-color: rgba(var(--accent-magenta-rgb), 0.3);
    background: rgba(var(--accent-magenta-rgb), 0.06);
}

/* ========== PREMIUM POPUP (OVERLAY) ========== */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
}

.popup-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.popup-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 44px 36px 36px;
    max-width: 420px;
    width: 90%;
    position: relative;
    overflow: hidden;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s var(--ease-bounce), opacity 0.3s var(--ease);
    opacity: 0;
    text-align: center;
}

.popup-overlay.visible .popup-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.popup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
}

.popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: all 0.2s var(--ease);
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.popup-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.popup-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

/* Billing toggle */
.popup-billing-toggle {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 24px;
}

.billing-option {
    flex: 1;
    padding: 9px 16px;
    border-radius: calc(var(--radius-sm) - 2px);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    transition: all 0.25s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.billing-option.active {
    color: var(--text-primary);
    background: rgba(var(--accent-cyan-rgb), 0.1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.billing-option:hover:not(.active) {
    color: var(--text-secondary);
}

.billing-save {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 100px;
    background: rgba(var(--accent-green-rgb), 0.15);
    color: var(--accent-green);
}

/* Price display */
.popup-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.popup-price-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
}

.popup-price-period {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.popup-price-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 22px;
    min-height: 1.2em;
}

/* Features */
.popup-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.popup-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.popup-features li .check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(var(--accent-green-rgb), 0.1);
    color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    flex-shrink: 0;
}

/* CTA button */
.btn-popup-upgrade {
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, var(--accent-cyan), #00b4d8);
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.btn-popup-upgrade:disabled {
    opacity: 0.7;
    cursor: wait;
}

.btn-popup-upgrade:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(var(--accent-cyan-rgb), 0.25);
}

.popup-secure {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 0.02em;
}

.popup-cancel {
    width: 100%;
    padding: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
    transition: color 0.2s;
}

.popup-cancel:hover {
    color: var(--text-secondary);
}

/* ========== PAGE TRANSITIONS ========== */
.page-view {
    display: none;
    animation: pageIn 0.4s var(--ease-out);
}

.page-view.active {
    display: block;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== LOADING SPINNER ========== */
.dash-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.dash-loader .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(var(--accent-cyan-rgb), 0.15);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 24px 20px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .popup-card {
        padding: 32px 24px;
    }
}
