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

:root {
    /* 2026 Unified Neo-Mainframe Palette (Strictly Monochromatic Cyan) */
    --void-bg: #030608;
    --deep-slate: #060e14;
    --neon-cyan: #00f2ff;
    --neon-cyan-dim: #008899;
    --neon-cyan-dark: #004455;
    --glass-bg: rgba(5, 12, 18, 1);
    --glass-border: rgba(0, 242, 255, 0.25);
    --glass-glow: 0 0 20px rgba(0, 242, 255, 0.1);

    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Grotesk', monospace;
}

/* GLOBAL UX STATES */
body.loading,
body.loading * {
    cursor: progress !important;
}

/* Global Styles */
html {
    background-color: var(--void-bg);
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--void-bg);
    color: #e0faff;
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

body {
    background-image:
        url('motherboard_bg_1776908769620.png'),
        radial-gradient(circle at 50% 50%, rgba(0, 242, 255, 0.08) 0%, transparent 80%);
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic Viewport Height */
}

/* Scanline Effect */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 242, 255, 0.03) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0), rgba(0, 255, 0, 0), rgba(0, 0, 255, 0));
    z-index: 9999;
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    opacity: 0.3;
}

h1,
h2,
h3,
h4,
.component-label {
    font-family: var(--font-heading);
    color: var(--neon-cyan);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--neon-cyan);
    background: linear-gradient(to right, rgba(0, 242, 255, 0.1), transparent);
    padding: 5px 15px;
    border-left: 3px solid var(--neon-cyan);
    width: 60% !important;
}

p,
.dcolor {
    color: #b0d4da;
    line-height: 1.6;
}

/* Scrollbar Enhancement */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--neon-cyan);
}

/* --- GRID LAYOUT RESTORATION (PIXEL PERFECT) --- */

/* Sidebar Shared Styles */
.Inventory {
    background-color: var(--glass-bg) !important;
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5) !important;
    border-radius: 2px;
    position: relative;
    height: auto !important;
    transition: all 0.3s ease;
}

.Inventory::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--neon-cyan);
    border-left: 2px solid var(--neon-cyan);
    pointer-events: none;
}

/* Legacy sidebar anchors removed for consolidated system below */

/* Main Frame (Center Grid) - Unified at 900px for Widescreen 3-Column Layout */
.master-layout-container {
    margin-top: 30px !important;
    display: grid !important;
    grid-template-columns: 220px 700px 220px !important;
    justify-content: center !important;
    align-items: start !important;
    align-content: start !important;
    width: 1140px !important;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 5;
    overflow: visible;
}

.sidebar-left {
    grid-column: 1 !important;
    width: 220px !important;
    min-width: 220px !important;
}

.sidebar-right {
    grid-column: 3 !important;
    width: 220px !important;
    min-width: 220px !important;
}

.MainFrame {
    grid-column: 2 !important;
    width: 700px !important;
    min-width: 700px !important;
    background-color: var(--void-bg) !important;
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8) !important;
    position: relative;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* TERMINAL CONSOLE MESSAGE STYLES */
.console-success {
    color: #00ff00 !important;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    font-weight: bold;
}

.console-error {
    color: #ff3333 !important;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.5);
    font-weight: bold;
}

.psmall {
    margin: 4px 0;
    line-height: 1.2;
}

.ConsoleText {
    scroll-behavior: smooth;
    overflow-y: auto;
}

/* INTERACTIVE FEEDBACK */
button,
.tabButton,
.battleZoneButton,
canvas#bitCvas,
canvas#Inventory,
canvas#Watch,
#captchaCanvas {
    cursor: pointer !important;
}

button:active {
    transform: translateY(1px);
    filter: brightness(1.2);
}

.primary-hardware-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    align-items: stretch;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.System {
    max-width: 700px;
    width: 85%;
    margin: 0 auto;
    position: relative;
}

.hardware-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px !important;
}

.column1,
.column3 {
    flex: 0 0 200px;
    width: 200px;
}

.column2 {
    flex: 0 0 240px;
    width: 240px;
}

.secondary-hardware-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    width: 100%;
    margin-top: 50px;
    padding: 30px 10px;
    background: linear-gradient(to bottom, rgba(0, 242, 255, 0.02), transparent);
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.secondary-hardware-grid::before {
    content: 'SECONDARY SYSTEMS';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--void-bg);
    padding: 0 15px;
    color: var(--neon-cyan-dim);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 3px;
}

.secondary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
}

/* Colliding Squares Layout for Main Components */
.component-pair {
    display: flex;
    flex-direction: column;
    /* Changed from row to stack icons vertically as squares */
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin: 15px auto;
    gap: 0;
    /* Remove gap to allow merging with stats below */
}

/* Dashboard Layout Utilities */
.radar-glow-container {
    position: relative;
    border-radius: 50%;
    padding: 0;
    background: transparent !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes radar-pulse {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(0, 242, 255, 0.1);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 60px rgba(0, 242, 255, 0.25);
        transform: scale(1.05);
    }
}

.central-dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Align with side columns */
    flex: 1;
    width: 100%;
}

.secondary-component-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.itemSquare {
    height: 240px !important;
    width: 240px !important;
    flex-shrink: 0 !important;
    margin: 5px 0 0 0 !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
    aspect-ratio: 1 / 1 !important;
}

.itemSquare:hover {
    border-color: var(--neon-cyan) !important;
    box-shadow: inset 0 0 20px rgba(0, 242, 255, 0.1), 0 0 15px rgba(0, 242, 255, 0.2);
    transform: scale(1.02);
}

.itemSquare:active {
    transform: scale(0.98);
}

.itemLevel {
    width: 240px !important;
    /* Synchronized with component width */
    height: auto;
    min-height: 50px;
    /* Compacted from 70px */
    background-color: rgba(0, 242, 255, 0.03) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    border-top: none !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0px 4px 4px 4px;
    /* Reduced from 8px */
    box-sizing: border-box;
    overflow: hidden !important;
}

.itemLevel p {
    margin: 2px 0 !important;
    line-height: 1 !important;
    white-space: nowrap;
    /* Prevent line wraps pushing layout down */
    text-overflow: ellipsis;
}

.itemSquare.CPU {
    background-image: url('img/CPU.png');
    margin-left: 28px !important;
    width: 200px !important;
    height: 200px !important;
}

.itemSquare.Virus {
    background-image: url('img/Virus2.png');
    margin-left: 28px !important;
    width: 200px !important;
    height: 200px !important;
}

.itemSquare.Shield {
    background-image: url('img/Antivirus2.png');
    margin-right: 28px !important;
    width: 200px !important;
    height: 200px !important;
}

.itemSquare.Power {
    background-image: url('img/Battery2.png');
    margin-right: 28px !important;
    width: 200px !important;
    height: 200px !important;
}

