:root {
  --yellow: #ffd900;
  --yellow-soft: rgba(255, 217, 0, 0.8);
  --ink: #0a0800;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body { min-height: 100%; }

body {
  min-width: 280px;
  background: #000;
  color: #fff;
  font-family: "Rajdhani", Arial, sans-serif;
}

.hud-stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 10px 0;
  background: #050400 url("assets/background.png") center / cover no-repeat;
}

.hud-stage::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(18, 16, 10, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
    linear-gradient(90deg, rgba(255, 217, 0, 0.02), rgba(255, 217, 0, 0.01), rgba(255, 153, 0, 0.02));
  background-size: 100% 3px, 3px 100%;
}

.system-interface {
  position: relative;
  z-index: 2;
  width: min(90%, 400px);
  margin: auto;
  padding: 20px;
  text-align: center;
  background: var(--yellow);
  box-shadow: 0 0 30px rgba(255, 217, 0, 0.3);
  clip-path: polygon(0 30px, 30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
  animation: system-boot .8s cubic-bezier(.16, 1, .3, 1);
}

.system-interface::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  background: var(--ink);
  box-shadow: inset 0 0 15px rgba(255, 217, 0, .15);
  clip-path: inherit;
}

@keyframes system-boot {
  from { opacity: 0; transform: scale(1.1); filter: brightness(3); }
  to { opacity: 1; transform: scale(1); filter: brightness(1); }
}

.logo-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

.logo-shell img {
  display: block;
  width: min(245px, 76%);
  height: auto;
  object-fit: contain;
}

.banner-container {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 3px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 217, 0, .2);
  box-shadow: 0 0 20px rgba(0, 0, 0, .85), 0 0 16px rgba(216, 182, 31, .2);
  transition: transform .3s ease, box-shadow .3s ease;
}

.banner-container::before,
.banner-container::after {
  content: "";
  position: absolute;
  width: 150%;
  height: 150%;
  background: conic-gradient(transparent, transparent, transparent, #f2b233);
  animation: rotate-glow 4s linear infinite;
}

.banner-container::after {
  background: conic-gradient(transparent, transparent, transparent, #ffd82a);
  animation-delay: -2s;
}

@keyframes rotate-glow { to { transform: rotate(360deg); } }

.banner-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(216, 182, 31, .38), 0 0 28px rgba(242, 178, 51, .28);
}

.banner-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
}

.banner-content img { width: 100%; height: 100%; object-fit: cover; display: block; }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
}

.energy-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 45px;
  padding: 3px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 217, 0, .2);
  box-shadow: 0 0 15px rgba(0, 0, 0, .8), 0 0 10px rgba(216, 182, 31, .3);
  transition: transform .2s ease;
}

.energy-button:hover { transform: translateY(-1px); }

.energy-button::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  top: 50%; left: 50%;
  background: conic-gradient(from 0deg, transparent 0 30%, rgba(200, 200, 0, .5) 40%, #c8c800 50%, transparent 50% 80%, rgba(200, 170, 0, .5) 90%, #c8b400 100%);
  animation: rotate-energy 4s linear infinite;
}

@keyframes rotate-energy {
  from { transform: translate(-50%, -50%) rotate(0); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.energy-button span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: #050400;
}

.data-frame { position: relative; width: 100%; margin-bottom: 5px; padding: 4px; }

.data-frame::before,
.data-frame::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  animation: clickframe 1s linear infinite;
}

.data-frame::before { top: -4px; right: -4px; border-top: 2px solid var(--yellow); border-right: 2px solid var(--yellow); }
.data-frame::after { bottom: -4px; left: -4px; border-bottom: 2px solid var(--yellow); border-left: 2px solid var(--yellow); }

@keyframes clickframe { 50% { opacity: 0; } }

.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }

.game-item {
  display: block;
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(255, 217, 0, .3);
  border-radius: 10px;
  background: linear-gradient(to bottom, #1a1500, #000);
  color: #fff;
  text-decoration: none;
}

.game-item img { display: block; width: 100%; height: auto; border-radius: 10px; }
.game-item span { display: block; margin-top: 10px; overflow: hidden; font-size: 10px; font-weight: 700; line-height: 1; }

.legal-link {
  display: inline-block;
  margin: 15px 0 3px;
  color: #ffd700;
  font-size: clamp(9px, 2.5vw, 12px);
  font-weight: 800;
  letter-spacing: 2px;
  text-decoration: none;
}

.legal-link:hover { color: #fff2a8; }

@media (max-height: 760px) and (min-width: 500px) {
  .system-interface { width: 350px; padding: 14px 18px; }
  .logo-shell { margin-bottom: 6px; }
  .logo-shell img { width: 195px; }
  .btn-group { gap: 8px; margin: 8px 0; }
  .energy-button { height: 38px; }
  .legal-link { margin-top: 8px; }
}

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