html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden; /* Prevent scrolling, app-like feel */
  background: radial-gradient(
    circle at center,
    var(--felt-green),
    var(--felt-dark)
  );
  font-family: "Rubik", sans-serif;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Background texture overlay (optional, adds depth) */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 2px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* =========================================
           3. LOGO SECTION
           ========================================= */
header {
  z-index: 10;
  text-align: center;
  margin-bottom: 40px;
}

.logo-wrapper {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 15px;
}

/* Reusing your tile style */
.logo-tile {
  width: 70px;
  height: 95px;
  font-size: 3rem;
  background: var(--tile-face);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Noto Sans SC", sans-serif;
  font-weight: 700;
  color: #b00; /* Traditional red ink color */

  /* The specific 3D shadow from your design */
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1), 1px 1px 0 var(--shadow-light),
    2px 2px 0 var(--shadow-light), 3px 3px 0 var(--shadow-light),
    4px 4px 0 var(--felt-dark), 8px 8px 15px rgba(0, 0, 0, 0.5);

  transform: rotateX(10deg);
  animation: float 3s ease-in-out infinite;
}

.logo-tile:nth-child(2) {
  animation-delay: 1.5s;
}
.logo-tile:nth-child(3) {
  animation-delay: 0.7s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotateX(10deg);
  }
  50% {
    transform: translateY(-10px) rotateX(10deg);
  }
}

/* =========================================
           4. GAMES SELECTION GRID
           ========================================= */
.games-grid {
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 800px;
  padding: 20px;
}

/* The Card Container */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
  cursor: pointer;
}

/* Hover Effect for active games */
.game-card:not(.disabled):hover {
  transform: translateY(-10px);
}
.game-card:not(.disabled):hover .tile-graphic {
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1), 1px 1px 0 var(--shadow-light),
    2px 2px 0 var(--shadow-light), 4px 4px 0 var(--shadow-light),
    6px 6px 0 var(--shadow-light), 8px 8px 0 var(--felt-dark),
    0 0 30px var(--neon-gold); /* Glow on hover */
}

/* The Big Tile Visual */
.tile-graphic {
  width: 120px;
  height: 160px;
  background: var(--tile-face);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 5rem;
  font-weight: 700;
  color: #b00;

  /* Deep 3D Shadow */
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1), 1px 1px 0 var(--shadow-light),
    2px 2px 0 var(--shadow-light), 3px 3px 0 var(--shadow-light),
    4px 4px 0 var(--shadow-light), 5px 5px 0 var(--shadow-light),
    6px 6px 0 var(--felt-dark), 15px 15px 30px rgba(0, 0, 0, 0.4);

  transform: rotateX(10deg);
  transition: all 0.2s ease;
  margin-bottom: 20px;
  position: relative;
}

/* Special colors for different games */
.tile-graphic.pinyin {
  color: #b00;
}
.tile-graphic.match {
  color: var(--felt-green);
}
.tile-graphic.cross {
  color: #00444d;
}
.tile-graphic.search {
  color: #ff4500;
}

/* Label Logic */
.game-info {
  text-align: center;
}

.game-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.game-status {
  display: inline-block;
  font-size: 0.75rem;
  font-family: "Roboto Mono", monospace;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: bold;
}

/* Status Variants */
.status-play {
  background: var(--neon-pink);
  color: white;
  box-shadow: 0 0 10px var(--neon-pink);
  animation: pulse-btn 2s infinite;
}

.status-dev {
  background: var(--neon-blue);
  color: #00444d;
}

.status-plan {
  background: rgba(255, 255, 255, 0.2);
  color: #aaa;
}

/* Disabled State (Future Games) */
.game-card.disabled {
  cursor: default;
  opacity: 0.6;
}
.game-card.disabled .tile-graphic {
  background: #e0e0e0;
  color: #999;
  box-shadow: 1px 1px 0 #bbb, 2px 2px 0 #bbb, 3px 3px 0 #888,
    5px 5px 10px rgba(0, 0, 0, 0.3);
  transform: rotateX(10deg) translateY(5px);
}

/* Pinyin decorative marks for the tile */
.tone-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1rem;
  color: #555;
  font-family: "Roboto Mono", monospace;
}

@keyframes pulse-btn {
  0% {
    box-shadow: 0 0 10px var(--neon-pink);
  }
  50% {
    box-shadow: 0 0 20px var(--neon-pink), 0 0 30px var(--neon-pink);
  }
  100% {
    box-shadow: 0 0 10px var(--neon-pink);
  }
}

/* =========================================
           5. RESPONSIVENESS
           ========================================= */
/* Tablet / Desktop Grid */
@media (min-width: 701px) {
  .games-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile */
@media (max-width: 700px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .tile-graphic {
    width: 100px;
    height: 130px;
    font-size: 4rem;
  }
  .logo-tile {
    width: 50px;
    height: 70px;
    font-size: 2rem;
  }
}

/* Small Mobile */
@media (max-width: 360px) {
  .tile-graphic {
    width: 80px;
    height: 110px;
    font-size: 3rem;
  }
}

footer {
  position: absolute;
  bottom: 20px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  z-index: 5;
}