.digitalTimer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 400px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.05);
    text-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
    z-index: 1;
    pointer-events: none;
    font-family: 'Courier New', monospace;
}

.statsCPU,
.statsVirus,
.statsShield,
.statsPower {
    /* Styles moved to .itemLevel above */
}

/* Column 2 (Center Dashboard) Positioning */
.column2 table {
    position: absolute;
    top: 50px;
    width: 100%;
}

.hlevel {
    font-family: var(--font-heading) !important;
    font-size: 24px !important;
    color: var(--neon-cyan) !important;
    text-shadow: 0 0 15px var(--neon-cyan-dark);
    margin: 5px 0 !important;
}

#HealthCvas {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 50%;
    margin: 0 auto;
    display: block;
}

#PowerCvas {
    background: rgba(0, 8, 12, 0.8) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

#powerText,
#healthText {
    color: var(--neon-cyan-dim) !important;
    font-family: var(--font-mono) !important;
    font-size: 10px !important;
    text-transform: uppercase;
}

#points {
    font-size: 11px !important;
    margin: 0 !important;
}

/* Small Components (x y z) - Natural Flow in columns */
.column1 .component-label#labelRAM {
    margin-top: 20px;
    width: 60% !important;
    text-align: center;
    margin-left: auto;
    margin-right: auto;

}

.column1 .Memory {
    margin: 10px auto !important;
}

.column1 .statsMemory {
    width: 45px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    min-height: 20px;
}

.column2 .statsHDD {
    width: 45px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    min-height: 20px;
}

.column3 .statsNetwork {
    width: 45px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    min-height: 20px;
}

.itemSquareSmall {
    width: 110px;
    height: 110px;
    margin: 15px auto !important;
    background-color: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    background-size: 80% !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.itemSquareSmall:hover {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.itemSquareSmall.Memory {
    background-image: url('img/RAM.png');
}

.itemSquareSmall.HDD {
    background-image: url('img/HDD.png');
}

.itemSquareSmall.Network {
    background-image: url('img/Network.png');
}

.component-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    pointer-events: none;
    text-align: center;
    width: 100%;
}

/* Console (Fixed relative footer in MainFrame) */
.container3 {
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 800px !important;
    max-width: 95vw !important;
    z-index: 15000 !important;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.Console {
    background-color: var(--void-bg) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    border-bottom: none !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8) !important;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    position: relative;
    width: 100% !important;
    height: 300px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 4px 4px 0 0;
    pointer-events: auto;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
}

.Console.minimized {
    height: 35px !important;
    overflow: hidden !important;
}

.Console.minimized > *:not(.ConsoleTabs) {
    display: none !important;
}

.ConsoleTabs {
    display: flex;
    width: 100%;
    height: 35px;
    flex-shrink: 0 !important;
    background: rgba(0, 242, 255, 0.05);
    border-bottom: 1px solid var(--neon-cyan-dark);
}

.Console .tabButton {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 5px !important;
    height: 100% !important;
    border: none !important;
    border-right: 1px solid rgba(0, 242, 255, 0.1) !important;
    background: transparent !important;
    color: var(--neon-cyan-dim) !important;
    font-size: 10px !important;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.Console .tabButton:hover {
    background: rgba(0, 242, 255, 0.1) !important;
    color: var(--neon-cyan) !important;
}

.ConsoleText {
    flex-grow: 1;
    padding: 10px 10px 20px 10px;
    /* Adjusted bottom padding for scaled UI */
    font-size: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Prevent scrolling the body when reaching end of chat */
    color: var(--neon-cyan-dim);
}

#CombatText {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(circle at center, rgba(0, 242, 255, 0.05) 0%, transparent 70%);
}

#Battle {
    image-rendering: pixelated;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

#DetectedContainer {
    width: 100%;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--neon-cyan-dark);
}

.ConsoleInput {
    height: 35px;
    flex-shrink: 0 !important;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-top: 1px solid var(--neon-cyan-dark);
}

.ConsoleInput input {
    height: 30px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    background: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-mono);
    font-size: 11px;
}

#textTo {
    width: 100px !important;
}

#textMessage {
    flex-grow: 1 !important;
    width: auto !important;
}

.ConsoleInput .version {
    font-size: 9px;
    color: var(--neon-cyan-dark);
    margin-left: 10px;
    white-space: nowrap;
}

/* Initialization Overlay (Login Screen) */
.Initialize {
    background-color: var(--void-bg) !important;
    background: rgba(6, 14, 20, 0.98) !important;
    backdrop-filter: blur(40px) saturate(180%);
    border: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    z-index: 99999 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    /* Let wrapper handle padding for margin:auto to work best */
    box-sizing: border-box;
    overscroll-behavior: contain;
}

.login-form-container {
    background: rgba(0, 242, 255, 0.02);
    border: 1px solid rgba(0, 242, 255, 0.1);
    padding: clamp(20px, 5vw, 40px);
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    width: 100%;
    box-sizing: border-box;
}

.fb-social-container {
    height: auto !important;
    max-height: 40px;
    margin: 5px 0;
    display: flex;
    justify-content: center;
}

.fb-follow-btn {
    display: inline-flex;
    align-items: center;
    background: rgba(24, 119, 242, 0.15);
    border: 1px solid rgba(24, 119, 242, 0.4);
    color: #fff;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 8px;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    gap: 4px;
}

.fb-follow-btn:hover {
    background: rgba(24, 119, 242, 0.3);
    border-color: #1877f2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.2);
}

.fb-icon {
    width: 12px;
    height: 12px;
    fill: #1877f2;
}

/* 2026 Neo-Cyan Input Styling */
input[type="text"],
input[type="password"],
input[type="email"],
select {
    background: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-mono) !important;
    padding: 12px 15px !important;
    margin: 8px 0 !important;
    width: 280px !important;
    outline: none !important;
    transition: all 0.3s ease;
    border-radius: 2px;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3) !important;
    background: rgba(0, 242, 255, 0.1) !important;
}

::placeholder {
    color: rgba(0, 242, 255, 0.4) !important;
    text-transform: uppercase;
    font-size: 11px;
}

/* Hardware Sub-Elements */
.itemLevel {
    width: 88% !important;
    position: relative;
    padding: 5px 0;
    text-align: center;
}

.plevel {
    color: var(--neon-cyan) !important;
    font-family: var(--font-mono) !important;
    font-weight: bold;
    font-size: 14px !important;
    margin: 2px 0 !important;
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.4);
}

.pstats {
    color: var(--neon-cyan-dim) !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    margin: 1px 0 !important;
}

.health-canvas {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: block;
    margin: 5px auto;
    width: 100%;
    height: 4px;
}

