/*
Theme Name: AEGIRION Command
Theme URI: https://theark.redservermgmt.com/
Author: Redrum Command
Description: AEGIRION v6.2 — 3D Bridge Holotable, Nginx SSL Vault & 3-Tier Tactical Operations Hub
Version: 6.2.0
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary — Redrum Gaming Network
Text Domain: aegirion
*/
:root {
    --aeg-bg: #030106;
    --aeg-surface: rgba(9, 4, 15, 0.90);
    --aeg-crimson: #FF1E44;
    --aeg-cyan: #00F0FF;
    --aeg-violet: #9333EA;
    --aeg-amber: #F59E0B;
    --aeg-green: #10B981;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: #030106;
    color: #E2E8F0;
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
  }
  .font-orbitron { font-family: 'Orbitron', sans-serif; }
  .font-mono { font-family: 'JetBrains Mono', monospace; }

  #aeg-bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
  }
  .aeg-shell { position: relative; z-index: 2; }

  .aeg-panel {
    background: linear-gradient(180deg, rgba(11, 5, 19, 0.92) 0%, rgba(6, 2, 11, 0.95) 100%);
    border: 1px solid rgba(255, 30, 68, 0.28);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
  }

  /* 3D Holotable Stage */
  #aeg-holo-stage {
    position: relative;
    width: 100%;
    height: 600px;
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 48%, #0f041d 0%, #030107 78%);
    border: 1px solid rgba(0, 240, 255, 0.28);
    box-shadow: inset 0 0 65px rgba(0, 0, 0, 0.88), 0 0 32px rgba(255, 30, 68, 0.12);
    cursor: grab;
    user-select: none;
  }
  #aeg-holo-stage:active { cursor: grabbing; }
  #aeg-holo-stage.game-active { cursor: crosshair; }
  #aeg-holo-webgl {
    width: 100%;
    height: 100%;
    display: block;
  }
  #aeg-holo-tethers {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
  }
  #aeg-holo-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 8;
  }
  #aeg-game-popups {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 16;
  }
  .holo-tag {
    position: absolute;
    transform: translate(-50%, -100%);
    padding: 4px 9px;
    border-radius: 7px;
    background: rgba(5, 2, 12, 0.88);
    border: 1px solid rgba(0, 240, 255, 0.45);
    backdrop-filter: blur(5px);
    white-space: nowrap;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
    pointer-events: auto;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .holo-tag:hover {
    border-color: #FF1E44;
    box-shadow: 0 0 18px rgba(255, 30, 68, 0.5);
    z-index: 25;
  }
  .holo-tag.crimson { border-color: rgba(255, 30, 68, 0.68); box-shadow: 0 0 15px rgba(255, 30, 68, 0.28); }
  .holo-tag.amber { border-color: rgba(245, 158, 11, 0.62); box-shadow: 0 0 14px rgba(245, 158, 11, 0.22); }
  .holo-tag-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.08em;
    line-height: 1.15;
  }
  .holo-tag-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8.5px;
    color: #00F0FF;
    margin-top: 2px;
    line-height: 1.1;
  }
  .holo-tag.crimson .holo-tag-sub { color: #FDA4AF; }
  .holo-tag.amber .holo-tag-sub { color: #FCD34D; }

  /* Individual Clickable Server & Vault Callout Badges */
  .holo-srv-badge {
    position: absolute;
    transform: translate(0, -50%);
    padding: 3.5px 8px;
    border-radius: 6px;
    background: rgba(5, 2, 12, 0.92);
    border: 1px solid rgba(16, 185, 129, 0.55);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    color: #fff;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.72);
    transition: border-color 0.14s ease, transform 0.14s ease;
    z-index: 12;
  }
  .holo-srv-badge.align-left { transform: translate(-100%, -50%); }
  .holo-srv-badge:hover { border-color: #fff; z-index: 28; }
  .holo-srv-badge.selected { border-color: #00F0FF; box-shadow: 0 0 16px rgba(0,240,255,0.45); }
  .holo-srv-badge.standby { border-color: rgba(255, 30, 68, 0.55); }
  .holo-srv-badge.comms { border-color: rgba(0, 240, 255, 0.65); }
  .holo-srv-badge.vault-member { border-color: rgba(245, 158, 11, 0.55); }
  .holo-srv-badge.vault-admin { border-color: rgba(255, 30, 68, 0.7); background: rgba(24, 5, 14, 0.94); }

  .holo-rim-lbl {
    position: absolute;
    transform: translate(-50%, -50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(0, 240, 255, 0.68);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.45);
    pointer-events: none;
    white-space: nowrap;
  }
  .holo-rim-lbl.south { color: rgba(255, 30, 68, 0.85); text-shadow: 0 0 8px rgba(255, 30, 68, 0.5); }
  .holo-rim-lbl.moon { color: rgba(203, 213, 225, 0.85); font-size: 8px; background: rgba(4,2,10,0.75); padding: 1px 4px; border-radius: 3px; }
  .holo-rim-lbl.convoy { color: #FCD34D; font-size: 8px; background: rgba(4,2,10,0.8); padding: 1px 5px; border-radius: 4px; border: 1px solid rgba(245,158,11,0.35); }

  .holo-popup-tag {
    position: absolute;
    transform: translate(-50%, -100%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0,0,0,0.95);
    pointer-events: none;
  }
  .holo-crate-tag {
    position: absolute;
    transform: translate(-50%, -100%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(4,2,10,0.88);
    border: 1px solid rgba(0,240,255,0.6);
    color: #fff;
    white-space: nowrap;
    pointer-events: auto;
    cursor: pointer;
  }

  .holo-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    background: repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.014) 0px,
      rgba(255,255,255,0.014) 1px,
      transparent 1px,
      transparent 4px
    );
  }

  #aeg-dmg-flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 25;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: radial-gradient(circle at center, transparent 42%, rgba(255, 30, 68, 0.62) 100%);
  }
  #aeg-dmg-flash.flash { opacity: 1; }

  .osc-bar {
    width: 3px;
    border-radius: 999px;
    animation: oscPulse 1.1s ease-in-out infinite alternate;
  }
  @keyframes oscPulse {
    0% { transform: scaleY(0.28); opacity: 0.55; }
    100% { transform: scaleY(1); opacity: 1; }
  }

  .planet-tab {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(6, 3, 12, 0.9);
    color: #94A3B8;
    cursor: pointer;
    transition: all 0.16s ease;
    letter-spacing: 0.05em;
  }
  .planet-tab:hover { color: #fff; border-color: rgba(0, 240, 255, 0.45); }
  .planet-tab.active {
    background: rgba(255, 30, 68, 0.25);
    border-color: #FF1E44;
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 30, 68, 0.35);
  }
  .planet-tab.game-def { border-color: rgba(255, 30, 68, 0.45); color: #FDA4AF; background: rgba(255, 30, 68, 0.12); }
  .planet-tab.game-def.active { background: #FF1E44; color: #fff; box-shadow: 0 0 16px rgba(255, 30, 68, 0.6); }
  .planet-tab.game-cargo { border-color: rgba(245, 158, 11, 0.45); color: #FCD34D; background: rgba(245, 158, 11, 0.12); }
  .planet-tab.game-cargo.active { background: #D97706; color: #fff; box-shadow: 0 0 16px rgba(245, 158, 11, 0.55); }

  .aeg-server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
  .aeg-vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 16px; }
  .aeg-server-card, .aeg-vault-card, .aeg-fleet-card {
    background: linear-gradient(180deg, rgba(11, 6, 20, 0.94) 0%, rgba(5, 2, 10, 0.98) 100%);
    border: 1px solid rgba(255, 30, 68, 0.22);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  }
  .aeg-server-card:hover, .aeg-vault-card:hover, .aeg-fleet-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 240, 255, 0.48);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 240, 255, 0.12);
  }

  .aeg-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 1, 5, 0.82);
    backdrop-filter: blur(8px);
    padding: 20px;
  }
  .aeg-modal.active { display: flex; }
  #aeg-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 95;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(8, 4, 16, 0.96);
    border: 1px solid rgba(0, 240, 255, 0.55);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75);
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: all 0.22s ease;
  }
  #aeg-toast.show { opacity: 1; transform: translateY(0); }
