/* ==========================================================================
   SUPER KID RUNNER: PREMIUM MODERN DESIGN SYSTEM
   ========================================================================== */

/* 1. TOKENS & VARIABLES */
:root {
    --bg-dark: #0a0b16;
    --bg-card: rgba(18, 20, 38, 0.45);
    --bg-card-hover: rgba(26, 29, 56, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(147, 51, 234, 0.3);
    
    --primary: #9333ea; /* Neon Purple */
    --primary-glow: rgba(147, 51, 234, 0.5);
    --secondary: #06b6d4; /* Electric Cyan */
    --secondary-glow: rgba(6, 182, 212, 0.5);
    --accent: #f43f5e; /* Hot Rose/Red */
    --accent-glow: rgba(244, 63, 94, 0.5);
    --success: #10b981; /* Lime Green */

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 2. BASE RESET & SCROLLBAR */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: #f3f4f6;
    font-family: var(--font-body);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}
a:hover {
    text-shadow: 0 0 8px var(--secondary-glow);
}

/* Custom Scrollbar for panels */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 3. CORE LAYOUT FRAMEWORK */
#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Ambient glow background layers */
.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(147, 51, 234, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 45%);
    z-index: 0;
    pointer-events: none;
}

/* Shared Section Display Rules */
section {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

section.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
    z-index: 2;
}

/* Glassmorphism Card Utility */
.card-blur {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
}

#arcade-screen {
    overflow-y: auto;
    justify-content: flex-start;
    padding: 2.5rem 1.5rem;
}

/* 4. CHARACTER SELECTION MENU */
#selection-screen {
    padding: 2rem;
    overflow-y: auto;
}

.game-header {
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 800px;
    z-index: 10;
}

.logo-container {
    margin-bottom: 0.75rem;
}

.logo-sub {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary-glow);
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.logo-main .highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 15px rgba(147, 51, 234, 0.4));
}

.subtitle {
    font-size: 1rem;
    color: #9ca3af;
    line-height: 1.6;
}

/* Character Grid Layout */
.character-container {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    max-width: 900px;
    margin-bottom: 3rem;
    z-index: 10;
}

.character-card {
    flex: 1;
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, var(--primary-glow) 0%, transparent 60%);
    opacity: 0.15;
    transition: var(--transition-smooth);
    z-index: 0;
}

/* Hover/Active states for Selection Cards */
.character-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.25);
}

.character-card:hover .card-glow {
    opacity: 0.45;
}

.character-card.selected {
    border-color: var(--secondary);
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.45);
    background: var(--bg-card-hover);
    transform: scale(1.04);
}

.character-card.selected .card-glow {
    background: radial-gradient(circle at 50% 30%, var(--secondary-glow) 0%, transparent 65%);
    opacity: 0.65;
}

/* Avatar details inside card */
.avatar-container {
    height: 240px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border-bottom: 1px solid var(--border-glass);
}

.character-img {
    height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
    transition: var(--transition-bounce);
    z-index: 2;
}

.character-card:hover .character-img {
    transform: translateY(-5px) scale(1.08);
}

.custom-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    z-index: 3;
}

.custom-badge.cyan {
    background: var(--secondary);
    box-shadow: 0 0 15px var(--secondary-glow);
}

/* Card details styling */
.character-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.character-info h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.role-desc {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Stat meters inside card */
.stats-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.65rem;
}

.stat-label {
    width: 60px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-bar {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 999px;
}

/* 5. INTERACTIVE GENERAL BUTTONS */
.control-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    z-index: 10;
    width: 100%;
    max-width: 900px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    padding: 0.85rem 1.75rem;
}

.btn-large {
    padding: 1.15rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.35);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.6);
}
.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: #e5e7eb;
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    color: white;
}

.glow-btn {
    box-shadow: 0 0 25px var(--primary);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 15px rgba(147, 51, 234, 0.4); }
    50% { box-shadow: 0 0 30px rgba(147, 51, 234, 0.8); }
}

/* 6. GAMEPLAY UI & CANVAS */
#game-screen {
    background-color: #030408;
    justify-content: flex-start;
    align-items: stretch;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* HUD panels */
#hud {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.hud-left, .hud-right {
    display: flex;
    gap: 1rem;
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    border-radius: 14px;
    pointer-events: auto;
}

.hud-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.hud-text {
    display: flex;
    flex-direction: column;
}

.hud-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.08em;
}

.hud-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
}

