@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@400;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

/* === TAB NAVIGATION SYSTEM === */
.tab-content {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

.tab-content.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.nav-btn.active {
    background-color: rgba(14, 165, 233, 0.2) !important;
    color: #fff !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
}


#onboarding-modal.hidden {
    display: none !important;
    pointer-events: none;
    z-index: -100;
}


:root {
    /* Color Palette - Deeper, more sophisticated colors */
    --bg-deep: #020617;
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-glass: rgba(15, 23, 42, 0.8);

    --accent: #0ea5e9;
    --accent-glow: rgba(14, 165, 233, 0.3);
    --accent-hover: #0284c7;

    --premium: #fbbf24;
    --premium-glow: rgba(251, 191, 36, 0.25);

    --success: #10b981;
    --error: #f43f5e;

    --text-main: #f8fafc;
    --text-dim: #94a3b8;

    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing & Borders */
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    line-height: 1.5;
    /* Grid Pattern Overlay */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.08) 0%, transparent 25%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    transition: background 1s ease;
}


/* --- UTILITY CLASSES RECOVERED --- */

/* ── NEWS TICKER MARQUEE ────────────────────────────────── */
@keyframes marquee {
    0% {
        transform: translateX(100vw);
    }

    100% {
        transform: translateX(-100%);
    }
}

.animate-marquee {
    display: inline-block;
    animation: marquee 35s linear infinite;
    will-change: transform;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* ── NO SCROLLBAR ───────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ── MASK GRADIENT ──────────────────────────────────────── */
.mask-gradient-right {
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

.premium-card {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease;
    transform-style: preserve-3d;
}

.premium-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
}

/* --- THE NEXT AGE: NEURO-LINK --- */
.neuro-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--indigo-glow);
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 0 5px var(--indigo-glow);
}

/* --- UTILITY CLASSES RECOVERED --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.premium-border {
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.1);
}

/* Office Tiers / Backgrounds */
body.tier-1 {
    background-image: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #020617 100%);
}

/* Garage - Dark Blue */
body.tier-2 {
    background-image: radial-gradient(circle at 50% 50%, #312e81 0%, #0f172a 100%);
}

/* Shared Office - Indigo */
body.tier-3 {
    background-image: radial-gradient(circle at 50% 50%, #0369a1 0%, #082f49 100%);
}

/* Private Office - Sky Blue */
body.tier-4 {
    background-image: radial-gradient(circle at 50% 50%, #9333ea 0%, #1e1b4b 100%);
}

/* Tech Tower - Purple */
body.tier-5 {
    background-image: radial-gradient(circle at 50% 50%, #be123c 0%, #450a0a 100%);
}

/* Cloud Citadel - Red/Premium */

/* --- ANIMATIONS & EFFECTS --- */
@keyframes pulse-slow {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.9;
        transform: scale(0.99);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Tooltip & Title styling for mini buttons */
[title] {
    position: relative;
}

/* Custom scrollbar for game panels */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.2);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.5);
}

#app {

    display: flex;
    flex-direction: row;
    height: calc(100vh - 4rem);
    position: relative;
    z-index: 10;
    animation: appEntrance 1s var(--transition) forwards;
}

@keyframes appEntrance {
    from {
        opacity: 0;
        filter: blur(10px);
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

/* --- JUICY EFFECTS --- */
@keyframes float-up {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

.animate-float-up {
    animation: float-up 1s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1.2);
        opacity: 1;
        filter: blur(0px);
    }

    100% {
        transform: translateY(-80px) scale(1);
        opacity: 0;
        filter: blur(2px);
    }
}

@keyframes codeParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--mx), var(--my)) scale(0);
        opacity: 0;
    }
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

