:root {
  --bg: #07050f;
  --panel: rgba(15, 10, 30, .78);
  --line: rgba(165, 104, 255, .25);
  --purple: #a855f7;
  --cyan: #38d9ff;
  --pink: #ff4fd8;
  --text: #f4edff;
  --muted: #9c91ae;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 20%, rgba(105, 42, 170, .25), transparent 38%),
    radial-gradient(circle at 80% 80%, rgba(25, 120, 180, .12), transparent 35%),
    var(--bg);
  font-family: "Courier New", monospace;
  overflow-x: hidden;
}

body:before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: -3;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, .72) 100%);
}

.grid {
  position: fixed; inset: 45% -20% -35% -20%; z-index: -2;
  transform: perspective(320px) rotateX(62deg);
  transform-origin: center top;
  background-image:
    linear-gradient(rgba(139, 72, 255, .32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 72, 255, .32) 1px, transparent 1px);
  background-size: 55px 55px;
  animation: gridMove 2.8s linear infinite;
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 85%, transparent 100%);
}

@keyframes gridMove { to { background-position: 0 55px, 0 0; } }

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .11;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, #fff 4px);
  mix-blend-mode: overlay;
}

.particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }

.particle {
  position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: float linear infinite;
}

@keyframes float {
  from { transform: translateY(105vh); opacity: 0; }
  15% { opacity: .8; } 85% { opacity: .6; }
  to { transform: translateY(-10vh); opacity: 0; }
}

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 5vw; border-bottom: 1px solid var(--line);
  background: rgba(7, 5, 15, .78); backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.ghost-mark { font-size: 34px; filter: drop-shadow(0 0 12px var(--purple)); }
.brand h1 { font-size: 22px; margin: 0; letter-spacing: 5px; }
.brand h1 span { color: var(--cyan); }
.brand p { font-size: 9px; letter-spacing: 3px; color: var(--muted); margin: 4px 0 0; }
nav { display: flex; gap: 8px; }

.nav-btn, .categories button {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .025);
  color: var(--muted); padding: 10px 14px; font: inherit; font-size: 11px;
  cursor: pointer; transition: .2s;
}

.nav-btn:hover, .nav-btn.active, .categories button:hover, .categories button.active {
  color: white; border-color: var(--purple); background: rgba(168, 85, 247, .13);
  box-shadow: 0 0 18px rgba(168, 85, 247, .15);
}

main { width: min(1400px, 90%); margin: auto; }

.hero {
  min-height: 480px; display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 50px; padding: 70px 0 55px;
}

.eyebrow, .section-label { font-size: 11px; letter-spacing: 4px; color: var(--cyan); }
.hero h2 { font-size: clamp(45px, 7vw, 88px); line-height: .9; margin: 18px 0; letter-spacing: -4px; text-shadow: 4px 4px 0 rgba(168, 85, 247, .22); }
.hero h2 span { color: var(--purple); text-shadow: 0 0 24px rgba(168, 85, 247, .5); }
.hero p { color: var(--muted); font-size: 14px; }