#pause-btn {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    border: 1px solid var(--border-glass);
    color: white;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-smooth);
}
#pause-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

/* Powerup visual progress bar stack */
#powerup-timers {
    position: absolute;
    top: 6rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 10;
    width: 200px;
}

.powerup-bar {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    gap: 0.25rem;
}

.powerup-bar-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
}

.powerup-bar-outer {
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 99px;
    overflow: hidden;
}

.powerup-bar-inner {
    height: 100%;
    width: 100%;
    background: var(--secondary);
    border-radius: 99px;
    transition: width 0.1s linear;
}

/* 7. PAUSE / GAME OVER MODAL WINDOWS */
.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 5, 12, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none; /* Controlled via active class / JS */
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 2rem;
    overflow-y: auto;
}

.modal-backdrop.active {
    display: flex;
}

.modal-card {
    background: rgba(18, 20, 38, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.xl-card {
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.card-glow-red {
    box-shadow: 0 0 45px rgba(244, 63, 94, 0.25);
    border-color: rgba(244, 63, 94, 0.4);
}

.game-over-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.game-over-subtitle {
    color: #9ca3af;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Game Over statistics grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
}

.game-over-controls, .pause-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Pause card headers */
.pause-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}
.pause-subtitle {
    color: #9ca3af;
    margin-bottom: 2rem;
}

/* 8. SCROLLABLE PANELS HEADERS & STRUCT */
.modal-header {
    padding: 1.75rem 2.5rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
}

.close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.close-btn:hover {
    color: white;
}

.modal-body {
    padding: 2.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 1.5rem 2.5rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.15);
}

/* 9. ASSET CREATION TUTORIAL PANEL */
.guide-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #d1d5db;
    margin-bottom: 2.5rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-bottom: 2.5rem;
}

.step-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.75rem;
    position: relative;
}

.step-num {
    position: absolute;
    top: -1.25rem;
    left: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.step-box h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.step-box p {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.step-box ul {
    font-size: 0.85rem;
    color: #d1d5db;
    padding-left: 1rem;
    line-height: 1.6;
}

.step-box li {
    margin-bottom: 0.5rem;
}

.tip-highlight {
    background: rgba(6, 182, 212, 0.08);
    border-left: 3px solid var(--secondary);
    padding: 0.75rem;
    border-radius: 0 10px 10px 0;
    margin-top: 1rem;
}

.chroma-info-box {
    display: flex;
    gap: 1.5rem;
    padding: 1.75rem;
    border-radius: 20px;
    align-items: center;
}

.chroma-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.25));
}

.chroma-text h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.chroma-text p {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* 10. CODE EXPLORER PANEL STYLES */
.interactive-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.interactive-section h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.sliders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.slider-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
}

.slider-header span {
    color: var(--secondary);
    font-weight: 800;
}

.slider-desc {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
    transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
    transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.8);
}

.code-explain-tabs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.code-explain-tabs h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
}

.explain-card {
    padding: 1.75rem;
}

.explain-card h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

.explain-content p {
    font-size: 0.9rem;
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

pre {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
}

code {
    color: #a78bfa;
}

/* 11. MOBILE CONTROLS & ANIMATIONS */
#mobile-controls {
    display: none; /* Dynamically displayed on touch devices */
    position: absolute;
    bottom: 5rem;
    left: 5%;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 10;
    pointer-events: none;
}

.swipe-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.swipe-area {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 1.25rem 0.5rem;
    text-align: center;
    color: #9ca3af;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
    pointer-events: auto;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.swipe-area:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
    color: white;
}

/* Easing Animation Utilities */
.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-up {
    animation: scaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.delay-200 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hide mobile controls by default on desktop */
@media (min-width: 768px) {
    #mobile-controls {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .character-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    .logo-main {
        font-size: 2.25rem;
    }
    .steps-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .sliders-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .control-row {
        flex-direction: column;
        gap: 1rem;
    }
    .btn {
        width: 100%;
    }
}

/* ==========================================================================
   ACTIVE PLAYER SCOREBOARD & AVATAR BADGE
   ========================================================================== */
.player-hud-card {
    display: flex;
    align-items: center;
    gap: 0.85rem !important;
    padding: 0.5rem 1.25rem 0.5rem 0.65rem !important;
    border-radius: 9999px !important; /* Pill style scoreboard */
    border: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.hud-avatar-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-avatar-img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.hud-avatar-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    pointer-events: none;
    animation: avatar-pulse-glow 2.5s infinite;
}