.smallInfo {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    background: rgba(0, 242, 255, 0.1) !important;
    border: 1px solid var(--neon-cyan) !important;
    color: var(--neon-cyan) !important;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.smallInfo:hover {
    background: var(--neon-cyan) !important;
    color: var(--void-bg) !important;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.levelup-btn {
    width: 45px;
    height: auto;
    cursor: pointer;
    margin: 5px auto;
    transition: all 0.2s ease;
    filter: drop-shadow(0 0 5px rgba(0, 242, 255, 0.2));
}

.levelup-btn:hover {
    filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.6)) brightness(1.2);
    transform: scale(1.05);
}

.levelup-btn:active {
    transform: scale(0.95);
}

.action-btn {
    background: linear-gradient(to bottom, rgba(0, 242, 255, 0.1), rgba(0, 242, 255, 0.05)) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-mono);
    padding: 4px 8px !important;
    font-size: 10px !important;
    border-radius: 2px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.action-btn:hover {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2) !important;
    background: rgba(0, 242, 255, 0.2) !important;
}

/* Unified Buttons */
.LOGINbutton,
#LOGINbutton,
.battleZoneButton {
    background: linear-gradient(135deg, var(--neon-cyan-dark), #002233) !important;
    border: 1px solid var(--neon-cyan) !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-heading);
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2) !important;
}

.tabButton,
.closeButton,
.Botonpuntos {
    background: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 11px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tabButton:hover,
.Botonpuntos:hover,
.tabButton.active {
    background: rgba(0, 242, 255, 0.15) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2) !important;
    color: #fff !important;
}

/* Side Buttons */
.menu-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--neon-cyan-dark);
    border-radius: 4px;
    background-color: var(--void-bg);
    background-size: 20px;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.menu-btn:hover {
    opacity: 1;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
    transform: scale(1.05);
}

/* Battle Zone / Map */
/* Pop-up and Overlay Alignment Fixes */
.blackout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 8, 12, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
}

.battleZoneBox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    z-index: 10000 !important;
    background: #000;
    /* Solid black for total immersion */
    border: none !important;
    box-shadow: none !important;
    overflow: hidden;
}

.mapBox,
.storeBox,
.rankingBox,
.statisticsBox,
.Clearance {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 3000 !important;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 100px rgba(0, 0, 0, 1);
    overflow: hidden;
    max-height: 90vh;
    max-width: 95vw;
    /* These overlays live OUTSIDE the scaling wrapper, so they must not be double-scaled */
}

#mapBox {
    width: 992px;
    height: 667px;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 50px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 242, 255, 0.2);
}

#bitCvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

#infoBox {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 20000 !important;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 150px rgba(0, 0, 0, 1), 0 0 30px rgba(0, 242, 255, 0.2);
    padding: 30px !important;
    text-align: center;
    min-width: 400px;
    border-radius: 12px;
    color: #fff;
    font-family: 'Courier New', monospace;
}

#infoBox button {
    background: var(--neon-cyan);
    color: #000;
    border: none;
    padding: 10px 40px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
    transition: all 0.3s ease;
    border-radius: 4px;
}

#infoBox button:hover {
    background: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

#storeSquare,
#rankingSquare,
#statisticsSquare,
#instructionsSquare,
#clanSquare {
    max-height: 70vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    padding: 15px;
    margin-top: 10px;
    display: block !important;
    background: rgba(0, 5, 10, 0.4);
    border-radius: 8px;
}

/* Custom Scrollbar for these boxes */
#storeSquare::-webkit-scrollbar,
#rankingSquare::-webkit-scrollbar,
#instructionsSquare::-webkit-scrollbar,
#clanSquare::-webkit-scrollbar {
    width: 8px !important;
}

#storeSquare::-webkit-scrollbar-thumb,
#rankingSquare::-webkit-scrollbar-thumb,
#instructionsSquare::-webkit-scrollbar-thumb,
#clanSquare::-webkit-scrollbar-thumb {
    background: var(--neon-cyan) !important;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--neon-cyan);
}


/* Custom Scrollmask */
.nebula-canvas {
    background: #000;
    border: 1px solid var(--neon-cyan-dark);
}

/* Specific formatting for the Login screen content */
.Initialize-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 480px;
    height: 100%;
    margin: 0 auto;
    padding: 60px 20px;
    flex-shrink: 0;
}

.Initialize h2 {
    font-family: 'VT323', monospace !important;
    font-size: min(32px, 8vw) !important;
    color: var(--neon-cyan);
    margin: 10px 0 15px 0 !important;
    text-transform: uppercase;
    text-shadow: 0 0 15px var(--neon-cyan-dark);
}

.Initialize h3 {
    font-size: 14px !important;
    color: var(--neon-cyan-dim);
    margin-bottom: 20px !important;
}

.Initialize input {
    width: 100% !important;
    max-width: 320px;
    box-sizing: border-box !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    background: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: #fff !important;
    font-family: var(--font-mono) !important;
    font-size: 14px !important;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.Initialize input:focus {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 242, 255, 0.1) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2), inset 0 0 10px rgba(0, 242, 255, 0.1);
    outline: none;
}

.login-form-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    width: 100%;
}

@media (max-width: 500px) {
    .Initialize {
        padding: 15px 10px !important;
        max-width: 98% !important;
    }

    .Initialize h2 {
        font-size: 18px !important;
        margin: 0 0 5px 0 !important;
    }

    .Initialize h3 {
        font-size: 11px !important;
        margin-bottom: 5px !important;
    }

    .Initialize input,
    #MyButton {
        width: 100% !important;
        padding: 8px !important;
        margin-bottom: 5px !important;
        font-size: 13px !important;
    }

    .Initialize .psmall {
        font-size: 10px !important;
    }
}

/* Landscape-Specific Fix for Login Cutoff */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .Initialize {
        display: flex;
        padding: 10px !important;
        text-align: center;
        height: 100dvh;
        align-items: center;
        justify-content: center;
    }

    .Initialize-content-wrapper {
        display: inline-block;
        /* Removed !important to allow JS toggling after login */
        margin: 0 auto !important;
        width: 100%;
        max-width: 480px;
        padding: 0 0 40px 0 !important;
    }

    .login-form-container {
        padding: 10px 15px !important;
        max-width: 400px;
    }

    .Initialize h2 {
        font-size: 20px !important;
        margin: 5px 0 !important;
    }

    .Initialize .psmall {
        font-size: 10px !important;
    }
}

/* The InvisibleContainer in index.php contains many pre-loader images.
   We anchor it out of the flow so it doesn't push the game down. */
.InvisibleContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
}

.resourcesIndicator {
    border-collapse: collapse;
    margin: 5px 0;
    width: 100%;
}

.resourcesIndicator td {
    padding: 8px 0;
    text-align: center;
    vertical-align: middle;
}

