/* KOF hub / splash — kid-friendly game picker */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: #fff;
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #0b1a2a;
  background-image:
    linear-gradient(rgba(8, 20, 36, 0.62), rgba(8, 20, 36, 0.78)),
    url("../assets/start-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.hub {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  padding-top: max(28px, env(safe-area-inset-top, 0px));
  padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand h1 {
  margin: 0 0 6px;
  font-size: clamp(2.2rem, 8vw, 3rem);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.brand .sub {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
}

.brand .site {
  margin: 0;
  font-size: 1.1rem;
  color: #8ec8ff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.brand .tagline {
  margin: 12px 0 0;
  font-size: 1.05rem;
  opacity: 0.92;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (min-width: 640px) {
  .games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 160px;
  padding: 16px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 28, 48, 0.72);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.game-card.live {
  border-color: #f4c430;
  background: linear-gradient(160deg, rgba(30, 70, 110, 0.85), rgba(12, 28, 48, 0.9));
  cursor: pointer;
}

.game-card.live:hover,
.game-card.live:focus-visible {
  transform: translateY(-3px) scale(1.02);
  border-color: #ffe082;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  outline: none;
}

.game-card.live:active {
  transform: translateY(0) scale(0.99);
}

.game-card.soon {
  opacity: 0.72;
  border-style: dashed;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.card-emoji {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.card-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
}

.card-desc {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0.9;
}

.card-badge {
  display: inline-block;
  margin-top: 12px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.game-card.live .card-badge {
  background: #f4c430;
  color: #1a1200;
}

.game-card.soon .card-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #c5d8ec;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-note {
  text-align: center;
  margin-top: 28px;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* Top-right Feedback button */
.hub-corner-btn {
  text-decoration: none;
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 50;
  padding: 10px 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(12, 28, 48, 0.85);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
}

.hub-corner-btn:hover,
.hub-corner-btn:focus-visible {
  background: rgba(30, 70, 110, 0.95);
  border-color: #ffe082;
  outline: none;
}

.hub-corner-btn:active {
  transform: scale(0.97);
}

/* Feedback modal */
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(4, 12, 24, 0.72);
  backdrop-filter: blur(4px);
}

.feedback-modal.hidden {
  display: none;
}

.feedback-panel {
  position: relative;
  width: min(420px, 100%);
  max-height: min(90vh, 640px);
  overflow-y: auto;
  padding: 22px 20px 20px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(160deg, rgba(30, 70, 110, 0.97), rgba(12, 28, 48, 0.98));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.feedback-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.feedback-close:hover,
.feedback-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.feedback-panel h2 {
  margin: 0 28px 8px 0;
  font-size: 1.35rem;
}

.feedback-hint {
  margin: 0 0 14px;
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.4;
}

.feedback-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#feedback-game,
#feedback-text {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}

#feedback-text {
  resize: vertical;
  min-height: 110px;
  line-height: 1.4;
}

#feedback-game:focus,
#feedback-text:focus {
  outline: none;
  border-color: #f4c430;
}

#feedback-text[aria-invalid="true"] {
  border-color: #ff8a80;
}

.feedback-actions {
  margin-top: 16px;
}

.feedback-submit {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: #f4c430;
  color: #1a1200;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.feedback-submit:hover,
.feedback-submit:focus-visible {
  background: #ffe082;
  outline: none;
}

.feedback-submit:active {
  transform: scale(0.99);
}

.feedback-thanks {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(76, 175, 80, 0.25);
  border: 1px solid rgba(129, 199, 132, 0.55);
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 600;
}

.feedback-thanks.hidden {
  display: none;
}
