/* ==========================================================================
   CREATIVE STORY GAMES - Games Hub Stylesheet
   High-energy glassmorphism & unified atmospheric radio aesthetic
   4-Game Roster · Balanced 2x2 Grid · Centered Bold Typography · No Icons
   ========================================================================== */

:root {
  --app-bg: #070A10;
  --app-navy-deep: #0B132B;
  --app-navy-mid: #1C2541;
  --app-navy-light: #3A506B;
  --cyan-primary: #38BDF8;
  --cyan-bright: #00F0FF;
  --cyan-glow: rgba(56, 189, 248, 0.35);
  --emerald-accent: #10B981;
  --amber-accent: #F59E0B;
  --fuchsia-accent: #D946EF;
  --violet-accent: #A855F7;
  --rose-accent: #F43F5E;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --font-display: 'Syne', system-ui, -apple-system, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--app-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Background Canvas & Cosmic Starfield
   ========================================================================== */
#ocean-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 80% 15%, rgba(147, 51, 234, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 20% 75%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    #070A10;
  overflow: hidden;
}

.cosmic-stars {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: url("https://images.unsplash.com/photo-1506703719100-a0f3a48c0f86?w=1920&q=80&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  mix-blend-mode: screen;
}

.cosmic-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Page Wrap & Master Layout
   ========================================================================== */
.page-wrap {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

main.main-content {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header Navigation (Exact Match to Main Radio Station Typography)
   ========================================================================== */
.games-header {
  position: relative;
  z-index: 40;
  width: 100%;
  padding: 0.65rem 1.5rem 0.5rem;
  background: rgba(7, 10, 16, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(58, 80, 107, 0.3);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
}

.btn-back-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(11, 19, 43, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #CBD5E1;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.btn-back-radio:hover {
  background: var(--app-navy-mid);
  border-color: var(--cyan-primary);
  color: #FFFFFF;
  transform: translateX(-2px);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3);
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.brand-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.brand-icon-box {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.55rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-primary);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FFFFFF !important;
  text-transform: uppercase;
  line-height: 1;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--cyan-primary) !important;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 600;
  opacity: 0.95;
}

.header-right {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  text-align: center;
  padding: 0.5rem 1rem 0.25rem;
  max-width: 48rem;
  margin: 0 auto;
  flex-shrink: 0;
}

.hero-meta-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan-primary);
  margin-bottom: 0.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  line-height: 1.15;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #00F0FF 0%, #38BDF8 50%, #818CF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  margin-top: 0.2rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Games Grid & High-Energy Glass Containers (No Icons · Centered Headings)
   ========================================================================== */
.games-container {
  width: 100%;
  margin: 0 auto;
}

.game-card {
  position: relative;
  background: rgba(11, 19, 43, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(58, 80, 107, 0.45);
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.75);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px -10px rgba(0, 0, 0, 0.85);
}

/* Ambient Radial Auras */
.card-ambient-aura {
  position: absolute;
  top: -3.5rem;
  right: -3.5rem;
  width: 10rem;
  height: 10rem;
  border-radius: 9999px;
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 0.16;
}

.game-card:hover .card-ambient-aura {
  opacity: 0.35;
}

/* Energy Color Themes */
.card-wave-rater {
  border-color: rgba(56, 189, 248, 0.55);
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.18) 0%, rgba(11, 19, 43, 0.88) 70%);
}
.card-wave-rater:hover {
  border-color: rgba(0, 240, 255, 0.85);
  box-shadow: 0 22px 48px -10px rgba(0, 0, 0, 0.85), 0 0 32px -4px rgba(56, 189, 248, 0.35);
}
.card-wave-rater .card-ambient-aura {
  background: radial-gradient(circle, var(--cyan-primary) 0%, transparent 70%);
}

.card-wave-hero {
  border-color: rgba(217, 70, 239, 0.45);
  background: radial-gradient(circle at 50% 0%, rgba(217, 70, 239, 0.18) 0%, rgba(11, 19, 43, 0.88) 70%);
}
.card-wave-hero:hover {
  border-color: rgba(217, 70, 239, 0.85);
  box-shadow: 0 22px 48px -10px rgba(0, 0, 0, 0.85), 0 0 32px -4px rgba(217, 70, 239, 0.3);
}
.card-wave-hero .card-ambient-aura {
  background: radial-gradient(circle, var(--fuchsia-accent) 0%, transparent 70%);
}