@keyframes avatar-pulse-glow {
    0% { transform: scale(1); opacity: 0.4; }
    50% { opacity: 0.6; }
    100% { transform: scale(1.35); opacity: 0; }
}

.hud-player-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
   ARCADE DASHBOARD HUB STYLES
   ========================================================================== */
.arcade-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1050px;
    margin-bottom: 2.5rem;
    z-index: 10;
}

.arcade-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2rem;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition-bounce);
    overflow: hidden;
}

.arcade-card:hover {
    transform: translateY(-8px) scale(1.03);
}

.card-glow-purple:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(147, 51, 234, 0.3);
}

.card-glow-cyan:hover {
    border-color: var(--secondary);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.3);
}

.card-glow-red:hover {
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(244, 63, 94, 0.3);
}

.card-glow-yellow:hover {
    border-color: #fbbf24;
    box-shadow: 0 15px 35px rgba(251, 191, 36, 0.35);
}
.card-glow-violet:hover {
    border-color: #8b5cf6;
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.35);
}
.card-glow-magenta:hover {
    border-color: #ec4899;
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.35);
}
.card-glow-green:hover {
    border-color: #10b981;
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.35);
}
.card-glow-blue:hover {
    border-color: #3b82f6;
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.35);
}
.card-glow-orange:hover {
    border-color: #f97316;
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.35);
}
.card-glow-indigo:hover {
    border-color: #6366f1;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.35);
}
.card-glow-rose:hover {
    border-color: #f43f5e;
    box-shadow: 0 15px 35px rgba(244, 63, 94, 0.35);
}
.card-glow-emerald:hover {
    border-color: #10b981;
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.35);
}

.locked-card {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(18, 20, 38, 0.2);
    border-style: dashed;
}
.locked-card:hover {
    transform: none;
}