.resourcesIndicator p {
    font-family: var(--font-mono) !important;
    font-size: 14px !important;
    margin: 0 !important;
    color: var(--neon-cyan);
    font-weight: bold;
}

.resourcesIndicator img {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 5px var(--neon-cyan-dark));
    display: inline-block;
}

.sidebar-menu-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Reduced from 12px */
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.menu-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Reduced from 15px */
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(0, 242, 255, 0.03);
    width: 100%;
    box-sizing: border-box;
}

.menu-item-row:hover {
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

.menu-item-row span {
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--neon-cyan-dim);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.menu-item-row:hover span {
    color: var(--neon-cyan);
}

.resource-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
}

.res-item {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.1);
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.res-item:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.res-item img {
    width: 22px;
    height: 22px;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 5px var(--neon-cyan-dark));
}

.res-item p {
    margin: 0 !important;
    font-family: var(--font-mono) !important;
    font-size: 13px !important;
    color: var(--neon-cyan);
    font-weight: bold;
}

@import url("https://fonts.googleapis.com/css2?family=VT323&display=swap");

/* --- HOLOGRAPHIC SCOREBOARD (READY PLAYER ONE STYLE) --- */
.holo-scoreboard-container {
    perspective: 1000px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    height: 260px;
    z-index: 1000;
    pointer-events: none;
}

.bottom-board {
    bottom: -140px;
    /* Anchored to bottom of MainFrame */
    width: 650px;
    /* Wider for bottom placement */
    height: 200px;
    transform: translateX(-50%) scale(0.8);
    transform-origin: center bottom;
}

.bottom-board .holo-board {
    transform: rotateX(-15deg) translateZ(-40px);
    /* Tilted from bottom towards user */
    background: rgba(0, 242, 255, 0.05);
    /* Slightly more visible */
}

.bottom-board .holo-list {
    grid-template-columns: 1fr 1fr 1fr;
    /* 3 columns for wider layout */
    gap: 10px;
}

.bottom-board .holo-points-display {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
}

.bottom-board .holo-digital-counter {
    font-size: 28px !important;
}

.holo-board {
    width: 100%;
    height: 100%;
    background: rgba(0, 242, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 242, 255, 0.15);
    transform-style: preserve-3d;
    transform: rotateX(25deg) translateZ(-40px);
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-sizing: border-box;
    box-shadow:
        0 0 40px rgba(0, 242, 255, 0.08),
        inset 0 0 25px rgba(0, 242, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    animation: holo-flicker 5s infinite step-end, holo-float 6s infinite ease-in-out;
}

.holo-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 242, 255, 0.03) 0px,
            rgba(0, 242, 255, 0.03) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 5;
}

.holo-header {
    font-family: var(--font-heading);
    color: var(--neon-cyan);
    font-size: 11px;
    letter-spacing: 5px;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: 0 0 12px var(--neon-cyan);
    opacity: 0.9;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
    padding-bottom: 5px;
}

.holo-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #fff;
    flex-grow: 1;
}

.holo-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 242, 255, 0.05);
    padding: 2px 0;
}

.holo-rank {
    color: var(--neon-cyan);
    font-weight: bold;
    margin-right: 8px;
    font-size: 9px;
}

.holo-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.holo-val {
    color: var(--neon-cyan-dim);
    margin-left: 10px;
    font-size: 9px;
}

/* New Integrated Points Display */
.holo-points-display {
    padding: 10px 25px;
    background: rgba(0, 242, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 4px;
    position: relative;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.top-points {
    position: absolute;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: fit-content;
    min-width: 200px;
    animation: holo-float 6s infinite ease-in-out;
}



.holo-points-label {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin-bottom: 5px;
    opacity: 0.7;
}

.holo-digital-counter {
    font-family: "VT323", monospace !important;
    font-size: 34px !important;
    color: var(--neon-cyan);
    margin: 0 !important;
    letter-spacing: 5px;
    text-shadow: 0 0 15px var(--neon-cyan), 0 0 30px rgba(0, 242, 255, 0.3);
    line-height: 1;
}

.holo-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 242, 255, 0.05) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.4;
}

@keyframes holo-flicker {

    0%,
    19.999%,
    22%,
    62.999%,
    64%,
    64.999%,
    70%,
    100% {
        opacity: 1;
        transform: rotateX(25deg) translateZ(-40px) skewX(0deg);
    }

    20% {
        opacity: 0.8;
        transform: rotateX(25deg) translateZ(-40px) skewX(2deg);
    }

    63% {
        opacity: 0.9;
        transform: rotateX(25deg) translateZ(-40px) skewX(-1deg);
    }

    65% {
        opacity: 0.7;
        transform: rotateX(25deg) translateZ(-40px) skewX(5deg);
    }
}

@keyframes holo-float {

    0%,
    100% {
        transform: rotateX(25deg) translateZ(-40px) translateY(0);
    }

    50% {
        transform: rotateX(25deg) translateZ(-40px) translateY(-10px);
    }
}

/* Old Points Panel Removed */
.points-display-panel {
    display: none;
    width: fit-content;
    min-width: 200px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 242, 255, 0.1), 0 0 15px rgba(0, 0, 0, 0.5);
}

.display-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(rgba(18, 16, 16, 0) 0, rgba(18, 16, 16, 0.25) 50%, rgba(18, 16, 16, 0) 100%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.3;
}

.digital-counter {
    font-family: "VT323", monospace !important;
    font-size: 38px !important;
    color: var(--neon-cyan);
    margin: 0 !important;
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.7), 0 0 20px rgba(0, 242, 255, 0.3), 0 0 30px rgba(0, 242, 255, 0.1);
    line-height: 1;
    z-index: 1;
    position: relative;
}

.module-slots {
    margin-top: 5px;
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
    transition: all 0.3s ease;
}

.module-slot {
    width: 14px;
    height: 14px;
    border: 1px dashed rgba(0, 242, 255, 0.5);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "VT323", monospace !important;
    font-size: 11px;
    color: rgba(0, 242, 255, 0.15);
    background: rgba(0, 242, 255, 0.02);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.module-slot::after {
    content: "0";
}

.module-slot:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 242, 255, 0.05);
}

.module-slot[data-filled="1"] {
    color: var(--neon-cyan) !important;
    border: 1px solid var(--neon-cyan);
    background: rgba(0, 242, 255, 0.1) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4), inset 0 0 5px rgba(0, 242, 255, 0.2);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.module-slot[data-filled="1"]::after {
    content: "1";
}

.Botonpuntos {
    width: 130px !important;
    /* Recalibrated for 150px sidebar */
    height: 26px !important;
    background: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    color: var(--neon-cyan) !important;
    font-family: "VT323", monospace !important;
    font-size: 15px !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 4px auto;
    display: block;
}

.Botonpuntos:hover {
    background: rgba(0, 242, 255, 0.15) !important;
    box-shadow: 0 0 10px var(--neon-cyan-dark);
}

