@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;600;700&display=swap");

:root {
  --background: #0d1020;
  --surface-light: #202644;
  --secondary: #22d3ee;
  --text: #f8fafc;
  --muted: #aab2ca;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  color: var(--text);
  font-family: "Comfortaa", sans-serif;

  background:
    radial-gradient(circle at top left, #25204f 0, transparent 35%),
    radial-gradient(circle at bottom right, #123d50 0, transparent 32%),
    var(--background);
}

.hidden {
  display: none !important;
}

/* =========================
   LOGIN SCREEN
   ========================= */

.login-screen {
  min-height: calc(100vh - 48px);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.login-box {
  width: min(480px, 100%);

  padding: 45px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      rgba(32, 38, 68, 0.95),
      rgba(13, 16, 32, 0.95)
    );

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 50px rgba(34, 211, 238, 0.08);

  text-align: center;
}

.login-icon {
  width: 90px;
  height: 90px;

  margin: 0 auto 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: rgba(34, 211, 238, 0.12);

  border: 2px solid rgba(34, 211, 238, 0.35);

  font-size: 42px;

  box-shadow:
    0 0 30px rgba(34, 211, 238, 0.15);
}

.login-box h1 {
  margin: 0 0 10px;

  font-size: 2.4rem;
  font-weight: 700;
}

.login-subtitle {
  margin: 0 0 35px;

  color: var(--muted);

  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;

  gap: 16px;

  text-align: left;
}

.input-label {
  color: var(--muted);

  font-size: 0.85rem;
  font-weight: 600;
}

.login-input {
  width: 100%;

  margin-top: 7px;

  padding: 16px 18px;

  color: var(--text);

  font-family: inherit;
  font-size: 1rem;

  border: 1px solid var(--border);
  border-radius: 12px;

  outline: none;

  background: rgba(0, 0, 0, 0.25);

  transition: 0.2s ease;
}

.login-input:focus {
  border-color: var(--secondary);

  box-shadow:
    0 0 0 3px rgba(34, 211, 238, 0.12);
}

.login-button {
  width: 100%;

  margin-top: 10px;

  padding: 17px;

  color: #061018;

  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;

  border: 0;
  border-radius: 12px;

  background: var(--secondary);

  cursor: pointer;

  transition: 0.2s ease;
}

.login-button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 10px 30px rgba(34, 211, 238, 0.25);
}

.login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-error {
  display: none;

  margin-top: 18px;
  padding: 13px;

  color: #ff6b6b;

  font-size: 0.9rem;
  font-weight: 700;

  text-align: center;

  border: 1px solid rgba(255, 80, 80, 0.25);
  border-radius: 10px;

  background: rgba(255, 0, 0, 0.08);
}

.login-error.show {
  display: block;
}

/* Login shake animation */

.shake {
  animation: shake 0.35s ease;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-8px);
  }

  50% {
    transform: translateX(8px);
  }

  75% {
    transform: translateX(-6px);
  }

  100% {
    transform: translateX(0);
  }
}

/* =========================
   GAME HUB
   ========================= */

.container {
  width: min(1100px, 100%);
  margin: auto;
}

.game-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(190px, 1fr));

  gap: 14px;
}

.game-button {
  min-height: 105px;

  padding: 18px;

  color: var(--text);

  text-align: left;

  font-family: inherit;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--surface-light);

  cursor: pointer;

  transition: 0.2s ease;
}

.game-button:hover,
.game-button.active {
  border-color: var(--secondary);

  transform: translateY(-4px);

  box-shadow:
    0 10px 25px rgba(34, 211, 238, 0.16);
}

.game-name {
  display: block;

  font-size: 1rem;

  font-weight: bold;
}

.embed-wrapper {
  margin-top: 24px;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: #080a13;
}

iframe {
  display: block;

  width: 100%;
  height: 600px;

  border: 0;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 600px) {
  body {
    padding: 16px;
  }

  .login-screen {
    min-height: calc(100vh - 32px);
  }

  .login-box {
    padding: 30px 22px;
  }

  .login-box h1 {
    font-size: 2rem;
  }

  iframe {
    height: 400px;
  }
}