@keyframes shrink {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.floating-text {
    position: fixed;
    pointer-events: none;
    font-weight: 800;
    color: var(--success);
    font-size: 1.5rem;
    z-index: 9999;
    animation: floatUp 0.8s ease-out forwards;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    font-family: var(--font-heading);
}

.code-particle {
    position: absolute;
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    font-family: var(--font-mono);
    animation: codeParticle 1s ease-out forwards;
}

/* --- NOTIFICATIONS & ACHIEVEMENTS --- */
#notification-area {
    position: fixed;
    top: 130px;
    /* Below header and news ticker */
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    border-radius: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-width: 340px;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
}

.notification.success {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.9));
    border-left: 0;
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.notification.success::before {
    background: #10b981;
    box-shadow: 0 0 15px #10b981;
}

.notification.error {
    background: linear-gradient(90deg, rgba(244, 63, 94, 0.1), rgba(15, 23, 42, 0.9));
    border-left: 0;
    border-top: 1px solid rgba(244, 63, 94, 0.3);
    border-bottom: 1px solid rgba(244, 63, 94, 0.1);
}

.notification.error::before {
    background: #f43f5e;
    box-shadow: 0 0 15px #f43f5e;
}

.notification.warning {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), rgba(15, 23, 42, 0.9));
    border-left: 0;
    border-top: 1px solid rgba(245, 158, 11, 0.3);
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.notification.warning::before {
    background: #f59e0b;
    box-shadow: 0 0 15px #f59e0b;
}

.notification i {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.achievement-popup {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 10px;
    border-radius: 16px;
    z-index: 10001;
    animation: achievementPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.achievement-popup .ach-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    border-radius: 12px;
    margin-right: 15px;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.achievement-popup .ach-content {
    display: flex;
    flex-direction: column;
}

.ach-title {
    font-size: 0.7rem;
    color: #f59e0b;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ach-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 2px 0;
}

.ach-reward {
    font-size: 0.8rem;
    color: var(--text-dim);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes achievementPop {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Background Particles */
#particle-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-particle {
    position: absolute;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
    animation: bgFloat linear infinite;
    z-index: 0;
}

@keyframes bgFloat {
    0% {
        transform: translateY(110vh) translateX(0);
        opacity: 0;
    }

    20% {
        opacity: 0.3;
    }

    80% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-10vh) translateX(50px);
        opacity: 0;
    }
}

/* --- TOP BAR --- */
.top-bar {
    height: 80px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 500;
}

.stat-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    padding: 8px 16px;
    background: var(--glass-highlight);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--accent);
    background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.stat-item i {
    color: var(--accent);
    font-size: 1.1rem;
}

.stat-item.premium {
    border-color: rgba(251, 191, 36, 0.2);
}

.stat-item.premium i {
    color: var(--premium);
    animation: pulsePremium 2s infinite;
}

@keyframes pulsePremium {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px var(--premium));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 5px var(--premium));
    }
}

.crown-btn {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--premium-glow);
    position: relative;
    overflow: hidden;
}

.crown-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: 0.5s;
}

.crown-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--premium-glow);
}

.crown-btn:hover::after {
    transform: rotate(45deg) translateY(0);
}

/* --- SIDE NAVIGATION --- */
.game-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.side-nav {
    width: 90px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 0.5rem;
    z-index: 100;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.7rem;
    font-weight: 600;
    width: 70px;
    height: 70px;
    border-radius: 18px;
    position: relative;
}

.nav-btn i {
    font-size: 1.5rem;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-btn span {
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.nav-btn:hover {
    color: #fff;
    background: var(--glass-highlight);
}

.nav-btn.active {
    color: var(--accent);
    background: rgba(14, 165, 233, 0.1);
}

.nav-btn.active i {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-btn .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid var(--bg-deep);
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.3);
    animation: blink 2s infinite;
}

/* --- MAIN CONTENT --- */
.content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    position: relative;
    scroll-behavior: smooth;
}

/* Merged with main definition at top */

h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- OFFICE / SYSTEM TAB --- */
.office-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    gap: 2.5rem;
}