.stats-radar {
    display: block;
    margin: 5px auto;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.2));
}

#MyButton {
    width: 100% !important;
    max-width: 320px;
    padding: 15px !important;
    margin-top: 10px !important;
    background: var(--neon-cyan-dark) !important;
    border: 1px solid var(--neon-cyan) !important;
    color: #fff !important;
    font-family: "VT323", monospace !important;
    font-size: 20px !important;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

#MyButton:hover {
    background: var(--neon-cyan) !important;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
    transform: scale(1.02);
}

#MyButton:active {
    transform: scale(0.98);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CLAN SYSTEM UI â€” Neo-Arcade Terminal v5.0
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Container */
.clan-manager {
    background: rgba(0, 10, 18, 0.98);
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: #e0faff;
    padding: 0;
    font-family: var(--font-mono);
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.08), inset 0 0 60px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    overflow: hidden;
}

/* Clan Header Banner */
.clan-header {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.12) 0%, rgba(0, 80, 120, 0.15) 50%, rgba(0, 242, 255, 0.08) 100%);
    border-bottom: 1px solid rgba(0, 242, 255, 0.25);
    padding: 18px 20px 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.clan-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 242, 255, 0.05) 50%, transparent 100%);
    animation: clan-header-sweep 8s infinite linear;
}

@keyframes clan-header-sweep {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(50%);
    }
}

.clan-header-name {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.6), 0 0 40px rgba(0, 242, 255, 0.2);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0 0 4px;
    position: relative;
    z-index: 1;
}

.clan-header-id {
    font-size: 9px;
    color: rgba(0, 242, 255, 0.4);
    letter-spacing: 1px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.clan-member-count-badge {
    display: inline-block;
    background: rgba(0, 242, 255, 0.15);
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: var(--neon-cyan);
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 8px;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* Tab Navigation */
.clan-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 242, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
    padding: 0;
}

.clan-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(0, 242, 255, 0.4);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.clan-tab:hover {
    color: rgba(0, 242, 255, 0.7);
    background: rgba(0, 242, 255, 0.03);
}

.clan-tab.active {
    color: var(--neon-cyan);
    border-bottom-color: var(--neon-cyan);
    background: rgba(0, 242, 255, 0.05);
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.5);
}

.clan-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(0, 242, 255, 0.3);
}

/* Tab Content Panels */
.clan-tab-content {
    padding: 15px;
    display: none;
    animation: clan-tab-fadein 0.3s ease;
}

.clan-tab-content.active {
    display: block;
}

@keyframes clan-tab-fadein {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MOTD Section */
.clan-motd {
    background: rgba(0, 242, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.12);
    border-left: 3px solid rgba(0, 242, 255, 0.4);
    padding: 10px 12px;
    margin-bottom: 15px;
    border-radius: 0 4px 4px 0;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
}

.clan-motd-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(0, 242, 255, 0.5);
    margin-bottom: 5px;
    display: block;
}

.clan-motd-input {
    width: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(0, 242, 255, 0.2) !important;
    color: #fff !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    padding: 8px !important;
    margin: 5px 0 !important;
    resize: vertical;
    min-height: 40px;
    border-radius: 3px;
}

.clan-motd-input:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.15) !important;
    outline: none;
}

/* Stat Boxes */
.clan-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.clan-stat-box {
    flex: 1;
    background: rgba(0, 242, 255, 0.04);
    border: 1px solid rgba(0, 242, 255, 0.12);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.clan-stat-box:hover {
    border-color: rgba(0, 242, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.08);
}

.clan-stat-value {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
    margin: 0;
    line-height: 1;
}

.clan-stat-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(0, 242, 255, 0.4);
    margin-top: 5px;
}

/* Member Cards */
.clan-members-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.clan-member-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 242, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.08);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.clan-member-card:hover {
    background: rgba(0, 242, 255, 0.07);
    border-color: rgba(0, 242, 255, 0.25);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.08);
}

.clan-member-card.is-self {
    border-left: 3px solid var(--neon-cyan);
    background: rgba(0, 242, 255, 0.06);
}

.clan-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 6px #00ff88, 0 0 12px rgba(0, 255, 136, 0.3);
    flex-shrink: 0;
    animation: clan-pulse-online 2s infinite ease-in-out;
}

@keyframes clan-pulse-online {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px #00ff88;
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 12px #00ff88, 0 0 20px rgba(0, 255, 136, 0.4);
    }
}

.clan-offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #555;
    flex-shrink: 0;
}

.clan-member-info {
    flex: 1;
    min-width: 0;
}

.clan-member-name {
    font-size: 12px;
    color: #e0faff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clan-member-level {
    font-size: 9px;
    color: rgba(0, 242, 255, 0.5);
    margin-top: 2px;
}

.clan-role-badge {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    flex-shrink: 0;
}

.clan-role-badge.leader {
    background: rgba(255, 204, 0, 0.15);
    border: 1px solid rgba(255, 204, 0, 0.4);
    color: #ffcc00;
}

.clan-role-badge.member {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.2);
    color: rgba(0, 242, 255, 0.6);
}

.clan-member-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

/* Small Buttons */
.clan-btn-small {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.25);
    color: var(--neon-cyan);
    padding: 3px 10px;
    font-size: 9px;
    font-family: var(--font-mono);
    cursor: pointer;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.clan-btn-small:hover {
    background: rgba(0, 242, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.clan-btn-small.danger {
    border-color: rgba(255, 80, 80, 0.4);
    color: #ff5555;
    background: rgba(255, 0, 0, 0.06);
}

.clan-btn-small.danger:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: #ff5555;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

.clan-btn-small.promote {
    border-color: rgba(255, 204, 0, 0.4);
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.06);
}

.clan-btn-small.promote:hover {
    background: rgba(255, 204, 0, 0.15);
    border-color: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
}

/* Action Rows */
.clan-action-row {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.clan-action-btn {
    flex: 1;
    background: linear-gradient(to bottom, rgba(0, 242, 255, 0.1), rgba(0, 242, 255, 0.04));
    border: 1px solid rgba(0, 242, 255, 0.25);
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.clan-action-btn:hover {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
    transform: translateY(-1px);
}

.clan-action-btn.danger {
    color: #ff5555;
    border-color: rgba(255, 80, 80, 0.3);
    background: linear-gradient(to bottom, rgba(255, 0, 0, 0.08), rgba(255, 0, 0, 0.03));
}

.clan-action-btn.danger:hover {
    background: rgba(255, 0, 0, 0.12);
    border-color: #ff5555;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.15);
}

/* Recruit Section */
.clan-recruit-section {
    margin-bottom: 15px;
}

.clan-recruit-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.clan-recruit-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(0, 242, 255, 0.2) !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    width: auto !important;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.clan-recruit-input:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2) !important;
}

.clan-recruit-input::placeholder {
    color: rgba(0, 242, 255, 0.3) !important;
    font-size: 10px !important;
}

.clan-status-msg {
    font-size: 10px;
    padding: 8px 10px;
    margin-top: 8px;
    border-radius: 3px;
    animation: clan-tab-fadein 0.3s ease;
}

.clan-status-msg.success {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.clan-status-msg.error {
    color: #ff5555;
    background: rgba(255, 0, 0, 0.08);
    border: 1px solid rgba(255, 0, 0, 0.2);
}

/* Invite Cards */
.clan-invite-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 242, 255, 0.04);
    border: 1px solid rgba(0, 242, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.clan-invite-card:hover {
    border-color: rgba(0, 242, 255, 0.25);
    background: rgba(0, 242, 255, 0.07);
}

.clan-invite-name {
    font-size: 12px;
    color: #e0faff;
}

.clan-invite-actions {
    display: flex;
    gap: 6px;
}

/* Clan Chat */
.clan-chat-area {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 242, 255, 0.1);
    border-radius: 4px;
    height: 200px;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 10px;
    scroll-behavior: smooth;
}

.clan-chat-area::-webkit-scrollbar {
    width: 4px;
}

.clan-chat-area::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 255, 0.3);
    border-radius: 2px;
}

