/* COSMOS FONT STACK & VARIABLES */
:root {
    --title-font: 'Michroma', sans-serif;
    --data-font: 'Oxanium', cursive;
    --support-font: 'Jost', sans-serif;
    --mono-font: 'Space Mono', monospace;
    --neon-cyan: #06b6d4;
    --panel-bg: rgba(15, 15, 25, 0.7);
}

/* GLOBAL SETTINGS - Locked for HUD Style */
html, body {
    height: 100vh !important;
    overflow: hidden !important;
    background-color: #050508;
    margin: 0;
    color: white;
    font-family: var(--support-font);
}

body {
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed;
    display: block;
}

/* COSMOS HUD SPECIFIC ANIMATIONS */
@keyframes scanner {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.heartbeat-scanner {
    animation: scanner 3s linear infinite;
}

/* LAYOUT ZONES */
.header-zone, .left-zone, .right-zone, .middle-zone {
    position: fixed;
    z-index: 1000;
    pointer-events: auto;
}

.header-zone { top: 1.5rem; }

/* COMPACT UPDATE: Reduced width to match 25% height reduction scale */
.left-zone { 
    left: 1.5rem; 
    width: 280px; 
    top: 1.5rem; 
}

.middle-zone { left: 50%; transform: translateX(-50%); width: 450px; top: 1.5rem; }
.right-zone { right: 1.5rem; top: 1.5rem; display: flex; align-items: center; gap: 12px; }

/* WALLPAPER OVERLAY */
.wallpaper-overlay { 
    position: fixed; 
    inset: 0; 
    background: rgba(0, 0, 0, 0.4); 
    z-index: -1; 
    pointer-events: none; 
}

/* COSMOS PANEL & HUD ELEMENTS */
.cosmos-panel {
    background: linear-gradient(135deg, var(--panel-bg) 0%, rgba(5, 5, 10, 0.8) 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Subtle corner accents */
.cosmos-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--neon-cyan);
    border-left: 2px solid var(--neon-cyan);
    opacity: 0.5;
}

.glow-point.online {
    background-color: var(--neon-cyan);
    box-shadow: 0 0 12px var(--neon-cyan), 0 0 20px rgba(6, 182, 212, 0.4);
}

.glow-point.offline {
    background-color: #ef4444;
    box-shadow: 0 0 12px #ef4444;
}

/* COMPACT UPDATE: Tighter vertical spacing for data readings */
.data-value {
    font-family: var(--data-font);
    letter-spacing: -0.02em;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    line-height: 1.1;
}

/* COMPACT UPDATE: Scaled down icons for the status board */
.stat-group i {
    transform: scale(0.85);
}

/* FIXED APP BOX & GRIDSTACK */
#app-box, .app-container {
    position: fixed; 
    top: 320px;      
    left: 50%;
    transform: translateX(-50%); 
    width: 95vw;
    max-width: 1400px;
    z-index: 50;
    padding: 20px !important;
    display: flex;
    flex-direction: column;
    background: transparent !important;
    overflow: visible !important; 
    transition: transform 0.3s ease, top 0.3s ease;
}

.drag-handle { display: none !important; }

.grid-stack, .grid-stack-item, .grid-stack-item-content { 
    overflow: visible !important;
    height: auto !important;
}

/* APP ITEM & ICON STYLING */
.app-item {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.app-item:hover {
    transform: translateY(-5px);
}

.icon-wrapper { 
    width: 75px; height: 75px; 
    border-radius: 1.25rem; 
    overflow: hidden; 
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3); 
    transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.app-item:hover .icon-wrapper {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* TYPOGRAPHY */
.chrono-clock {
    font-family: var(--data-font);
    font-size: 5rem;
    font-weight: 400;
    color: #fff;
    text-shadow: 0 0 30px rgba(255,255,255,0.1);
}

/* MODAL SYSTEM */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 9999 !important; 
    display: none; 
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.modal-input:focus {
    border-color: var(--neon-cyan);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* RESPONSIVE SCALING */
@media (max-height: 800px) {
    .chrono-clock { font-size: 3rem; }
    #app-box, .app-container { top: 220px; }
}