.card-beat-jam {
  border-color: rgba(16, 185, 129, 0.45);
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.18) 0%, rgba(11, 19, 43, 0.88) 70%);
}
.card-beat-jam:hover {
  border-color: rgba(16, 185, 129, 0.85);
  box-shadow: 0 22px 48px -10px rgba(0, 0, 0, 0.85), 0 0 32px -4px rgba(16, 185, 129, 0.3);
}
.card-beat-jam .card-ambient-aura {
  background: radial-gradient(circle, var(--emerald-accent) 0%, transparent 70%);
}

.card-star-maker {
  border-color: rgba(245, 158, 11, 0.45);
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.18) 0%, rgba(11, 19, 43, 0.88) 70%);
}
.card-star-maker:hover {
  border-color: rgba(245, 158, 11, 0.85);
  box-shadow: 0 22px 48px -10px rgba(0, 0, 0, 0.85), 0 0 32px -4px rgba(245, 158, 11, 0.3);
}
.card-star-maker .card-ambient-aura {
  background: radial-gradient(circle, var(--amber-accent) 0%, transparent 70%);
}

/* Card Kicker Row - Centered Status Badge */
.card-kicker-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  width: 100%;
}

.card-status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-live {
  color: var(--cyan-primary);
}

.status-live .live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: var(--cyan-bright);
  box-shadow: 0 0 8px var(--cyan-bright);
  animation: pulseNeonDot 1.8s infinite ease-in-out;
}

@keyframes pulseNeonDot {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.status-coming {
  color: var(--text-muted);
}

.status-coming .coming-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: var(--text-muted);
}

/* Card Typography - Centered, Large & Bold */
.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: #FFFFFF;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
  line-height: 1.15;
}

.card-desc {
  color: var(--text-secondary);
  text-align: center;
  display: block;
}

/* Action Buttons */
.btn-action-game {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  text-decoration: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-active-play {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
}

.btn-active-play:hover {
  background: linear-gradient(135deg, #00F0FF 0%, #38BDF8 100%);
  border-color: #00F0FF;
  color: #070A10;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.6);
}

.btn-coming-soon {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(58, 80, 107, 0.45);
  color: var(--text-muted);
}

.btn-coming-soon:hover {
  background: rgba(58, 80, 107, 0.5);
  color: #FFFFFF;
  border-color: rgba(56, 189, 248, 0.4);
}

/* ==========================================================================
   Unified Footer Bar (Exact Main Radio Page Layout)
   ========================================================================== */
.app-footer {
  position: relative;
  z-index: 30;
  width: 100%;
  padding: 0.55rem 1.5rem;
  padding-bottom: max(0.55rem, env(safe-area-inset-bottom, 14px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  background: rgba(7, 10, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(58, 80, 107, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #94A3B8;
  font-size: 0.6875rem;
  opacity: 0.95;
  white-space: nowrap;
}

.footer-copy-text {
  color: #94A3B8;
}

.footer-copy-divider {
  color: #475569;
}

.footer-partner-link {
  color: #CBD5E1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-partner-link:hover {
  color: var(--cyan-primary) !important;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.footer-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(11, 19, 43, 0.75);
  border: 1px solid rgba(58, 80, 107, 0.35);
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.footer-nav-pill:hover {
  background: var(--app-navy-mid);
  border-color: rgba(56, 189, 248, 0.55);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* ==========================================================================
   Submit Modal Styles
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  display: flex !important;
  opacity: 1;
}

.modal-card {
  position: relative;
  background: #0B132B;
  border: 1px solid rgba(58, 80, 107, 0.6);
  border-radius: 1.25rem;
  width: 100%;
  max-width: 36rem;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  animation: modalEnter 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 1px solid rgba(58, 80, 107, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-header-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-primary);
  flex-shrink: 0;
}

.modal-title-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
}

.modal-subtitle-text {
  font-size: 0.75rem;
  color: #94A3B8;
  margin-top: 2px;
}

.modal-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-modal-back {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 0.5rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cyan-primary);
  cursor: pointer;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  border-radius: 0.4rem;
}

.btn-close-modal:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  max-height: calc(88vh - 4.5rem);
}

.choice-cards-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(58, 80, 107, 0.45);
  color: #F1F5F9;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.choice-card:hover {
  transform: translateY(-2px);
}

.choice-card-ad:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.75);
}

.choice-card-music:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.75);
}

.choice-card-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.choice-card-ad .choice-card-icon-box {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan-primary);
}

.choice-card-music .choice-card-icon-box {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--rose-accent);
}

.choice-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
}

.choice-card-desc {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* Modal Forms */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #CBD5E1;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(58, 80, 107, 0.6);
  border-radius: 0.55rem;
  padding: 0.55rem 0.75rem;
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-family: inherit;
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--cyan-primary);
}

.field-hint {
  font-size: 0.6875rem;
  color: #64748B;
}

