* {
  box-sizing: border-box;
  font-family: 'BabyDoll';
}

body {
  margin: 0;
  font-family: 'BabyDoll';
  background: #d8bfd8;
  color: #2f1231;
  min-height: 100vh;
  position: relative;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.7) 0, transparent 35%),
    radial-gradient(circle at bottom left, rgba(244, 154, 194, 0.45) 0, transparent 30%);
  opacity: 0.5;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1350px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 32px;
}

.left-panel {
  background: #e9cedd;
  border: 4px solid #2f1231;
  border-radius: 32px;
  box-shadow: 10px 10px 0 #2f1231;
  padding: 28px;
  height: fit-content;
  position: sticky;
  top: 24px;
}

.intro-top {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.intro-image-box {
  width: 140px;
  height: 140px;
  border: 4px solid #2f1231;
  border-radius: 24px;
  overflow: hidden;
  background: #f6d8e8;
  flex-shrink: 0;
}

.intro-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow,
.box-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  font-weight: 700;
  color: #7a365e;
}

.eyebrow {
  margin: 0 0 8px;
}

.intro-text h1 {
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 0.95;
}

.intro-copy {
  font-size: 19px;
  line-height: 1.6;
  margin: 0;
}

.description-box,
.preview-box {
  margin-top: 28px;
  border: 4px solid #2f1231;
  border-radius: 28px;
  background: #f4dce9;
  box-shadow: 6px 6px 0 #2f1231;
  padding: 20px;
}

.description-box p:last-child {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.6;
}

.preview-label-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  border: 4px solid #2f1231;
  border-radius: 999px;
  background: #f49ac2;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 4px 4px 0 #2f1231;
}

.preview-hint {
  font-size: 14px;
  color: #7a365e;
  font-weight: 600;
}

.preview-box h2 {
  margin: 8px 0 8px;
  font-size: 32px;
}

.preview-meta {
  margin: 0 0 14px;
  font-weight: 700;
  text-transform: capitalize;
}

.preview-text {
  margin: 0;
  line-height: 1.7;
  white-space: pre-line;
}

.right-panel {
  height: fit-content;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tag-btn {
  border: 4px solid #2f1231;
  border-radius: 999px;
  background: #b8a3d1;
  color: #2f1231;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 4px 4px 0 #2f1231;
  transition: transform 0.2s ease, background 0.2s ease;
  text-transform: lowercase;
}

.tag-btn:hover {
  transform: translateY(-2px);
}

.tag-btn.active-tag {
  background: #f49ac2;
  transform: translateY(-2px);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.game-card {
  border: 4px solid #2f1231;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 8px 8px 0 #2f1231;
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 0;
  margin: 0;
  height: 85%;
  background: #e9cedd;
  appearance: none;
  -webkit-appearance: none;
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card.active {
  outline: 4px solid #f49ac2;
  outline-offset: 2px;
}

.game-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  padding: 0;
  margin: 0;
  line-height: 0;
  background: transparent;
}

.game-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  padding: 0;
}

.game-card:hover .game-image {
  transform: scale(1.05);
}

.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(47, 18, 49, 0.72);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 16px;
  text-align: center;
}

.game-card:hover .game-overlay {
  opacity: 1;
}

.overlay-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.overlay-subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-info {
  background: #e9cedd;
  border-top: 4px solid #2f1231;
  padding: 14px 16px;
  min-height: 92px;
}

.game-info h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.15;
}

.game-info p {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #7a365e;
  text-transform: capitalize;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.hidden {
  display: none;
}
.popup-content::-webkit-scrollbar {
  width: 8px;
}

.popup-content::-webkit-scrollbar-thumb {
  background: #f49ac2;
  border-radius: 999px;
}
.popup-box {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  border: 4px solid #2f1231;
  border-radius: 32px;
  background: #f7e6ef;
  box-shadow: 12px 12px 0 #2f1231;
  padding: 0; /* important */

  overflow: hidden; /* clips corners */
}

.popup-content {
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 28px;
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 4px solid #2f1231;
  border-radius: 999px;
  background: #f49ac2;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 4px 4px 0 #2f1231;
}

.popup-header {
  padding-right: 100px;
}

.popup-header h2 {
  margin: 8px 0 8px;
  font-size: 42px;
  line-height: 1.1;
}

.popup-meta {
  margin: 0 0 20px;
  color: #7a365e;
  font-weight: 700;
  text-transform: capitalize;
}

.popup-image-wrap {
  border: 4px solid #2f1231;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
}

.popup-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.popup-text {
  font-size: 18px;
  line-height: 1.8;
  white-space: pre-line;
}

@media (max-width: 1000px) {
  .container {
    grid-template-columns: 1fr;
  }

  .left-panel {
    position: static;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .intro-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .intro-text h1 {
    font-size: 36px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .popup-header h2 {
    font-size: 32px;
  }

  .popup-image {
    height: 240px;
  }
}