:root {
  --bg: #050608;
  --bg-offset: #111111;
  --surface: rgba(18, 22, 31, 0.7);
  --surface-solid: #0d111a;
  --surface-elevated: #151b28;
  --text: #ffffff;
  --text-muted: #888888;
  --border: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(0, 210, 255, 0.45);
  --accent: #ff3300; 
  --orange: #ff8a00;
  --cyan: #00d2ff;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

input, textarea, select, button {
  font-family: inherit;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: clip; 
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: -1px;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* =========================================================
   AMBIENT STAGE
   ========================================================= */
.stage-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  filter: blur(45px) brightness(0.25) saturate(1.5);
  transform: scale(1.1);
  transition: opacity 0.4s var(--ease), background-image 0.1s var(--ease);
  z-index: -2;
  pointer-events: none;
}

.stage-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(5,6,8,0.2) 0%, rgba(5,6,8,0.94) 80%);
  z-index: -1;
  pointer-events: none;
}

/* =========================================================
   HEADER & RESPONSIVE BURGER MENU
   ========================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 26px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e1e9f5;
  padding: 0.75rem 1.35rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.header-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: translateY(-2px);
}

.header-nav-btn.support-btn {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.25);
  color: var(--cyan);
}

.header-nav-btn.support-btn:hover {
  background: rgba(0, 210, 255, 0.18);
  border-color: var(--cyan);
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
}

.header-cta {
  background: linear-gradient(135deg, var(--orange), #d97000);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 138, 0, 0.28);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 138, 0, 0.5);
}

/* =========================================================
   CAROUSEL HERO SECTION
   ========================================================= */
.hero-section {
  position: relative;
  width: 100%;
  height: 70vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 4rem 3rem;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000 0%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

.hero-blackout {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  margin-bottom: 1rem;
}

.carousel-controls {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 10;
  display: flex;
  gap: 0.6rem;
}

.carousel-arrow {
  background: rgba(5, 6, 8, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.25s ease;
}

.carousel-arrow:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: scale(1.05);
}

.carousel-dots {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 50%;
}

.dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot-indicator.active {
  width: 32px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

/* =========================================================
   GAME ARCHIVE CONTROLS & REPOSITORY GRID
   ========================================================= */
.game-area-controls {
  padding: 1.75rem 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: rgba(5, 6, 8, 0.65);
  scroll-margin-top: 80px;
}

.game-area-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.game-area-burger-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 99px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.game-area-burger-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--cyan);
}

.sort-control-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #9cb0cc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.sort-select {
  background: var(--surface-elevated);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  padding: 0.65rem 1.4rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.sort-select:focus, .sort-select:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

.filter-buttons-wrapper {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.65rem 1.35rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 99px;
  transition: all 0.25s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.repository-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 2rem;
  padding: 3rem;
}

.entry-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 560px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  position: relative;
  text-decoration: none;
}

.entry-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 210, 255, 0.15);
}

.entry-thumbnail {
  width: 100%;
  height: 220px;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-offset);
  position: relative;
}

.entry-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(13, 17, 26, 0.95) 100%);
}

.pill-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.entry-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.5px;
  text-transform: none;
  color: #fff;
}

.entry-subtitle {
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.entry-desc {
  color: #9cb0cc;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-primary {
  background: #fff;
  color: #000;
  padding: 0.8rem 1.6rem;
  font-weight: 700;
  text-transform: none;
  border: none;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--cyan);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.4);
}

/* =========================================================
   FORMS, IN-PAGE CONTACT & MODALS
   ========================================================= */
.standalone-modal-container {
  background: var(--surface-solid);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 980px;
  margin: 4rem auto 6rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95);
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.contact-section {
  margin: 3.5rem auto 5rem;
  scroll-margin-top: 100px;
}