.legal-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(58, 80, 107, 0.4);
  border-radius: 0.65rem;
  padding: 0.75rem 0.85rem;
}

.legal-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.7rem;
  color: #94A3B8;
  line-height: 1.45;
}

.legal-checkbox-label input[type="checkbox"] {
  margin-top: 0.15rem;
  accent-color: var(--cyan-primary);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid rgba(58, 80, 107, 0.5);
  color: #94A3B8;
  padding: 0.55rem 1rem;
  border-radius: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-modal-submit {
  background: #0284C7;
  border: none;
  color: #FFFFFF;
  padding: 0.55rem 1.15rem;
  border-radius: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-submit:hover {
  background: var(--cyan-primary);
  color: #070A10;
}

.success-view {
  text-align: center;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon-box {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--emerald-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
}

.success-desc {
  font-size: 0.8125rem;
  color: #94A3B8;
  margin-top: 0.4rem;
  max-width: 22rem;
  line-height: 1.5;
}

/* Toast Notice */
.toast-notice {
  position: fixed;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(11, 19, 43, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  color: #FFFFFF;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-icon {
  color: var(--cyan-primary);
}

/* ==========================================================================
   1. DESKTOP COMPACT 2x2 GRID (>= 900px)
   Single-Frame Viewport Lock · Shorter Vertical Heights · Balanced Spacing
   ========================================================================== */
@media (min-width: 900px) {
  html, body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .page-wrap {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  main.main-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }

  .hero-section {
    padding: 0.5rem 1.25rem 0.25rem;
    max-width: 50rem;
    margin: 0 auto;
    text-align: center;
    flex-shrink: 0;
  }

  .hero-title {
    font-size: clamp(1.4rem, 2vw, 1.85rem);
    line-height: 1.15;
  }

  .hero-desc {
    font-size: 0.825rem;
    line-height: 1.4;
    max-width: 36rem;
    margin-top: 0.2rem;
  }

  /* Compact Desktop 2x2 Grid Container */
  .games-container {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem 0.75rem;
    max-width: 52rem;
    width: 100%;
    margin: 0 auto;
  }

  .games-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.35rem;
    width: 100%;
    height: auto;
    max-height: none;
  }

  /* Compact Desktop Card with Balanced Vertical Proportions */
  .game-card {
    padding: 1.1rem 1.35rem;
    border-radius: 1.15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    height: auto;
    min-height: auto;
  }

  .card-kicker-row {
    margin-bottom: 0.35rem;
    width: 100%;
    justify-content: center;
  }

  .card-status-indicator {
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Centered, Bold Game Titles */
  .card-title {
    font-size: clamp(1.35rem, 1.8vw, 1.65rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
    line-height: 1.15;
    text-align: center;
  }

  /* Streamlined 1-Sentence Descriptions */
  .card-desc {
    font-size: 0.84rem;
    line-height: 1.42;
    color: #CBD5E1;
    margin: 0 auto 0.75rem;
    max-width: 23rem;
    text-align: center;
  }

  /* Impactful Action Buttons with Balanced Height */
  .btn-action-game {
    padding: 0.65rem 1.25rem;
    border-radius: 0.8rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    min-height: 44px;
  }
}

/* ==========================================================================
   2. TABLET PORTRAIT 2-COLUMN VIEW (600px to 899px)
   Balanced Portrait Spacing · Ample Top Breathing Room · No Squishing
   Clean 2-Column Grid · Natural Graceful Flow · Guaranteed Footer Visibility
   ========================================================================== */
@media (min-width: 600px) and (max-width: 899px) {
  html, body {
    width: 100%;
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .page-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  main.main-content {
    flex: 1;
    width: 100%;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  /* Generous Top Padding & Margin for Portrait Tablets */
  .games-header {
    padding: max(0.95rem, env(safe-area-inset-top, 16px)) 1.75rem 0.95rem;
    margin-bottom: 0.5rem;
  }

  /* Ample Breathing Room in Hero Section */
  .hero-section {
    padding: 1.5rem 1.5rem 1.25rem;
    max-width: 44rem;
    margin: 0 auto;
  }

  .hero-meta-kicker {
    margin-bottom: 0.5rem;
  }

  .hero-title {
    font-size: clamp(1.5rem, 3.4vw, 1.95rem);
    line-height: 1.2;
    margin-bottom: 0.45rem;
  }

  .hero-desc {
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 32rem;
    margin-top: 0.35rem;
  }

  /* Clean 2-Column Grid on Tablet Portrait */
  .games-container {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    padding: 0.75rem 1.5rem 2.5rem;
    box-sizing: border-box;
  }

  .games-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.15rem;
    width: 100%;
    height: auto;
    max-height: none;
    box-sizing: border-box;
  }

  .game-card {
    padding: 1.25rem 1.35rem;
    border-radius: 1.15rem;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    box-sizing: border-box;
  }

  /* Centered Status Badge in Kicker Row */
  .card-kicker-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.45rem;
    width: 100%;
  }

  .card-status-indicator {
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .card-title {
    font-size: clamp(1.25rem, 2.6vw, 1.55rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
    line-height: 1.2;
    text-align: center;
  }

  .card-desc {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #CBD5E1;
    margin: 0 auto 0.85rem;
    max-width: 22rem;
    text-align: center;
  }

  .btn-action-game {
    padding: 0.65rem 1.15rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 800;
    min-height: 44px;
    width: 100%;
  }

  .app-footer {
    position: relative;
    z-index: 30;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem max(0.75rem, env(safe-area-inset-bottom, 12px));
    flex-shrink: 0;
  }
}

/* ==========================================================================
   3. MOBILE PORTRAIT 2-COLUMN VIEW (< 600px)
   Balanced Top Breathing Room (Safe Notch/Island Clearance)
   Balanced 2x2 Grid · Natural Scrolling · Guaranteed Footer Visibility
   Centered Titles & Badges · Generous Touch Targets
   ========================================================================== */
@media (max-width: 599px) {
  html, body {
    width: 100%;
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .page-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  main.main-content {
    flex: 1;
    width: 100%;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  /* Safe Area & Balanced Top Breathing Room on Mobile */
  .games-header {
    grid-template-columns: auto 1fr;
    padding: max(0.9rem, env(safe-area-inset-top, 14px)) 1rem 0.85rem;
    margin-bottom: 0.35rem;
  }

  .header-left {
    order: 1;
  }

  .header-center {
    order: 2;
    justify-content: flex-end;
  }

  .header-right {
    display: none;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.6rem;
  }

  /* Balanced Mobile Hero Section - No Squishing */
  .hero-section {
    padding: 1.35rem 1rem 1rem;
  }

  .hero-meta-kicker {
    margin-bottom: 0.45rem;
  }

  .hero-title {
    font-size: clamp(1.35rem, 5.2vw, 1.7rem);
    margin-bottom: 0.35rem;
  }

  .hero-desc {
    font-size: 0.8rem;
    line-height: 1.45;
    margin-top: 0.25rem;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* 2x2 Grid on Mobile */
  .games-container {
    width: 100%;
    padding: 0.45rem 0.75rem 2.5rem;
    box-sizing: border-box;
  }

  .games-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
  }

  .game-card {
    padding: 0.85rem 0.65rem;
    border-radius: 0.95rem;
    min-height: 195px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
  }

  .card-ambient-aura {
    display: none;
  }

  .card-kicker-row {
    margin-bottom: 0.35rem;
    justify-content: center;
    width: 100%;
  }

  .card-status-indicator {
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Centered, Larger & Bolder Mobile Titles */
  .card-title {
    font-size: clamp(0.95rem, 3.8vw, 1.2rem);
    font-weight: 800;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-align: center;
  }

  /* Clean Un-truncated 1-Sentence Description */
  .card-desc {
    font-size: 0.72rem;
    line-height: 1.38;
    margin: 0 auto 0.65rem;
    color: #CBD5E1;
    text-align: center;
  }

  /* Larger Impactful Buttons on Mobile */
  .btn-action-game {
    padding: 0.55rem 0.65rem;
    border-radius: 0.65rem;
    font-size: 0.8rem;
    font-weight: 800;
    min-height: 40px;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn-action-game svg {
    width: 14px;
    height: 14px;
  }

  /* Always visible Footer with natural flow */
  .app-footer {
    position: relative;
    z-index: 30;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 0.75rem 0.85rem max(0.75rem, env(safe-area-inset-bottom, 12px));
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .footer-copy {
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.65rem;
  }

  .footer-actions {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .footer-nav-pill {
    padding: 0.3rem 0.65rem;
    min-height: 34px;
    font-size: 0.7rem;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Extra small mobile screens (<= 375px) */
@media (max-width: 375px) {
  .games-grid {
    gap: 0.5rem;
  }

  .game-card {
    padding: 0.75rem 0.55rem;
    min-height: 185px;
  }

  .card-title {
    font-size: 0.88rem;
  }

  .card-desc {
    font-size: 0.68rem;
    line-height: 1.32;
  }

  .btn-action-game {
    font-size: 0.75rem;
    padding: 0.48rem 0.4rem;
  }
}