.office-info-card {
    text-align: center;
    background: var(--glass-highlight);
    border: 1px solid var(--glass-border);
    padding: 1rem 3rem;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.office-info-card h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.office-info-card p {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

.character-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-circle {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at 35% 35%, #1e293b, #020617);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--accent);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 0 60px rgba(14, 165, 233, 0.1),
        0 0 0 1px var(--glass-border);
    cursor: pointer;
    position: relative;
    z-index: 10;
    transition: transform 0.1s cubic-bezier(0.1, 0, 0.3, 1);
    animation: floating 6s ease-in-out infinite;
    will-change: transform, opacity;
}

.character-circle:active {
    transform: scale(0.92) !important;
    animation: none;
}

.character-circle:hover {
    color: #fff;
    text-shadow: 0 0 20px var(--accent-glow);
    border-color: var(--accent);
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

.combo-text {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--premium);
    text-shadow: 0 4px 10px rgba(251, 191, 36, 0.5);
    white-space: nowrap;
    animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    pointer-events: none;
}

/* Action Zone */
.action-zone {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats-mini {
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.progress-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #38bdf8);
    width: 0%;
    border-radius: 10px;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: width 0.1s linear;
}

.main-action-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 1.2rem;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.3);
}

.main-action-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.main-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.5);
}

.main-action-btn:hover::after {
    left: 100%;
}

.main-action-btn:active {
    transform: translateY(-1px);
}

/* --- GRID CARDS --- */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    will-change: transform, box-shadow;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-glass);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--glass-highlight);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1.2rem;
    border: 1px solid var(--glass-border);
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #fff;
}

.card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.price-tag {
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--premium);
    font-size: 1rem;
}

.buy-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.buy-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #334155;
}

/* Mission Card Special */
.card.claimed {
    border-color: var(--success);
    opacity: 0.5;
    order: 99;
}

.card.claimed .buy-btn {
    background: transparent;
    color: var(--success);
    border: 1px solid var(--success);
}

/* --- EXCHANGE TAB --- */
.exchange-dashboard {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.mini-chart {
    height: 160px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent), transparent);
    border-radius: 4px 4px 0 0;
    opacity: 0.7;
    transition: height 0.5s ease;
}

.asset-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.asset-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 50px 2fr 1fr 120px;
    align-items: center;
    transition: var(--transition);
}

.asset-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--glass-border);
    transform: translateX(5px);
}

.asset-icon {
    font-size: 1.8rem;
    color: var(--accent);
}

.asset-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}

.asset-holdings {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.asset-price {
    font-family: var(--font-mono);
    font-weight: 700;
    text-align: right;
    margin-right: 1.5rem;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--error);
}

.buy-sell-group {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.btn-buy:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.btn-sell:hover {
    background: rgba(244, 63, 94, 0.2);
    border-color: var(--error);
    color: var(--error);
}

/* --- MODALS --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-card {
    background: #0f172a;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
    position: relative;
    overflow: hidden;
    animation: modalSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--premium));
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-input {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.auth-input:focus {
    border-color: var(--accent);
    background: rgba(14, 165, 233, 0.05);
}

/* --- TOASTS & FLOATING TEXT --- */
.achievement-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    padding: 1.2rem 2rem;
    border-radius: 16px;
    border-left: 4px solid var(--accent);
    z-index: 10000;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    color: #fff;
    font-weight: 700;
    font-family: var(--font-heading);
    animation: slideInRight 0.5s ease-out;
}

.achievement-toast.success {
    border-color: var(--success);
}

.achievement-toast.error {
    border-color: var(--error);
}