.form-header {
  padding: 2.5rem 3rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.form-header h2 { font-size: 2rem; text-transform: none; }
.form-header p { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.3rem; }

.submission-form { 
  padding: 2rem 3rem; 
  display: flex; 
  flex-direction: column; 
  gap: 1.25rem; 
}

.form-row { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 1.25rem; 
}

.form-group { 
  display: flex; 
  flex-direction: column; 
  gap: 0.4rem; 
}

.form-group label { 
  font-size: 0.8rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  color: #9cb0cc; 
}

.form-control { 
  background: var(--surface-elevated); 
  border: 1px solid rgba(255, 255, 255, 0.12); 
  border-radius: var(--radius-sm); 
  color: #fff; 
  padding: 0.8rem 1rem; 
  font-size: 0.95rem; 
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

textarea.form-control {
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
}

.form-control:focus { 
  outline: none; 
  border-color: var(--cyan); 
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}

.dynamic-section-box { 
  background: rgba(0, 0, 0, 0.3); 
  border: 1px dashed rgba(255, 255, 255, 0.08); 
  border-radius: var(--radius-md); 
  padding: 1.25rem; 
  display: flex; 
  flex-direction: column; 
  gap: 1rem; 
}

.btn-submit-form { 
  background: linear-gradient(135deg, var(--orange), #d97000); 
  color: #fff; 
  border-radius: 99px; 
  font-weight: 700; 
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: 0.95rem 2rem; 
  border: none; 
  cursor: pointer; 
  transition: all 0.3s ease; 
  text-transform: uppercase;
}

.btn-submit-form:hover:not(:disabled) { 
  background: linear-gradient(135deg, #ff991a, #e67700); 
  box-shadow: 0 8px 25px rgba(255, 138, 0, 0.4); 
  transform: translateY(-2px); 
}

.btn-submit-form:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.info-modal-body { padding: 2.5rem 3rem; line-height: 1.7; color: #c0cde3; }
.info-modal-body h3 { color: #fff; font-size: 1.35rem; margin: 1.5rem 0 0.5rem; text-transform: none; }
.info-modal-body h3:first-child { margin-top: 0; }
.kofi-donation-card { background: linear-gradient(135deg, rgba(0, 210, 255, 0.05), rgba(255, 138, 0, 0.05)); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-md); padding: 1.75rem; margin-top: 2.25rem; }
.kofi-donation-card h4 { font-size: 1.15rem; color: #fff; margin-bottom: 0.5rem; text-transform: none; }
.kofi-embedded-frame-box { width: 100%; height: 650px; background: #0d111a; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-md); overflow: hidden; margin-top: 1rem; }
.kofi-embedded-frame-box iframe { width: 100%; height: 100%; border: none; }

/* =========================================================
   DYNAMIC GAME DETAILS PAGE
   ========================================================= */
.game-header { position: relative; width: 100%; height: 60vh; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 4rem 3rem; }
.game-header::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #000 0%, transparent 100%); z-index: 1; }
.game-title-container { position: relative; z-index: 2; }
.game-title { font-size: clamp(3rem, 7vw, 6rem); line-height: 0.9; margin-bottom: 0.5rem; }
.game-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; padding: 4rem 3rem; }
.media-main { width: 100%; aspect-ratio: 16/9; background: var(--bg-offset); border: 1px solid rgba(255, 255, 255, 0.15); margin-bottom: 1rem; border-radius: var(--radius-md); overflow: hidden; }
.media-main iframe, .media-main img, .media-main video { width: 100%; height: 100%; object-fit: contain; border: 0; }
.media-main a { display: block; width: 100%; height: 100%; }
.media-caption { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.75rem; overflow-wrap: anywhere; }
.media-strip { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 5px; }
.media-thumb { flex: 0 0 160px; width: 160px; position: relative; color: white; background-color: var(--bg-offset); aspect-ratio: 16/9; background-size: cover; background-position: center; border: 2px solid transparent; cursor: pointer; opacity: 0.6; border-radius: var(--radius-sm); }
.media-thumb:focus-visible, .media-thumb:hover, .media-thumb.active { opacity: 1; border-color: var(--cyan); }
.scorecard-container { border: 1px solid rgba(255, 255, 255, 0.15); padding: 2rem; background: var(--bg-offset); margin-top: 2rem; border-radius: var(--radius-md); }
.score-block-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid rgba(255, 255, 255, 0.15); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.score-overall { font-family: 'Space Grotesk', sans-serif; font-size: 3rem; font-weight: 800; line-height: 0.8; color: var(--cyan); }
.score-overall.faith { color: var(--orange); }
.rubric-item { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 0.75rem 0; font-size: 0.9rem; font-weight: 600; }

/* =========================================================
   PLATFORM BUTTONS
   ========================================================= */
.platform-links-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-solid);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  padding: 0.65rem 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.platform-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.platform-btn:hover {
  background: var(--text);
  color: #000;
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  position: relative;
  z-index: 10;
  background: #040507;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4.5rem 3% 2.5rem;
  margin-top: 4rem;
}

.footer-inner {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 35% 15% 15% 25%;
  justify-content: space-between;
  gap: 3%;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-top: 1.25rem;
  width: 90%;
}

.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a,
.footer-links button {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: inherit;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--cyan);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.25s var(--ease);
}

.social-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.35);
}

.footer-bottom {
  width: 100%;
  max-width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================================
   MEDIA QUERIES (RESPONSIVE BURGER MENUS & LAYOUTS)
   ========================================================= */
@media (max-width: 992px) { 
  .game-layout, .form-row { grid-template-columns: 1fr; } 
  .footer-inner { grid-template-columns: 47% 47%; gap: 6%; }
}

@media (max-width: 820px) {
  header {
    padding: 1rem 1.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .header-actions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(5, 6, 8, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 0.85rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
    display: none;
  }

  .header-actions.nav-open {
    display: flex;
  }

  .header-nav-btn, .header-cta {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.85rem;
  }

  .game-area-controls {
    padding: 1.25rem 1.5rem;
  }

  .game-area-burger-btn {
    display: inline-flex;
  }

  .game-area-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .sort-control-container {
    justify-content: space-between;
    width: 100%;
  }

  .sort-select {
    flex-grow: 1;
    max-width: 250px;
  }

  .filter-buttons-wrapper {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin-top: 0.5rem;
  }

  .filter-buttons-wrapper.active {
    display: flex;
  }

  .filter-buttons-wrapper .filter-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hero-section { height: auto; min-height: 55vh; padding: 4rem 1.5rem 6rem; align-items: center; text-align: center; justify-content: center; }
  .hero-title { font-size: 2.5rem; }
  .carousel-controls { top: auto; bottom: 1rem; right: 50%; transform: translateX(50%); }
  .carousel-dots { right: 0; left: 0; bottom: 4rem; max-width: 100%; justify-content: center; }
  
  .repository-grid { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.5rem; }
  .entry-card { height: auto; min-height: 500px; }
  
  .game-header { height: auto; min-height: 40vh; padding: 3rem 1.5rem; text-align: center; align-items: center; justify-content: center; }
  .game-title { font-size: 2.5rem; }
  .game-layout { padding: 2rem 1.5rem; gap: 2.5rem; }
  
  .standalone-modal-container { margin: 2rem auto; width: 94%; }
  .form-header, .submission-form, .info-modal-body { padding: 1.5rem; }
  
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand p { width: 100%; text-align: center; }
  .footer-links { align-items: center; text-align: center; }
  .footer-col h4 { text-align: center; }
  .social-links { justify-content: center; }
}

/* =========================================================
   CONTACT MODAL POPUP
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 7, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: none; /* Keeps modal off the page */
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: var(--surface-solid);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s var(--ease);
}

.modal-overlay.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-window .form-header {
  padding-right: 4.5rem;
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  z-index: 15;
  transition: all 0.2s var(--ease);
}

.modal-close-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: scale(1.08);
}
.game-layout > * { min-width: 0; }
.media-thumb .video-label { background: rgba(0,0,0,.8); padding: 4px 8px; border-radius: 4px; }