.clan-chat-msg {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 242, 255, 0.03);
    color: rgba(255, 255, 255, 0.8);
}

.clan-chat-msg .clan-chat-author {
    color: var(--neon-cyan);
    font-weight: bold;
}

.clan-chat-msg .clan-chat-time {
    color: rgba(0, 242, 255, 0.3);
    font-size: 9px;
    margin-right: 6px;
}

.clan-chat-input-row {
    display: flex;
    gap: 6px;
}

.clan-chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(0, 242, 255, 0.2) !important;
    color: #fff !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    padding: 8px 10px !important;
    margin: 0 !important;
    width: auto !important;
    border-radius: 3px;
}

.clan-chat-input:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.15) !important;
}

/* Section Labels */
.clan-section-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(0, 242, 255, 0.4);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.08);
}

/* Pending Invites Section */
.clan-pending-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 242, 255, 0.1);
}

/* No-clan creation panel */
.clan-create-panel {
    text-align: center;
    padding: 20px 15px;
}

.clan-create-panel .clan-recruit-input {
    width: 100% !important;
    margin-bottom: 10px !important;
    text-align: center;
}

.clan-empty-msg {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    padding: 15px 0;
    text-align: center;
}

/* Separator */
.clan-divider {
    border: 0;
    border-top: 1px solid rgba(0, 242, 255, 0.1);
    margin: 15px 0;
}

/* Battle Zone Fullscreen Adjustments */
#battleZoneCvas {
    image-rendering: pixelated;
    display: block;
}

.bz-ui-overlay {
    pointer-events: auto !important;
}

#bzBottomHud {
    transition: transform 0.3s ease;
}

#bzBottomHud:hover {
    transform: translateY(-5px);
    /* Only vertical float, no horizontal jump */
}

/* --- RESPONSIVE LANDSCAPE OPTIMIZATION (TABLET/MOBILE) --- */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .master-layout-container {
        width: 100% !important;
        max-width: 1200px;
        align-items: stretch;
    }

    .MainFrame {
        flex: 1 !important;
        width: auto !important;
        min-height: 200vh !important;
        /* Force scroll for secondary components */
    }

    .primary-hardware-grid {
        padding-bottom: 5px;
    }

    .hardware-column {
        padding-top: 5px !important;
    }

    .itemSquare {
        width: 185px !important;
        height: 185px !important;
    }

    .itemLevel {
        padding: 4px !important;
    }

    .central-dashboard {
        transform: scale(0.8);
        transform-origin: top center;
    }

    .secondary-hardware-grid {
        margin-top: 5px;
        /* Almost non-existent gap */
        padding-bottom: 40px;
    }

    .sidebar-left,
    .sidebar-right {
        flex: 0 0 140px !important;
        width: 140px !important;
        font-size: 10px;
    }

    .Inventory {
        height: auto !important;
        min-height: 100vh;
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- ULTRA-COMPACT OPTIMIZATION (EXTRA SMALL LANDSCAPE) --- */
@media screen and (max-height: 480px) and (orientation: landscape) {
    .itemSquare {
        width: 110px !important;
        height: 110px !important;
        padding: 1px !important;
    }

    .itemLevel {
        min-height: 30px !important;
        width: 100% !important;
        padding: 1px !important;
    }

    .plevel {
        font-size: 11px !important;
    }

    .pstats {
        font-size: 9px !important;
        line-height: 1 !important;
    }

    .component-label {
        font-size: 9px !important;
        margin: 1px 0 !important;
    }

    .central-dashboard {
        transform: scale(0.65);
        transform-origin: top center;
        margin-top: -10px;
    }

    .sidebar-left,
    .sidebar-right {
        flex: 0 0 115px !important;
        width: 115px !important;
    }

    .primary-hardware-grid,
    .secondary-hardware-grid {
        gap: 5px !important;
    }

    .itemSquareSmall {
        width: 38px !important;
        height: 38px !important;
        margin: 5px auto !important;
    }

    .hardware-column {
        padding-top: 2px !important;
    }

    .points-display-panel {
        transform: scale(0.8);
        margin-bottom: 5px !important;
    }
}

/* --- PREMIUM RANKING LEADERBOARD --- */
.playerRank {
    border-collapse: separate;
    border-spacing: 0 5px;
    margin-bottom: 5px;
    background: rgba(0, 242, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.1);
    transition: all 0.2s ease;
}

.playerRank:hover {
    background: rgba(0, 242, 255, 0.08);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.playerRank.prank {
    background: rgba(0, 242, 255, 0.15);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.rank-name {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    padding-left: 10px;
}

.rank-lvl {
    color: var(--neon-cyan);
    font-weight: bold;
    font-size: 12px;
}

.top-rank-1 {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    border-color: #ffd700;
}

.top-rank-2 {
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
    border-color: #c0c0c0;
}

.top-rank-3 {
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
    border-color: #cd7f32;
}

/* BZ HUD */

/* --- BATTLE ZONE PREMIUM HUD --- */
.battleZoneHeader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 25px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10001;
    pointer-events: none;
}

.battleZoneHeader * {
    pointer-events: auto;
}

.battleZoneTitle {
    font-family: 'Orbitron', sans-serif !important;
    color: var(--neon-cyan);
    font-size: 20px;
    letter-spacing: 3px;
    text-shadow: 0 0 15px var(--neon-cyan);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bz-header-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.bz-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.battleZoneMinimap {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 260px !important;
    height: 260px !important;
    background: rgba(0, 10, 20, 0.85);
    border: 1px solid var(--neon-cyan-dark);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(0, 242, 255, 0.1);
    z-index: 10001;
    border-radius: 4px;
    backdrop-filter: blur(10px);
    image-rendering: pixelated;
}

.battleZoneInfo {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 255, 255, 0.5);
    font-family: 'VT323', monospace;
    font-size: 14px;
    letter-spacing: 1px;
    z-index: 10001;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 15px;
    border-radius: 20px;
    pointer-events: none;
}

.battleZoneClose {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.battleZoneClose:hover {
    background: rgba(255, 50, 50, 0.4);
    border-color: #ff5555;
    box-shadow: 0 0 10px #ff5555;
}

#bzHealBtn {
    position: absolute !important;
    top: 100px !important;
    left: 25px !important;
    z-index: 10001 !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) !important;
}

#bzSearchContainer {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
}