.achievement-toast.premium {
    border-color: var(--premium);
    background: rgba(251, 191, 36, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Physics Particles */
.particle-physics {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* Golden Code Event */
.golden-code {
    position: fixed;
    font-family: 'Fira Code', monospace;
    font-weight: 800;
    color: #ffd700;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ffd700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: floatAcross 10s linear forwards, goldenPulse 1s infinite alternate;
    user-select: none;
    transition: transform 0.1s;
}

.golden-code:active {
    transform: scale(0.9);
}

@keyframes floatAcross {
    from {
        left: -10%;
    }

    to {
        left: 110%;
    }
}

@keyframes goldenPulse {
    from {
        box-shadow: 0 0 10px #ffd700;
        text-shadow: 0 0 5px #ffd700;
    }

    to {
        box-shadow: 0 0 30px #ffd700;
        text-shadow: 0 0 15px #ffd700;
    }
}

.floating-text {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Hacking Mini-Game */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
}

.terminal-window {
    width: 800px;
    max-width: 95%;
    height: 500px;
    background: #0c0c0c;
    border: 2px solid #0f0;
    box-shadow: 0 0 20px #0f0, inset 0 0 50px rgba(0, 255, 0, 0.1);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    color: #0f0;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    border-bottom: 1px solid #0f0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    text-shadow: 0 0 5px #0f0;
}

.terminal-content {
    flex: 1;
    overflow-y: hidden;
    font-size: 1.2rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    opacity: 0.8;
}

.terminal-footer {
    border-top: 1px solid #0f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.hack-progress-container {
    width: 100%;
    height: 10px;
    background: #003300;
    border: 1px solid #0f0;
    margin-top: 10px;
}

.hack-progress-bar {
    height: 100%;
    background: #0f0;
    width: 0%;
    box-shadow: 0 0 10px #0f0;
    transition: width 0.1s linear;
}

.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 255, 0, 0.05) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
}

.crt-flicker {
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.95;
    }

    50% {
        opacity: 0.9;
    }

    100% {
        opacity: 0.95;
    }
}

/* News Ticker */
.news-ticker-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid var(--accent);
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 9000;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
}

.news-label {
    background: var(--accent);
    color: #000;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    z-index: 2;
}

.news-content {
    white-space: nowrap;
    animation: scrollNews 20s linear infinite;
    padding-left: 100%;
    color: var(--text-dim);
}

@keyframes scrollNews {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Custom Cursor Trail */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s;
    box-shadow: 0 0 10px var(--accent);
}

/* Themes */
body.theme-matrix {
    --accent: #0f0;
    --accent-glow: rgba(0, 255, 0, 0.5);
    --bg-dark: #000500;
    --glass: rgba(0, 20, 0, 0.8);
}

body.theme-sunset {
    --accent: #f43f5e;
    --accent-glow: rgba(244, 63, 94, 0.5);
    --bg-dark: #1a050a;
    --premium: #fbbf24;
}