.arcade-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}
.arcade-card-badge.cyan {
    background: var(--secondary);
    box-shadow: 0 0 10px var(--secondary-glow);
}
.arcade-card-badge.red {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}
.arcade-card-badge.yellow {
    background: #eab308;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}
.arcade-card-badge.violet {
    background: #8b5cf6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}
.arcade-card-badge.magenta {
    background: #ec4899;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}
.arcade-card-badge.green {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.arcade-card-badge.blue {
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
.arcade-card-badge.orange {
    background: #f97316;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}
.arcade-card-badge.indigo {
    background: #6366f1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}
.arcade-card-badge.rose {
    background: #f43f5e;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}
.arcade-card-badge.purple {
    background: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}
.arcade-card-badge.emerald {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.arcade-card-badge.locked {
    background: #374151;
    box-shadow: none;
}

.arcade-card-media {
    font-size: 4rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px currentColor);
    transition: var(--transition-bounce);
}
.arcade-card:hover .arcade-card-media {
    transform: scale(1.15) rotate(5deg);
}

.arcade-card-info h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.arcade-card-info p {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    min-height: 4.5em;
}

.arcade-card-tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
}
.arcade-card-tag.purple {
    background: rgba(147, 51, 234, 0.15);
    color: #c084fc;
    border: 1px solid rgba(147, 51, 234, 0.3);
}
.arcade-card-tag.cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}
.arcade-card-tag.red {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
}
.arcade-card-tag.yellow {
    background: rgba(234, 179, 8, 0.15);
    color: #fef08a;
    border: 1px solid rgba(234, 179, 8, 0.3);
}
.arcade-card-tag.violet {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.arcade-card-tag.magenta {
    background: rgba(236, 72, 153, 0.15);
    color: #fbcfe8;
    border: 1px solid rgba(236, 72, 153, 0.3);
}
.arcade-card-tag.green {
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.arcade-card-tag.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.arcade-card-tag.orange {
    background: rgba(249, 115, 22, 0.15);
    color: #ffedd5;
    border: 1px solid rgba(249, 115, 22, 0.3);
}
.arcade-card-tag.indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.arcade-card-tag.rose {
    background: rgba(244, 63, 94, 0.15);
    color: #fecdd3;
    border: 1px solid rgba(244, 63, 94, 0.3);
}
.arcade-card-tag.emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.arcade-card-tag.gray {
    background: rgba(255, 255, 255, 0.05);
    color: #6b7280;
    border: 1px solid rgba(255,255,255,0.1);
}


/* ==========================================================================
   PLANETARY EXPLORATION MODAL STYLES
   ========================================================================== */
.planet-fact-card {
    background: rgba(10, 11, 22, 0.85) !important;
    border: 1.5px solid var(--secondary) !important;
    box-shadow: 0 0 45px rgba(6, 182, 212, 0.25) !important;
    max-width: 600px !important;
    overflow: hidden;
}

.planet-modal-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(6, 182, 212, 0.25) 0%, transparent 65%);
    z-index: 0;
    pointer-events: none;
}

.planet-header {
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.planet-badge {
    background: var(--secondary);
    box-shadow: 0 0 15px var(--secondary-glow);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.planet-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    color: white;
    text-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.gravity-announcement {
    color: var(--secondary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px var(--secondary-glow);
}

.planet-body {
    display: flex;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.planet-sphere-container {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Beautiful animated canvas-free planet sphere using CSS! */
.planet-sphere {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #51e2f5, #007cc7, #03045e);
    box-shadow: 
        inset -15px -15px 40px rgba(0,0,0,0.8),
        0 0 25px rgba(6, 182, 212, 0.4);
    animation: planet-float 4s ease-in-out infinite;
    position: relative;
}

@keyframes planet-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.planet-facts-container {
    flex-grow: 1;
}

.planet-facts-container h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
}

.planet-facts-container ul {
    list-style: none;
    padding: 0;
}

.planet-facts-container li {
    font-size: 0.9rem;
    color: #d1d5db;
    line-height: 1.5;
    margin-bottom: 0.85rem;
    padding-left: 1.25rem;
    position: relative;
}

.planet-facts-container li::before {
    content: "🛸";
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 0.8rem;
}

.planet-footer {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .arcade-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    .planet-body {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .planet-facts-container li {
        text-align: left;
    }
}

/* ==========================================================================
   CYBER ARCADE V2: DUAL-COLUMN LAYOUT & LEADERBOARDS
   ========================================================================== */
.arcade-dashboard-layout {
    display: flex;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    align-items: stretch;
    margin-bottom: 2rem;
    z-index: 10;
}

.arcade-main-column {
    flex-grow: 1;
    flex-shrink: 1;
}

.arcade-side-column {
    width: 320px;
    flex-shrink: 0;
    padding: 1.75rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
}

.card-glow-indigo {
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.leaderboard-header {
    margin-bottom: 1.25rem;
}
.leaderboard-header h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: white;
}
.leaderboard-header p {
    font-size: 0.75rem;
    color: #6b7280;
}

.leaderboard-tabs {
    display: flex;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 1.25rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #9ca3af;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.45rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(147, 51, 234, 0.3);
}

.leaderboard-body {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 350px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.leaderboard-table th {
    padding: 0.5rem 0.25rem;
    color: #6b7280;
    font-weight: 800;
    border-bottom: 1.5px solid var(--border-glass);
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.leaderboard-table td {
    padding: 0.75rem 0.25rem;
    color: #d1d5db;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.leaderboard-table tr:hover td {
    color: white;
    background: rgba(255,255,255,0.02);
}

.rank-glow {
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--secondary) !important;
}

.leaderboard-submit-box {
    margin-bottom: 1.75rem;
    padding: 1.25rem;
    border-radius: 14px;
    border-color: rgba(239, 68, 68, 0.25) !important;
}
.leaderboard-submit-box h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.submit-row {
    display: flex;
    gap: 0.75rem;
}
.submit-row input[type="text"] {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    color: white;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
}
.submit-row input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   DYNAMIC STAGE UP ALERT BANNER
   ========================================================================== */
#stage-banner {
    position: absolute;
    top: 30%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(147, 51, 234, 0.8) 20%, rgba(6, 182, 212, 0.8) 80%, transparent 100%);
    backdrop-filter: blur(8px);
    border-top: 2px solid var(--secondary);
    border-bottom: 2px solid var(--secondary);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
    padding: 1.5rem 0;
    text-align: center;
    z-index: 50;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.stage-banner-hidden {
    opacity: 0;
    transform: scaleY(0) translateY(-20px);
}

.stage-banner-visible {
    opacity: 1;
    transform: scaleY(1) translateY(0);
    animation: stage-banner-slide-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stage-banner-sub {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: 0.25em;
    text-shadow: 0 0 10px var(--secondary-glow);
}

.stage-banner-main {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.05em;
    text-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* ==========================================================================
   DADA'S AI PHOTO LAB STUDIO
   ========================================================================== */
.studio-layout {
    display: flex;
    gap: 2.5rem;
    align-items: stretch;
}

.studio-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.border-left {
    border-left: 1px solid var(--border-glass);
    padding-left: 2.5rem;
}

.studio-column h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.35rem;
}

.studio-desc {
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.kid-selector-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #d1d5db;
}
.kid-selector-row label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Drag Zone uploader */
.upload-drag-zone {
    flex-grow: 1;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background: rgba(255,255,255,0.01);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    min-height: 180px;
    text-align: center;
}

.upload-drag-zone:hover, .upload-drag-zone.dragover {
    border-color: var(--secondary);
    background: rgba(6, 182, 212, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(6,182,212,0.3));
    transition: var(--transition-bounce);
}
.upload-drag-zone:hover .upload-icon {
    transform: translateY(-5px) scale(1.1);
}

.upload-drag-zone h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
}

.upload-drag-zone p {
    font-size: 0.75rem;
    color: #6b7280;
}

/* AI DO Gateway Form inputs */
.ai-config-box {
    padding: 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.25rem;
}
.ai-config-box h4 {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.config-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.config-row input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    color: white;
    font-size: 0.8rem;
    outline: none;
    width: 100%;
}

.prompt-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.prompt-box label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: #d1d5db;
}
.prompt-box textarea {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    color: white;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    resize: none;
    transition: var(--transition-smooth);
}
.prompt-box textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary-glow);
}

.status-msg {
    font-size: 0.75rem;
    margin-top: 0.65rem;
    min-height: 1.5em;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.status-msg.error { color: #f43f5e; }
.status-msg.success { color: #10b981; }
.status-msg.loading { color: var(--secondary); animation: pulse-text 1.5s infinite; }

@keyframes pulse-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@media (max-width: 1000px) {
    .arcade-dashboard-layout {
        flex-direction: column;
        gap: 2rem;
    }
    .arcade-side-column {
        width: 100%;
    }
    .studio-layout {
        flex-direction: column;
        gap: 2rem;
    }
    .border-left {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-glass);
        padding-top: 2rem;
    }
}

/* ==========================================================================
   GRAVITY SHIFT STYLES (EDUCATIONAL PHYSICS ENGINE)
   ========================================================================== */
.gravity-flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 45;
    opacity: 0;
}

.gravity-flash-hidden {
    display: none;
}

.gravity-flash-active {
    display: block;
    animation: gravity-flash-animation 0.9s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes gravity-flash-animation {
    0% {
        opacity: 0.9;
        filter: brightness(2.0);
    }
    15% {
        opacity: 0.75;
    }
    100% {
        opacity: 0;
    }
}

#gravity-banner {
    position: absolute;
    top: 32%;
    left: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    padding: 1.8rem 0;
    text-align: center;
    z-index: 51;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: transform 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.gravity-banner-hidden {
    opacity: 0;
    transform: scaleY(0) scaleX(0.8) translateY(-40px);
}

.gravity-banner-visible {
    opacity: 1;
    transform: scaleY(1) scaleX(1) translateY(0);
}

.gravity-banner-sub {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
    margin: 0 1rem;
    line-height: 1.4;
}

.gravity-banner-main {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 900;
    color: white;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ==========================================================================
   GLOBAL PLAYER PROGRESSION PANEL STYLES
   ========================================================================== */
.global-progression-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.2rem auto;
    width: 100%;
    max-width: 1200px;
    z-index: 10;
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.progression-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

.profile-avatar {
    font-size: 2rem;
    background: rgba(147, 51, 234, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(147, 51, 234, 0.4);
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.3);
    animation: pulse-avatar 2s infinite ease-in-out;
}

@keyframes pulse-avatar {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(147, 51, 234, 0.3); }
    50% { transform: scale(1.06); box-shadow: 0 0 25px rgba(147, 51, 234, 0.6); }
}

.profile-text {
    display: flex;
    flex-direction: column;
}

.profile-level {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.05em;
}

.profile-title {
    font-size: 0.75rem;
    color: #a78bfa;
    font-weight: 600;
}

.progression-xp-container {
    flex-grow: 1;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.xp-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
}

.xp-bar-outer {
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.xp-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.6);
}

.progression-inventory {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
}

.inv-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.45rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 75px;
    transition: var(--transition-smooth);
}

.inv-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.inv-icon {
    font-size: 1.2rem;
    margin-bottom: 0.15rem;
}

.inv-value {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
}

.inv-label {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .global-progression-panel {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .progression-xp-container {
        width: 100%;
        max-width: 100%;
    }
    .progression-inventory {
        width: 100%;
        justify-content: space-around;
    }
}


