/* THEME & CORE */
body { font-family: 'Inter', sans-serif; background-color: #0b0f19; color: #e2e8f0; overflow: hidden; user-select: none; -webkit-tap-highlight-color: transparent; }
.heading { font-family: 'Rajdhani', sans-serif; text-transform: uppercase; }

/* LAYOUT */
.app-container { display: flex; flex-direction: column; height: 100vh; width: 100vw; }

@media (min-width: 768px) {
    .app-container { flex-direction: row; }
    .sidebar { display: flex !important; width: 300px; background: #0f1218; border-right: 1px solid #1e293b; flex-direction: column; z-index: 20; }
    .mobile-header, .mobile-nav { display: none !important; }
}

.main-content { flex: 1; position: relative; overflow: hidden; background: radial-gradient(circle at center, #1a202c 0%, #020617 100%); display: flex; flex-direction: column; }
.page-container { flex: 1; overflow-y: auto; padding-bottom: 100px; }
.page { display: none; padding: 2rem; animation: fadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

/* LOBBY UI */
.glass-panel { background: rgba(30, 41, 59, 0.4); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.hero-card { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); position: relative; overflow: hidden; }
.hero-card::after { content: ''; position: absolute; top:0; left:0; width:100%; height:100%; background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png'); opacity: 0.2; }

.nav-btn { transition: all 0.2s; border-left: 3px solid transparent; }
.nav-btn:hover { background: rgba(255,255,255,0.05); }
.nav-btn.active { background: linear-gradient(90deg, rgba(37,99,235,0.1), transparent); border-left-color: #3b82f6; color: #60a5fa; }

/* Pulse Animation for Live Tag */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

.animate-pulse-light {
    animation: pulse 2s infinite;
}

/* GAME LAYER */
#game-layer { position: fixed; inset: 0; background: #000; z-index: 50; display: none; }
#game-layer.active { display: block; }
canvas { touch-action: none; cursor: crosshair; }

/* IN-GAME UI */
.tac-btn { background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(4px); transition: transform 0.1s; }
.tac-btn:active { transform: scale(0.95); }
.tac-btn.active { border-color: #3b82f6; background: rgba(37, 99, 235, 0.2); box-shadow: 0 0 15px rgba(37, 99, 235, 0.4); }

.inv-slot { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; background: rgba(0,0,0,0.5); }
.inv-slot.active { border-color: #fbbf24; box-shadow: 0 0 5px #fbbf24; }

.poi-label { text-shadow: 0 2px 4px rgba(0,0,0,0.8); pointer-events: none; }

/* SQUAD STATUS PANEL */
#squad-status {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.player-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px;
    width: 220px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.player-avatar {
    width: 40px;
    height: 40px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 12px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.hp-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.5);
    border-radius: 3px;
    overflow: hidden;
}

.hp-bar-fill {
    height: 100%;
    background: #22c55e;
    transition: width 0.2s;
}

.player-loadout {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.mini-slot {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2px;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
}