body.theme-gold {
    --accent: #fbbf24;
    --accent-glow: rgba(251, 191, 36, 0.5);
    --premium: #fff;
    --text-main: #fef3c7;
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: confetti-fall 3s linear forwards;
    z-index: 99999;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* Settings Modal */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.settings-group {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-group h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.theme-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.export-area {
    width: 100%;
    height: 60px;
    background: #111;
    color: var(--text-dim);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 0.5rem;
    font-family: monospace;
    font-size: 0.8rem;
    resize: none;
    margin-bottom: 0.5rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    width: 100%;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Deadline Crunch Event */
.deadline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.5);
    z-index: 9998;
    pointer-events: none;
    animation: pulse-red 0.8s infinite alternate;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5rem;
}

.deadline-alert-box {
    background: #ef4444;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    transform: rotate(-2deg);
    animation: shake 0.5s infinite;
    text-transform: uppercase;
    border: 3px solid #fff;
}

@keyframes pulse-red {
    from {
        box-shadow: inset 0 0 50px rgba(255, 0, 0, 0.2);
        background: rgba(255, 0, 0, 0.05);
    }

    to {
        box-shadow: inset 0 0 200px rgba(255, 0, 0, 0.7);
        background: rgba(255, 0, 0, 0.2);
    }
}

@keyframes shake {
    0% {
        transform: translate(0, 0) rotate(-2deg);
    }

    25% {
        transform: translate(-2px, 2px) rotate(-1deg);
    }

    50% {
        transform: translate(2px, -2px) rotate(-3deg);
    }

    75% {
        transform: translate(-2px, -2px) rotate(-2deg);
    }

    100% {
        transform: translate(0, 0) rotate(-2deg);
    }
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card {
    background: rgba(30, 41, 59, 0.7) !important;
    /* Force override */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card:hover::before {
    left: 100%;
}

/* Decision/Event Modal */
.event-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.event-card {
    background: #0f172a;
    border: 2px solid var(--accent);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    box-shadow: 0 0 50px rgba(14, 165, 233, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.event-icon {
    font-size: 3rem;
    color: var(--premium);
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.event-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
}

.event-desc {
    color: var(--text-dim);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

.decision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.decision-btn {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-heading);
    font-weight: 700;
}

.decision-btn:hover {
    transform: scale(1.05);
}

.btn-safe {
    border-color: var(--success);
    color: var(--success);
}

.btn-safe:hover {
    background: rgba(16, 185, 129, 0.1);
}

.btn-risky {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-risky:hover {
    background: rgba(244, 63, 94, 0.1);
}

/* Investment Pitch Modal */
.pitch-container {
    text-align: center;
    padding: 1rem;
}

.valuation-display {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--success);
    margin: 1rem 0;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    font-family: var(--font-mono);
}

.pitch-meter-container {
    width: 100%;
    height: 40px;
    background: #1e293b;
    border-radius: 20px;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    border: 3px solid #334155;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.pitch-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            #ef4444 0%,
            #f59e0b 20%,
            #10b981 40%,
            #10b981 60%,
            #f59e0b 80%,
            #ef4444 100%);
}

.pitch-marker {
    position: absolute;
    top: 0;
    left: 50%;
    /* Starts center */
    width: 6px;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 10px #fff;
    transform: translateX(-50%);
    z-index: 2;
}

.marker-moving {
    animation: moveMarker 2s ease-in-out infinite alternate;
}

@keyframes moveMarker {
    0% {
        left: 5%;
    }

    100% {
        left: 95%;
    }
}

.offer-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}

/* Market Dominance */
.dominance-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    text-align: center;
}

.dominance-bar-container {
    height: 24px;
    background: #1e293b;
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
    display: flex;
}

.dominance-segment {
    height: 100%;
    transition: width 1s ease;
}

.tier-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    margin-left: 0.5rem;
    text-transform: uppercase;
    font-weight: 700;
}

.tier-startup {
    color: #aaaaaa;
    border: 1px solid #aaaaaa;
}

.tier-unicorn {
    color: #f472b6;
    border: 1px solid #f472b6;
    background: rgba(244, 114, 182, 0.1);
}

.tier-titan {
    color: #60a5fa;
    border: 1px solid #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.tier-legend {
    color: #fbbf24;
    border: 1px solid #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

/* --- Project Development System --- */

/* 1. Setup Wizard */
.setup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.setup-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.setup-option:hover,
.setup-option.selected {
    background: rgba(14, 165, 233, 0.2);
    border-color: var(--accent);
}

.setup-input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 12px;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* 2. Development Studio Overlay */
.dev-studio-overlay {
    position: fixed;
    inset: 0;
    background: #0f172a;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
}

.dev-hud {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-item {
    text-align: center;
}

.hud-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.val-tech {
    color: #3b82f6;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.val-design {
    color: #eab308;
    text-shadow: 0 0 15px rgba(234, 179, 8, 0.5);
}

.val-bug {
    color: #ef4444;
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.hud-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.central-work-area {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

/* Main Dev Button Pulse */
.dev-core-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 4px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.1s;
}

.dev-core-btn:active {
    transform: scale(0.9);
}

.bug-phase .dev-core-btn {
    border-color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
    animation: shake 0.5s infinite;
}

/* 3. Bubbles */
.bubble {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;
    animation: floatUp 1.5s forwards ease-out;
}

.bubble-tech {
    background: #3b82f6;
    box-shadow: 0 0 10px #3b82f6;
}

.bubble-design {
    background: #eab308;
    box-shadow: 0 0 10px #eab308;
}

.bubble-bug {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    width: 24px;
    height: 24px;
}

@keyframes floatUp {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), -200px) scale(0.5);
        opacity: 0;
    }
}

/* 4. Release Phase */
.release-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column-reverse;
    }

    .side-nav {
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        background: rgba(15, 23, 42, 0.95);
        border-top: 1px solid var(--glass-border);
        border-right: none;
    }

    .nav-btn {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .nav-btn span {
        font-size: 0.6rem;
    }

    .nav-btn i {
        font-size: 1.2rem;
    }

    .content {
        padding: 1.5rem;
        padding-bottom: 50px;
    }

    .top-bar {
        padding: 0 1rem;
        height: 60px;
    }

    .stat-item span {
        display: none;
    }

    .stat-item {
        padding: 8px;
    }

    .office-main {
        gap: 1.5rem;
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 4rem;
    }

    .asset-row {
        grid-template-columns: 40px 1fr auto;
        gap: 10px;
    }

    .asset-row .buy-sell-group {
        grid-column: 1 / -1;
        justify-content: space-between;
        margin-top: 10px;
    }

    .asset-row .btn-sm {
        flex: 1;
    }

    .modal-card {
        padding: 2rem 1.5rem;
    }
}

.hidden {
    display: none !important;
}

/* --- Enhanced Dev Studio --- */
.dev-console {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    color: #0f0;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    height: 150px;
    overflow-y: hidden;
    font-size: 0.8rem;
    margin-top: 2rem;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.2);
    text-align: left;
    position: relative;
    white-space: pre-wrap;
    display: flex;
    flex-direction: column-reverse;
}