.bz-dark-console {
    position: relative !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: rgba(0, 10, 20, 0.95) !important;
    border: 1px solid var(--neon-cyan-dark) !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8) !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
    /* Ensure padding doesn't push it out */
}

.bz-dark-console .ConsoleText {
    flex: 1 1 auto !important;
    height: 300px !important;
    max-height: calc(100% - 70px) !important;
    /* Force it to stay within the console bounds */
    overflow-y: auto !important;
}

#bzBottomHud {
    position: fixed !important;
    /* Pin to viewport */
    bottom: 25px;
    left: 25px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    z-index: 10001;
    pointer-events: none;
    /* Allow clicks to pass to canvas through gaps */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bz-ui-overlay {
    pointer-events: auto;
}

.bz-console-wrap {
    width: 580px;
    height: 340px;
    background: rgba(0, 15, 25, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--neon-cyan-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 242, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bz-inventory-wrap {
    width: 160px;
    height: 340px;
    background: rgba(0, 15, 25, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--neon-cyan-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 242, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.inventory-left {
    position: relative;
    background-color: var(--void-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8) !important;
    width: 100% !important;
    height: auto !important;
    min-height: 920px;
    margin: 0 !important;
    z-index: 5;
}

.inventory-right {
    position: relative;
    background-color: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    width: 100% !important;
    height: auto !important;
    min-height: 350px;
    margin: 0 !important;
    z-index: 5;
}

.bz-resource-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 20, 30, 0.85);
    border: 1px solid var(--neon-cyan-dark);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    max-width: 320px;
}

.bz-res-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(0, 242, 255, 0.1);
    min-width: 70px;
}

.bz-res-icon {
    font-size: 14px;
    text-shadow: 0 0 5px currentColor;
}

.bz-res-val {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
}

/* Points HUD Styling */
.stat-value {
    color: var(--neon-cyan);
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
}

.stat-divider {
    margin: 0 5px;
    color: var(--neon-cyan-dark);
    opacity: 0.5;
}

.stat-cap {
    font-size: 0.9em;
    color: var(--neon-cyan-dim);
}

.stat-remaining {
    margin-left: 10px;
    font-size: 0.85em;
    color: #ffcc00;
    /* Amber for urgency/remaining */
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
}

/* --- MOBILE OVERLAY BOX OPTIMIZATION --- */
@media screen and (max-width: 900px) {

    .mapBox,
    .storeBox,
    .rankingBox,
    .statisticsBox {
        width: 94% !important;
        max-width: 95vw !important;
        min-width: 280px !important;
        box-sizing: border-box !important;
        padding: 8px !important;
    }

    /* Fixed height constraint for Statistics specifically to handle long lists */
    .statisticsBox {
        max-height: 85vh !important;
    }
}

@media screen and (max-width: 600px) {

    #statisticsSquare {
        padding-right: 5px !important;
    }

    .bz-console-wrap {
        width: 95vw !important;
        height: 280px !important;
        max-width: 580px;
    }

    .bz-inventory-wrap {
        width: 140px !important;
        height: 300px !important;
    }

    #bzBottomHud {
        bottom: 10px !important;
        left: 10px !important;
        gap: 10px !important;
    }

    /* Landscape specific optimization for Battle Zone */
    @media screen and (orientation: landscape) and (max-height: 500px) {
        .bz-console-wrap {
            height: 340px !important;
            width: 50vw !important;
            min-width: 320px;
        }

        .bz-inventory-wrap {
            height: 340px !important;
            width: 120px !important;
        }
    }
}

/* Prevent flex items from stretching parents */
.statisticsBox div[style*="display: flex"] {
    flex-wrap: wrap !important;
}

/* AI Advisor Scanning Effect */
.ai-scanning::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 242, 255, 0.1) 50%,
            transparent 100%);
    background-size: 100% 200px;
    animation: ai-scan 1s linear;
    pointer-events: none;
}

@keyframes ai-scan {
    from {
        background-position: 0 -200px;
    }

    to {
        background-position: 0 100%;
    }
}

/* --- HOLOGRAPHIC RANKING UI --- */
.ranking-holo-container {
    padding: 10px;
    background: rgba(0, 15, 25, 0.4);
    border: 1px solid rgba(0, 242, 255, 0.1);
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 242, 255, 0.05);
}

.holo-rank-row {
    background: rgba(0, 242, 255, 0.04);
    border: 1px solid rgba(0, 242, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.holo-row-elite {
    background: rgba(0, 242, 255, 0.08);
    border-color: rgba(0, 242, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.holo-row-elite::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.05), transparent);
    animation: holo-flicker 3s infinite;
}

.rank-gold {
    border-color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.05) !important;
}

.rank-silver {
    border-color: #c0c0c0 !important;
    background: rgba(192, 192, 192, 0.05) !important;
}

.rank-bronze {
    border-color: #cd7f32 !important;
    background: rgba(205, 127, 50, 0.05) !important;
}

.is-current-player {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 242, 255, 0.15) !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2) !important;
}

.holo-scanline-thin {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0, 242, 255, 0.03) 2px);
    pointer-events: none;
}

@keyframes holo-flicker {
    0% {
        opacity: 0.8;
    }

    5% {
        opacity: 0.5;
    }

    10% {
        opacity: 0.8;
    }

    15% {
        opacity: 0.7;
    }

    25% {
        opacity: 0.8;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

.holo-player-name {
    letter-spacing: 1px;
    text-transform: uppercase;
}

.holo-header-banner .holo-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 242, 255, 0.1), transparent);
    animation: scanline 4s linear infinite;
}

/* Mobile Landscape Full-Screen Optimization */
@media screen and (max-height: 480px) and (orientation: landscape) {
    body {
        overflow-x: hidden;
    }

    .master-layout-container {
        transform: scale(0.85);
        transform-origin: top center;
        width: 1100px !important;
        margin-left: calc(50% - 550px) !important;
    }

    .MainFrame {
        min-height: auto !important;
    }

    .ConsoleText {
        height: 250px !important;
    }
}

