/* ===== GAME HUB — shared layout ===== */
/* Used by: games/cybersecurity/index.html, games/ai-neural-network/index.html
   Each page overrides .hero background and dark theming colors for its brand. */

/* ===== SHARED HERO SHELL ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 24px 56px;
  text-align: center;
  /* background set per-hub-page */
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* pattern set per-hub-page */
}
.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  animation: fade-up 0.4s ease both;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  animation: fade-up 0.45s 0.1s ease both;
}
.hero h1 .game-name {
  color: #62b517;
  position: relative;
}
.hero h1 .game-name::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 4px;
  background: #d1db24;
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  animation: underline-grow 0.4s 0.5s ease forwards;
}
.hero-subtitle {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 32px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
  position: relative;
  z-index: 1;
  animation: fade-up 0.45s 0.22s ease both;
}
.hero-visual {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  animation: fade-up 0.45s 0.3s ease both;
}
.hero-visual svg { width: 100%; height: 100%; display: block; }

/* ===== FEATURES STRIP ===== */
.features {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  background: #fff;
  border-bottom: 1px solid #dde8c8;
  padding: 0;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 32px;
  flex: 1;
  min-width: 160px;
  max-width: 280px;
  border-right: 1px solid #dde8c8;
  text-align: center;
}
.feature:last-child { border-right: none; }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f4fae8;
  border: 1px solid #a8c96a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { width: 100%; height: 100%; }