.dev-console::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.dev-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dev-stat-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.dev-stat-val {
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 0 10px currentColor;
}

.dev-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-top: 0.2rem;
}

/* --- Pending Apps --- */
.pending-app-card {
    background: linear-gradient(135deg, rgba(16, 24, 39, 0.9), rgba(30, 41, 59, 0.9));
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.countdown-timer {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #444;
}

.ad-skip-btn {
    background: linear-gradient(to right, #8b5cf6, #d946ef);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.ad-skip-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.ready-publish-btn {
    background: linear-gradient(to right, #10b981, #34d399);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    animation: pulse 1.5s infinite;
}

/* Floating Text Animation */
.floating-text {
    position: fixed;
    pointer-events: none;
    font-weight: 800;
    font-size: 1.2rem;
    z-index: 10000;
    animation: floatUp 0.8s ease-out forwards;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.floating-text.cash {
    color: var(--success);
}

.floating-text.diamond {
    color: var(--premium);
}

.floating-text.error {
    color: var(--error);
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) translateX(var(--move-x));
        opacity: 0;
    }
}

/* News Ticker HUD */
.news-ticker-container {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.news-label {
    background: var(--accent);
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

#news-content {
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Market War UI --- */
.war-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.95), #020617);
    z-index: 30000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.war-container {
    width: 90%;
    max-width: 800px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.war-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.war-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.war-timer {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--accent);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--accent);
}

.war-battlefield {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 3rem;
    gap: 2rem;
}

.war-side {
    flex: 1;
    padding: 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.player-side {
    border-left: 5px solid var(--accent);
    box-shadow: -10px 0 20px rgba(14, 165, 233, 0.1);
}

.rival-side {
    border-right: 5px solid var(--error);
    box-shadow: 10px 0 20px rgba(244, 63, 94, 0.1);
}

.war-entity-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.war-power {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.war-vs {
    font-size: 3rem;
    font-weight: 900;
    font-style: italic;
    color: rgba(255, 255, 255, 0.1);
}

.tug-of-war-container {
    width: 100%;
    height: 40px;
    background: #1e293b;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 4px solid #334155;
    margin-bottom: 1rem;
}

.tug-of-war-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--premium) 100%);
    width: 50%;
    /* 0 to 100% controlled by JS */
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 20px var(--accent-glow);
}

.tug-center-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: #fff;
    transform: translateX(-50%);
    z-index: 5;
    box-shadow: 0 0 10px #fff;
}

