:root {
  --bg: #0d0b1a;
  --bg-soft: #16132b;
  --purple: #a855f7;
  --blue: #38bdf8;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --border: #2a2547;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.screen {
  min-height: 100vh;
  width: 100%;
}

/* ---------- INTRO ---------- */

.intro {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  background: radial-gradient(circle at 50% 30%, #1c1740 0%, var(--bg) 65%);
}

.press-start {
  position: relative;
  z-index: 2;
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  color: var(--text);
  background: rgba(168, 85, 247, 0.08);
  border: 2px solid var(--purple);
  padding: 34px 68px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  animation: pulseGlow 2.2s ease-in-out infinite;
}

.press-start:hover {
  background: rgba(168, 85, 247, 0.18);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
  transform: scale(1.10);
}

.press-start:active {
  transform: scale(0.96);
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.45), 0 0 0px rgba(56, 189, 248, 0.0);
    border-color: var(--purple);
  }
  50% {
    box-shadow: 0 0 0 18px rgba(168, 85, 247, 0), 0 0 22px rgba(56, 189, 248, 0.35);
    border-color: var(--blue);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0), 0 0 0px rgba(56, 189, 248, 0.0);
    border-color: var(--purple);
  }
}

.grid-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  z-index: 1;
}

/* ---------- MAIN ---------- */

.main {
  padding: 64px 24px 80px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(13, 11, 26, 0.50), rgba(13, 11, 26, 0.70)),
    url("images/bg-main.jpg") center / cover no-repeat;
}

.main-header {
  margin-bottom: 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-start;
}

.brand-logo {
  height: 100px;
  width: auto;
}

.main-slogan {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--text);
  font-style: italic;
  text-shadow:
    0 0 6px rgba(168, 85, 247, 0.6),
    0 0 14px rgba(56, 189, 248, 0.35);
}

.sparkle {
  display: inline-block;
  animation: twinkle 2.4s ease-in-out infinite;
}

@keyframes twinkle {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  7% {
    opacity: 1;
    transform: scale(1.3);
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.9));
  }
  15%, 100% {
    opacity: 0;
    transform: scale(0.6);
  }
}

.main-tagline {
  color: var(--text-dim);
  font-size: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.game-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.game-card:not(.soon):hover {
  border-color: var(--purple);
  transform: scale(1.05);
}

.card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0818;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.game-card:not(.soon):hover .card-image img {
  transform: scale(1.08);
}

.card-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.6rem;
  color: var(--border);
}

.card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag {
  display: inline-block;
  width: fit-content;
  font-size: 0.75rem;
  color: var(--blue);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.game-card h3 {
  font-size: 1.3rem;
}

.card-link {
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-link:hover {
  text-decoration: underline;
}

.card-link.disabled {
  color: var(--text-dim);
  pointer-events: none;
}

.game-card.soon {
  opacity: 0.7;
}

/* ---------- RESPONSIVE / MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
  .press-start {
    animation: none;
  }
}

@media (max-width: 480px) {
  .press-start {
    padding: 16px 28px;
    font-size: 0.8rem;
  }
}

.fade-out {
  animation: fadeOutScreen 3.3s ease forwards;
}

.fade-in {
  animation: fadeInScreen 0.6s ease forwards;
}

@keyframes fadeOutScreen {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeInScreen {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quick-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}

.quick-view.hidden {
  display: none;
}

.quick-view-panel {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 90%;
  max-width: 380px;
  text-align: center;
}

.qv-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
}

#qvTitle {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

#qvText {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.qv-more-btn {
  display: inline-block;
  color: var(--text);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--purple);
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.qv-more-btn:hover {
  background: rgba(168, 85, 247, 0.22);
}

.brand-row {
  position: relative;
  margin-bottom: 20px;
}

.brand {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-start;
  padding: 0;
}

.main-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  min-width: 220px;
  z-index: 30;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.main-menu.hidden {
  display: none;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.menu-item:hover {
  background: rgba(168, 85, 247, 0.12);
}

.menu-arrow {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.submenu {
  padding-left: 10px;
}

.submenu.hidden {
  display: none;
}

.submenu-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.submenu-item:hover {
  background: rgba(56, 189, 248, 0.12);
  color: var(--text);
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar.hidden {
  display: none;
}

.filter-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid var(--purple);
  padding: 5px 10px;
  border-radius: 999px;
}

.filter-pill button {
  background: none;
  border: none;
  color: var(--purple);
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
}

.clear-filters-btn {
  font-size: 0.8rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.clear-filters-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.game-card.filtered-out {
  display: none;
}

.about-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.back-btn {
  align-self: flex-start;
  margin-left: calc(50% - 310px);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--purple);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.back-btn:hover {
  background: rgba(168, 85, 247, 0.22);
  transform: translateX(-3px);
}

.about-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.about-page-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.about-page-text {
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 20px;
}

.about-page-subtitle {
  margin-bottom: 12px;
  font-weight: 600;
}

.about-page-list {
  list-style: none;
  margin-bottom: 24px;
}

.about-page-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  line-height: 1.8;
  padding: 4px 0;
}

.about-icon {
  display: inline-block;
  width: 60px;
  flex-shrink: 0;
  text-align: center;
  white-space: nowrap;
  font-size: 1.1rem;
}

.about-page-credit {
  font-size: 0.8rem;
  color: #555;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}

@media (max-width: 680px) {
  .back-btn {
    margin-left: 0;
  }
}

