/* Magdow — Dark WebGL template
   Modern game-site shell around the Unity game canvas. */

:root {
  --bg-0: #0a0e17;
  --bg-1: #0f1420;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f8;
  --text-muted: #9aa3b7;
  --text-faint: #6b7385;
  --accent: #5b8cff;
  --accent-2: #7c5bff;
  --accent-3: #29d0c9;
  --glow: 0 0 0 1px rgba(91, 140, 255, 0.25), 0 12px 40px rgba(91, 140, 255, 0.18);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient glow blobs behind everything */
#page::before,
#page::after {
  content: "";
  position: fixed;
  z-index: 0;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
  pointer-events: none;
}

#page::before {
  top: -20%;
  left: -15%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

#page::after {
  bottom: -25%;
  right: -15%;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
}

#page > * {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */

#site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(10, 14, 23, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

#site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

#site-header .brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

#site-header .brand span {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

#site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

#site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s ease;
}

#site-header nav a:hover {
  color: var(--text);
}

#site-header .version {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  #site-header nav {
    display: none;
  }
}

/* ---------- Hero strip ---------- */

#hero {
  text-align: center;
  padding: 40px 20px 8px;
}

#hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-3);
  background: rgba(41, 208, 201, 0.1);
  border: 1px solid rgba(41, 208, 201, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

#hero .badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 8px var(--accent-3);
}

#hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 0%, #b9c3ff 60%, #7c5bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#hero p {
  margin: 0 auto;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Main / game card ---------- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 16px;
  gap: 40px;
}

#game-card {
  position: relative;
  width: min(960px, 92vw);
  aspect-ratio: 960 / 600;
  background: #05070c;
  border-radius: var(--radius);
  box-shadow: var(--glow), var(--shadow);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

/* corner accent brackets for an arcade-frame feel */
#game-card::before,
#game-card::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--accent-3);
  border-style: solid;
  opacity: 0.9;
  z-index: 3;
  pointer-events: none;
}

#game-card::before {
  top: 10px;
  left: 10px;
  border-width: 2px 0 0 2px;
  border-radius: 6px 0 0 0;
}

#game-card::after {
  bottom: 10px;
  right: 10px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 6px 0;
}

#unity-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #05070c;
}

/* Fullscreen button, restyled as a floating icon button on the card */

#unity-fullscreen-button {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(10, 14, 23, 0.65);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(4px);
  background-image: url("fullscreen-button.png");
  background-size: 20px 20px;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  z-index: 4;
}

#unity-fullscreen-button:hover {
  background-color: rgba(91, 140, 255, 0.25);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Loading bar */

#unity-loading-bar {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background:
    radial-gradient(circle at 50% 40%, rgba(91, 140, 255, 0.12) 0%, transparent 60%),
    #05070c;
  z-index: 2;
}

#unity-logo {
  width: 68px;
  height: 68px;
  background: url("logo.png") no-repeat center;
  background-size: contain;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(91, 140, 255, 0.35);
}

#unity-progress-bar-empty {
  width: 60%;
  max-width: 280px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  border-radius: 3px;
  transition: width 0.2s ease;
}

/* Warning / error banner */

#unity-warning {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 5;
  text-align: center;
  font-size: 13px;
}

#unity-warning > div {
  margin: 8px auto;
  width: fit-content;
  border-radius: 8px;
}

/* ---------- Feature strip ---------- */

#features {
  width: min(960px, 92vw);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 780px) {
  #features {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.feature:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.feature img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.feature span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ---------- Info panels ---------- */

#info-panels {
  width: min(960px, 92vw);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  #info-panels {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-3);
}

.panel p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel ul li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}

.panel ul li img {
  width: 26px;
  height: 26px;
  flex: none;
}

/* ---------- Footer ---------- */

#site-footer {
  text-align: center;
  padding: 26px 16px 34px;
  font-size: 13px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

#site-footer strong {
  color: var(--text-muted);
}

/* ---------- Mobile: fill the screen with the game ---------- */

#page.unity-mobile #site-header nav,
#page.unity-mobile #hero,
#page.unity-mobile #features,
#page.unity-mobile #info-panels,
#page.unity-mobile #site-footer {
  display: none;
}

#page.unity-mobile main {
  padding: 0;
  gap: 0;
}

#page.unity-mobile #game-card {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  border: none;
}