.war-instructions {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.war-action-btn {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent), var(--premium));
    border: none;
    color: #fff;
    font-weight: 900;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 0 40px var(--accent-glow);
    transition: transform 0.1s, box-shadow 0.2s;
    user-select: none;
}

.war-action-btn:active {
    transform: scale(0.9);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Ranking Specifics */
.player-row {
    background: rgba(14, 165, 233, 0.1) !important;
    border: 1px solid var(--accent) !important;
}

.captured-row {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.ranking-row {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.ranking-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.rank-number {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 800;
    width: 40px;
    color: var(--text-dim);
}

.rank-info {
    flex: 1;
}

.rank-company {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.rank-stats {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.rank-value {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--success);
    margin-right: 1.5rem;
}

.rank-actions {
    display: flex;
    gap: 0.5rem;

    /* --- Office & Inventory Enhancements --- */
    .office-visualizer {
        width: 100%;
        height: 300px;
        background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)), radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 80%);
        background-size: cover;
        background-position: center;
        border-radius: 24px;
        margin-bottom: 2rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--border);
        position: relative;
        overflow: hidden;
    }

    .office-tier-info {
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
        padding: 1.5rem 3rem;
        border-radius: 100px;
        border: 1px solid var(--accent);
        text-align: center;
        z-index: 5;
    }

    .inventory-card {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        padding: 1.5rem;
        text-align: center;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .inventory-card:hover {
        transform: translateY(-10px);
        border-color: var(--accent);
        background: rgba(14, 165, 233, 0.05);
    }

    .inventory-card.owned {
        border-color: var(--success);
        background: rgba(16, 185, 129, 0.05);
    }

    .app-health-bar {
        height: 6px;
        background: #334155;
        border-radius: 3px;
        margin: 10px 0;
        overflow: hidden;
    }

    .app-health-fill {
        height: 100%;
        transition: width 0.5s ease;
    }

    .health-critical {
        background: var(--error);
    }

    .health-warning {
        background: var(--warning);
    }

    .health-good {
        background: var(--success);
    }
}

/* --- SUPREME UI ANIMATIONS --- */
@keyframes pulse-slow {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes hackerPulse {
    0% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(251, 191, 36, 0.5);
    }

    100% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
    }
}

.hacker-glow {
    animation: hackerPulse 2s infinite ease-in-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s infinite ease-in-out;
}

.animate-shimmer {
    position: relative;
    overflow: hidden;
}

.animate-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out forwards;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #0ea5e9;
}

/* --- END SUPREME UI --- */
/* --- GLOBAL NEWS TICKER --- */
#global-news-ticker {
    font-family: var(--font-mono);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    background: rgba(2, 6, 23, 0.95) !important;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.animate-ticker {
    animation: ticker 30s linear infinite;
    min-width: 100%;
}

.animate-spin-slow {
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Premium Gradients */
.neo-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
}

/* --- GLOBAL HUB ENHANCEMENTS --- */
@keyframes dot-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.global-dot {
    animation: dot-pulse 2s infinite ease-in-out;
}

.sentiment-low {
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.4) !important;
}

.sentiment-high {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4) !important;
}

.strategic-grid {
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes hackerPulse {
    0% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(251, 191, 36, 0.5);
    }

    100% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
    }
}

.hacker-glow {
    animation: hackerPulse 2s infinite ease-in-out;
}