.search-panel {
  padding: 26px; border: 1px solid var(--line);
  background: var(--panel); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.search-panel label { display: block; font-size: 10px; color: var(--cyan); letter-spacing: 3px; margin-bottom: 12px; }
.search-wrap { display: flex; align-items: center; border: 1px solid rgba(168, 85, 247, .55); background: #090711; padding: 0 14px; }
.search-wrap span { font-size: 25px; color: var(--purple); }

.search-wrap input {
  width: 100%; padding: 17px 12px; background: transparent; border: 0; outline: 0;
  color: white; font: inherit; font-size: 14px;
}

.search-wrap input::placeholder { color: #625a70; }
kbd { border: 1px solid #443650; padding: 3px 7px; color: #81778e; font-size: 10px; }
.categories { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.categories button { font-size: 10px; padding: 7px 10px; }

.library-head {
  display: flex; justify-content: space-between; align-items: end;
  border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 20px;
}

.library-head h3 { margin: 7px 0 0; font-size: 22px; letter-spacing: 2px; }
.count { font-size: 11px; color: var(--cyan); }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 15px; }

.game-card {
  position: relative; min-height: 240px; display: flex; flex-direction: column;
  border: 1px solid rgba(168, 85, 247, .22); background: rgba(13, 9, 25, .84);
  overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s;
}

.game-card:hover { transform: translateY(-5px); border-color: var(--purple); box-shadow: 0 15px 35px rgba(0, 0, 0, .35); }
.thumb { height: 150px; overflow: hidden; position: relative; background: #090711; }

.game-thumbnail {
  width: 100%; height: 100%; display: block; object-fit: cover; image-rendering: auto;
  transition: transform .25s ease, filter .25s ease;
}

.game-card:hover .game-thumbnail { transform: scale(1.05); filter: brightness(1.15); }

.favorite {
  position: absolute; right: 8px; top: 8px; width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, .15); background: rgba(0, 0, 0, .5);
  color: #9d93a9; cursor: pointer; font-size: 18px;
}

.favorite.active { color: #ffda4f; }
.card-body { padding: 14px; display: flex; flex: 1; flex-direction: column; }
.card-body h4 { margin: 0 0 7px; font-size: 15px; }
.meta { color: var(--muted); font-size: 10px; margin-bottom: 12px; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 13px; }
.tag { font-size: 8px; padding: 3px 6px; border: 1px solid rgba(56, 217, 255, .18); color: #8aaab5; }

.play {
  margin-top: auto; width: 100%; padding: 10px; border: 1px solid var(--purple);
  background: rgba(168, 85, 247, .1); color: white; font: inherit; font-size: 10px;
  cursor: pointer; letter-spacing: 2px;
}

.play:hover { background: var(--purple); }
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty div { font-size: 50px; } .empty h3 { color: white; }
.hidden { display: none !important; }
footer { display: flex; justify-content: space-between; width: min(1400px, 90%); margin: 80px auto 25px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 9px; color: #625a70; letter-spacing: 2px; }

@media(max-width: 800px) {
  .site-header { padding: 15px 5%; align-items: flex-start; } .brand h1 { font-size: 17px; }
  nav { display: none; } .hero { grid-template-columns: 1fr; padding: 55px 0 35px; min-height: auto; }
  .hero h2 { font-size: 54px; } .search-panel { padding: 18px; }
}

@media(prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   GHOST V1 - MASKING MODAL SYSTEM INTEGRATION
   ========================================================================== */

/* High-priority floating window backdrop overlay overlay wrapper setup */
.panic-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: rgba(7, 5, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 999999;
}

/* Settings configuration container layout elements styling mapping row */
.panic-modal-content {
  background-color: #0c081d;
  border: 1px solid var(--purple);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.35);
  padding: 25px;
  border-radius: 0; /* Monospace block terminal tech style structure choice */
  width: min(400px, 95%);
  max-height: 85vh;
  overflow-y: auto;
  color: var(--text);
}

.panic-modal-content h3 {
  margin-top: 0;
  color: var(--purple);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.panic-form-group {
  margin-bottom: 16px;
}

.panic-form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.panic-form-group input[type="text"],
.panic-form-group input[type="url"] {
  width: 100%;
  padding: 12px;
  background: #090711;
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: white;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.panic-form-group input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* Interactive key rebound node style adjustments */
.panic-key-display {
  background: #090711;
  padding: 12px;
  text-align: center;
  border: 1px dashed var(--purple);
  cursor: pointer;
  font-weight: bold;
  color: var(--purple);
  font-size: 12px;
  transition: all 0.2s;
}

.panic-key-display:hover {
  background: rgba(168, 85, 247, 0.08);
  color: white;
}

.preset-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.cloak-preset-btn {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  transition: .2s;
}

.cloak-preset-btn:hover {
  color: white;
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.1);
}

.divider-top {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

/* Launch History Masking Custom Green Accent */
.launch-blank-action {
  width: 100%;
  padding: 12px;
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid #16a34a;
  color: #4ade80;
  font: inherit;
  font-weight: bold;
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: .2s;
}

.launch-blank-action:hover {
  background: #16a34a;
  color: white;
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.3);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  cursor: pointer;
  font-size: 10px;
  color: var(--muted);
  text-transform: none !important;
  letter-spacing: 0.5px;
}

.checkbox-container input {
  margin: 0;
  accent-color: var(--purple);
  cursor: pointer;
}

.panic-actions {
  text-align: right;
  margin-top: 20px;
}

.panic-actions button {
  padding: 10px 16px;
  margin-left: 6px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  text-transform: uppercase;
  transition: .2s;
}

.btn-save {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid var(--purple);
  color: white;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.btn-save:hover {
  background: var(--purple);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.btn-cancel:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

/* Scrollbar customizations for modal inner box scrolling layout */
.panic-modal-content::-webkit-scrollbar { width: 4px; }
.panic-modal-content::-webkit-scrollbar-track { background: #090711; }
.panic-modal-content::-webkit-scrollbar-thumb { background: var(--line); }
.panic-modal-content::-webkit-scrollbar-thumb:hover { background: var(--purple); }
/* Embedded Ghost Browser */
.browser-view { width: min(1400px,90%); margin: 36px auto 0; }
.browser-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:22px; }
.browser-heading h2 { margin:8px 0; font-size:clamp(28px,4vw,48px); letter-spacing:2px; }
.browser-heading h2 span { color:var(--purple); }
.browser-heading p,.browser-note { color:var(--muted); font-size:12px; line-height:1.7; }
.browser-status { color:var(--cyan); border:1px solid var(--line); padding:9px 12px; font-size:10px; }
.browser-toolbar { display:flex; gap:9px; flex-wrap:wrap; margin-bottom:12px; }
.browser-toolbar button,.browser-toolbar a { background:var(--panel); color:var(--text); border:1px solid var(--line); padding:12px 15px; font:inherit; font-size:11px; text-decoration:none; cursor:pointer; }
.browser-toolbar button:hover,.browser-toolbar a:hover { border-color:var(--purple); color:var(--cyan); }
.browser-frame-wrap { height:min(78vh,850px); min-height:440px; background:#080510; border:1px solid var(--line); box-shadow:0 12px 50px #0008; }
.browser-frame-wrap iframe { width:100%; height:100%; border:0; display:block; background:#080510; }
.browser-frame-wrap:fullscreen { width:100vw; height:100vh; border:0; }
.browser-note a { color:var(--cyan); }
@media(max-width:800px) { nav { display:flex; flex-wrap:wrap; justify-content:flex-end; } .site-header { gap:12px; flex-wrap:wrap; } .nav-btn { padding:9px; font-size:9px; } .browser-frame-wrap { min-height:420px; } }