/* MOBILE LANDSCAPE OPTIMIZATION (HIGH-DPI FIX) */
body.mobile-landscape .master-layout-container {
    width: 1080px !important;
    grid-template-columns: 190px 700px 190px !important;
    gap: 0 !important;
    margin-top: 10px !important;
}

body.mobile-landscape .sidebar-left,
body.mobile-landscape .sidebar-right {
    width: 190px !important;
    min-width: 190px !important;
}

body.mobile-landscape .Inventory.Frame {
    min-width: 180px !important;
    padding: 5px !important;
}

body.mobile-landscape .primary-hardware-grid {
    gap: 10px !important;
}

body.mobile-landscape .hardware-column {
    flex: 0 0 180px !important;
    width: 180px !important;
}

body.mobile-landscape h1 {
    font-size: 24px !important;
    margin: 5px 0 !important;
}

body.mobile-landscape .hlevel {
    font-size: 11px !important;
    padding: 3px 10px !important;
}

body.mobile-landscape p,
body.mobile-landscape span,
body.mobile-landscape .plevel,
body.mobile-landscape .pstats {
    font-size: 15px !important;
    /* Visual boost for high PPI */
}

body.mobile-landscape .container3 {
    width: 90% !important;
    max-width: 1000px !important;
}

@media screen and (orientation: landscape) {
    body {
        padding-bottom: 600px !important;
        /* Increased scrollable space for mobile landscape keyboard */
    }
}

.Initialize {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 15000; /* Ensure it stays on top of everything including Battle Zone */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

body.logged-in .Initialize {
    display: none !important;
}

.module-slot::after,
.module-slot[data-filled="1"]::after {
    content: "" !important;
}
/* TACTICAL VOICE INTERFACE (STOLEN FROM INTERPRETE.PHP) */
.tactical-voice-overlay { 
    display: none; 
    position: absolute; 
    bottom: 120%; 
    left: 0; 
    width: 700px; 
    height: 450px; 
    background: rgba(0, 10, 20, 0.98); 
    border: 1px solid var(--neon-cyan-dark); 
    box-shadow: 0 0 50px rgba(0,0,0,0.9), 0 0 20px rgba(0, 242, 255, 0.15); 
    z-index: 20000; 
    flex-direction: column; 
    overflow: hidden; 
    font-family: var(--font-body); 
    color: var(--neon-cyan); 
    border-radius: 8px;
    backdrop-filter: blur(20px);
    transform-origin: bottom left;
    animation: tacticalPopIn 0.4s cubic-bezier(0.17, 0.84, 0.44, 1);
}
@keyframes tacticalPopIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.tactical-header { padding: 12px 20px; border-bottom: 1px solid var(--glass-border); background: rgba(0, 242, 255, 0.05); display: flex; justify-content: space-between; align-items: center; z-index: 10; }
.tactical-header h1 { font-family: var(--font-heading); font-size: 0.9rem; letter-spacing: 2px; margin: 0; text-shadow: 0 0 10px var(--neon-cyan); border: none; background: none; padding: 0; }
.tactical-main { flex: 1; display: grid; grid-template-columns: 220px 1fr; gap: 15px; padding: 15px; position: relative; overflow-y: auto; }
.tactical-panel { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 4px; padding: 20px; display: flex; flex-direction: column; gap: 15px; backdrop-filter: blur(10px); position: relative; }
.tactical-panel-header { font-family: var(--font-heading); font-size: 0.8rem; color: var(--neon-cyan-dim); border-bottom: 1px solid var(--neon-cyan-dark); padding-bottom: 5px; margin-bottom: 10px; text-transform: uppercase; }
.tactical-data-row { display: flex; justify-content: space-between; font-size: 0.9rem; }
.tactical-data-label { color: var(--neon-cyan-dim); }
.tactical-data-value { font-family: 'Courier New', monospace; font-weight: bold; }
.tactical-visualizer-container { display: flex; flex-direction: column; gap: 10px; }
.tactical-canvas { width: 100%; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--neon-cyan-dark); }
#tacticalMainVisualizer { flex: 1; background: rgba(0, 10, 15, 0.8); position: relative; display: flex; align-items: center; justify-content: center; border: 1px solid var(--glass-border); }
.tactical-controls { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 20px; z-index: 100; }
.tactical-btn { background: rgba(0, 242, 255, 0.1); border: 1px solid var(--neon-cyan); color: var(--neon-cyan); padding: 10px 30px; font-family: var(--font-heading); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%); }
.tactical-btn:hover { background: var(--neon-cyan); color: #000; box-shadow: 0 0 20px var(--neon-cyan); }
.tactical-overlay-info { position: absolute; top: 20px; right: 20px; text-align: right; pointer-events: none; }
.tactical-big-number { font-size: 3rem; font-family: var(--font-heading); line-height: 1; margin: 0; color: white; text-shadow: 0 0 20px var(--neon-cyan); }
.tactical-unit { font-size: 0.8rem; color: var(--neon-cyan-dim); }
#tacticalNoteSequenceTape { display: flex; gap: 10px; overflow-x: auto; white-space: nowrap; font-family: var(--font-heading); font-size: 1.2rem; padding: 5px; scroll-behavior: smooth; }
#tacticalTranscriptionBox { display: flex; flex-wrap: wrap; gap: 15px; font-family: var(--font-body); padding: 10px; min-height: 60px; }

/* Holographic Video Player */


.hologram-frame {
    width: 800px;
    height: 500px;
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.5);
    position: relative;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
    display: flex;
    flex-direction: column;
    animation: holo-flicker 4s infinite;
}

.hologram-scanline {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
    z-index: 10;
    animation: scanline 8s linear infinite;
    pointer-events: none;
}

.hologram-header {
    background: rgba(0, 242, 255, 0.15);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 242, 255, 0.3);
}

.hologram-title {
    font-family: 'Orbitron';
    font-size: 12px;
    color: #00f2ff;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #00f2ff;
}

.hologram-close {
    background: none;
    border: none;
    color: #00f2ff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.hologram-content {
    flex-grow: 1;
    background: #000;
    position: relative;
    overflow: hidden;
}

.hologram-footer {
    background: rgba(0, 242, 255, 0.05);
    padding: 5px 15px;
    font-size: 9px;
    color: rgba(0, 242, 255, 0.5);
    font-family: 'Orbitron';
    text-align: right;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
}

@keyframes holo-flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    33% { opacity: 0.98; transform: skewX(0.2deg); }
    66% { opacity: 0.95; transform: scale(1.002); }
    90% { opacity: 0.99; transform: skewX(-0.1deg); }
}

@keyframes scanline {
    0% { top: 0; }
    100% { top: 100%; }
}