.feature h3 { font-size: 13px; font-weight: 800; color: #2a2a2a; letter-spacing: 0.3px; }
.feature p  { font-size: 12px; color: #666; line-height: 1.4; }

/* ===== CTA BUTTONS BAR ===== */
.cta-buttons-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 28px 24px;
  background: #fff;
  border-bottom: 1px solid #dde8c8;
  flex-wrap: wrap;
}
.btn-play-now {
  display: inline-block;
  background: #62b517;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  transition: background 0.15s, transform 0.15s;
}
.btn-play-now:hover { background: #4d8f12; transform: scale(1.02); }
.btn-buy-physical {
  display: inline-block;
  background: transparent;
  color: #4a8c11;
  text-decoration: none;
  text-align: center;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  border: 2px solid #d1db24;
  transition: all 0.15s;
}
.btn-buy-physical:hover { background: #f4fae8; border-color: #62b517; }

/* ===== GAME INFO BAR ===== */
.game-info-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  background: #f4fae8;
  border-bottom: 1px solid #dde8c8;
  padding: 0;
  flex-wrap: wrap;
}
.game-info-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 700;
  color: #4a4a4a;
  border-right: 1px solid #dde8c8;
}
.game-info-item:last-child { border-right: none; }
.game-info-item span { font-size: 16px; }

/* ===== MAIN LAYOUT ===== */
.main {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
}
.info-col { padding: 48px 0 52px; }
.info-col h2 {
  font-size: 26px;
  font-weight: 900;
  color: #2a2a2a;
  margin-bottom: 16px;
  line-height: 1.2;
}
.info-col h2 em { font-style: normal; color: #62b517; }
.info-col > p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 28px;
}
.learn-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #62b517;
  border-left: 4px solid #d1db24;
  padding-left: 10px;
  margin-bottom: 14px;
}
.concept-list { list-style: none; display: flex; flex-direction: column; margin-bottom: 28px; }
.concept-list li { display: block; padding: 0; }
.concept-card {
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 2px solid #a8c96a;
  background: #fff;
  box-shadow: 0 2px 8px rgba(98,181,23,0.1);
}
.concept-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.concept-card-top strong { font-size: 14px; font-weight: 900; color: #2a2a2a; }
.concept-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.concept-icon svg { width: 100%; height: 100%; }
.concept-explain { font-size: 13px; color: #555; line-height: 1.65; margin-bottom: 0 !important; }

/* ===== LEARNING SECTION (dark bg) ===== */
.learning-bg {
  background: #1a3a00 url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%2362b517' stroke-opacity='0.11' stroke-width='1.5' fill='none' stroke-linecap='round'%3E%3Cpolyline points='0,30 40,30 40,75'/%3E%3Ccircle cx='40' cy='30' r='3'/%3E%3Ccircle cx='40' cy='75' r='3'/%3E%3Cline x1='40' y1='75' x2='100' y2='75'/%3E%3Cline x1='70' y1='0' x2='70' y2='30'/%3E%3Ccircle cx='70' cy='30' r='2.5'/%3E%3Cline x1='70' y1='30' x2='100' y2='30'/%3E%3Cline x1='0' y1='55' x2='15' y2='55'/%3E%3Ccircle cx='15' cy='55' r='2.5'/%3E%3Cline x1='15' y1='55' x2='15' y2='100'/%3E%3C/g%3E%3C/svg%3E") repeat;
  background-size: 100px 100px;
}
.learning-bg .info-col h2 { color: #fff; }
.learning-bg .info-col h2 em { color: #a8c96a; }
.learning-bg .info-col > p { color: rgba(255,255,255,0.72); }
.learning-bg .learn-section-label { color: #a8c96a; border-left-color: #62b517; }
.learning-bg .concept-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(168,201,106,0.28);
  box-shadow: none;
}
.learning-bg .concept-card-top strong { color: #fff; }
.learning-bg .concept-explain { color: rgba(255,255,255,0.70); }
.learning-bg .concept-explain em { color: rgba(255,255,255,0.85); }

/* ===== CTA SIDEBAR CARD ===== */
.form-col {
  width: 380px;
  flex-shrink: 0;
  padding: 52px 0 52px 40px;
  border-left: 1px solid #dde8c8;
}
.cta-card {
  background: #fff;
  border-radius: 16px;
  border: 2px solid #a8c96a;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(98,181,23,0.18);
  position: sticky;
  top: 88px;
}
.cta-card-header {
  background: #d1db24;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cta-card-header h3 { font-size: 15px; font-weight: 900; color: #2a3a00; }
.cta-card-header .header-icon {
  width: 28px; height: 28px;
  background: rgba(42,58,0,0.15);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.cta-body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta-body p { font-size: 13px; color: #555; line-height: 1.6; text-align: center; }
.cta-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cta-divider::before, .cta-divider::after {
  content: ''; flex: 1; height: 1px; background: #e5e7eb;
}
.game-details {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.detail-item {
  font-size: 12px;
  font-weight: 700;
  color: #666;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== SIMPLE FOOTER (overrides main.css full footer for hub pages) ===== */
footer {
  background: #2a2a2a;
  padding: 12px 24px;
  text-align: center;
  font-size: 12px;
  color: #777;
}
footer a { color: #d1db24; text-decoration: none; font-weight: 700; }
footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
  .main { padding: 0 16px; }
  .feature { padding: 20px 16px; }
  .cta-buttons-bar { flex-direction: column; align-items: stretch; padding: 20px 16px; }
  .btn-play-now, .btn-buy-physical { text-align: center; }
}

/* ============================================================
   SHARED GAME LOBBY — byteclub, fuzznet, clusterflick
   Structure-only. Colors/backgrounds are set per game CSS.
   ============================================================ */

/* ===== SCREENS ===== */
.screen:not(.active) { display: none !important; }
.screen.active { display: flex; }
body.rejoin-pending .screen.active { visibility: hidden; }

/* ===== LOBBY WRAPPER ===== */
.lobby-container { width: 100%; max-width: 880px; display: flex; flex-direction: column; align-items: center; gap: 32px; padding: 36px 0 0; }

/* ===== HERO ===== */
.lobby-hero { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; width: 100%; }
.lobby-hero-text { display: flex; flex-direction: column; gap: 10px; }
.lobby-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.lobby-meta-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; }
.lobby-tutorial-cta { align-self: flex-start; padding: 12px 24px; font-size: 14px; font-weight: 700; border: none; border-radius: 10px; cursor: pointer; letter-spacing: 0.4px; transition: all 0.15s; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; margin-top: 4px; }
.lobby-tutorial-cta:hover { transform: translateY(-1px); }

/* ===== SECTION DIVIDERS ===== */
.lobby-section { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lobby-section-head { display: flex; align-items: center; gap: 12px; width: 100%; }
.lobby-section-head::before, .lobby-section-head::after { content: ''; flex: 1; height: 1px; }
.lobby-section-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2.5px; white-space: nowrap; }

/* ===== LEARNING OBJECTIVES STRIP ===== */
.lo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-radius: 12px; overflow: hidden; width: 100%; }
.lo-item { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 14px 22px; }
.lo-item:last-child { border-right: none; }
.lo-item-icon { width: 46px; height: 46px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; flex-shrink: 0; }
.lo-item-icon svg { width: 24px; height: 24px; }
.lo-item-title { font-size: 12px; font-weight: 800; margin-bottom: 5px; line-height: 1.3; }
.lo-item-desc { font-size: 11px; line-height: 1.5; }

/* ===== PLAY GRID ===== */
.lobby-play-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; }
.lobby-card { border-radius: 14px; padding: 24px; width: 100%; position: relative; transition: border-color 0.2s, box-shadow 0.2s; }
.lobby-card h3 { font-size: 13px; font-weight: 800; letter-spacing: 1px; margin-bottom: 4px; text-transform: uppercase; }
.lobby-card .card-desc { font-size: 12px; margin-bottom: 12px; }

/* ===== INVITED BANNER ===== */
@keyframes invitedArrow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.lobby-card.lobby-card-focus::before { content: 'YOU\'RE INVITED'; position: absolute; top: -11px; left: 18px; color: #fff; font-size: 10px; font-weight: 900; letter-spacing: 1.5px; padding: 3px 10px; border-radius: 4px; }
.lobby-card.lobby-card-dim { opacity: 0.4; filter: saturate(0.5); transition: opacity 0.2s, filter 0.2s; }
.lobby-card.lobby-card-dim:hover { opacity: 0.75; filter: saturate(0.8); }
.invited-banner { display: none; width: 100%; border-radius: 12px; padding: 14px 20px; align-items: center; gap: 14px; }
.invited-banner.show { display: flex; }
.invited-banner-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.invited-banner-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.invited-banner-title { font-size: 13px; font-weight: 800; letter-spacing: 0.2px; }
.invited-banner-sub { font-size: 12px; }
.invited-banner-code { font-family: monospace; font-weight: 900; letter-spacing: 2px; font-size: 14px; }
.invited-banner-arrow { font-size: 22px; font-weight: 900; animation: invitedArrow 1.6s ease-in-out infinite; }

/* ===== COLOR BUTTONS ===== */
.color-options { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.color-btn { width: 56px; height: 56px; border-radius: 12px; border: 3px solid transparent; cursor: pointer; font-size: 11px; font-weight: bold; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: all 0.15s; display: flex; align-items: center; justify-content: center; }
.color-btn:hover { transform: scale(1.08); }
.color-btn:disabled { opacity: 0.2; cursor: not-allowed; transform: none; }

/* ===== LOBBY BUTTONS ===== */
.lobby-btn { width: 100%; padding: 12px; font-size: 16px; border: none; border-radius: 8px; cursor: pointer; font-weight: 700; transition: all 0.15s; margin-top: 8px; font-family: inherit; }
.lobby-btn:hover:not(:disabled) { transform: scale(1.01); filter: brightness(1.05); }
.lobby-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== FORM INPUTS ===== */
.lobby-input { width: 100%; padding: 12px 16px; font-size: 20px; text-align: center; letter-spacing: 8px; text-transform: uppercase; border: 2px solid; border-radius: 8px; font-weight: bold; margin: 8px 0; font-family: inherit; }
.lobby-input::placeholder { letter-spacing: 2px; font-size: 14px; }
.lobby-input:focus { outline: none; }
.name-input { letter-spacing: normal; text-transform: none; font-size: 16px; }
.name-input::placeholder { letter-spacing: normal; font-size: 14px; }

/* ===== ROLE SELECTION ===== */
.role-section-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; }
.role-section-label::after { content: ''; flex: 1; height: 1px; }
.player-role-box { border: 2px solid; border-radius: 10px; padding: 10px 14px; cursor: pointer; transition: all 0.15s; margin-bottom: 8px; }
.observer-role-btn { width: 100%; padding: 11px 14px; border: 2px solid; border-radius: 10px; cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 10px; transition: all 0.15s; font-family: inherit; }
.observer-role-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.obs-role-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.obs-role-text { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.obs-role-title { font-size: 13px; font-weight: 700; }
.obs-role-sub { font-size: 10px; font-weight: 400; line-height: 1.3; }
.obs-role-check { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }

/* ===== OBSERVER EYE ICON ===== */
.obs-eye-icon { display: inline-block; width: 18px; height: 18px; vertical-align: middle; flex-shrink: 0; }
.obs-eye-icon.obs-eye-lg { width: 22px; height: 22px; }
.obs-eye-icon.obs-eye-xl { width: 26px; height: 26px; }
.obs-eye-icon.obs-eye-sm { width: 14px; height: 14px; }
@keyframes obs-eye-pulse { 0%,100% { filter: drop-shadow(0 0 4px rgba(34,211,238,0.4)); } 50% { filter: drop-shadow(0 0 8px rgba(34,211,238,0.85)); } }
.obs-eye-icon.obs-eye-pulse { animation: obs-eye-pulse 2.4s ease-in-out infinite; }

/* ===== OBSERVER BANNER ===== */
#observer-banner { display: none; position: fixed; top: 44px; left: 0; right: 0; z-index: 99; padding: 6px 16px; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
#observer-banner .obs-pill { border-radius: 20px; padding: 2px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: none; }

/* ===== WAITING ROOM OBSERVER LIST ===== */
.waiting-observer-section { width: 100%; max-width: 380px; margin-top: 8px; }
.waiting-observer-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.waiting-observer-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 8px; border: 1px solid; margin-bottom: 5px; }
.waiting-observer-row .obs-name { font-size: 14px; flex: 1; font-weight: 600; }
.obs-host-badge { font-size: 10px; font-weight: 700; }

/* ===== MISC ===== */
.rules-banner { font-size: 13px; border: 1px solid; border-radius: 8px; padding: 8px 14px; text-align: center; max-width: 360px; line-height: 1.5; }
.rules-banner a { font-weight: 600; }
.rules-banner a:hover { text-decoration: none; }
.error-msg { font-size: 13px; text-align: center; margin-top: 6px; min-height: 20px; }

/* ===== LOBBY RESPONSIVE ===== */
@media (max-width: 780px) {
  .lobby-hero { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .lobby-tutorial-cta { align-self: center; }
  .lobby-meta { justify-content: center; }
  .lobby-play-grid { grid-template-columns: 1fr; }
  .lo-strip { grid-template-columns: 1fr 1fr; }
  .lo-item:nth-child(2) { border-right: none; }
  .invited-banner-arrow { display: none; }
}
@media (max-width: 480px) {
  .lobby-container { gap: 24px; padding: 20px 0 0; }
  .lo-item { padding: 14px 8px 16px; }
  .lo-item-icon { width: 36px; height: 36px; }
  .lo-item-desc { display: none; }
}
