/* ==========================================================================
   dundilgame — Home / games catalog
   ========================================================================== */

:root {
  --text: #f5f3ff;
  --accent: #fbbf24;
  --radius: 28px;
  --topbar-h: 72px;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;

  /* same diffused background as the games themselves */
  background-color: #140f2b;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(239, 68, 68, 0.75) 0%, rgba(239, 68, 68, 0) 60%),
    radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.75) 0%, rgba(37, 99, 235, 0) 60%),
    radial-gradient(circle at 50% 100%, rgba(250, 204, 21, 0.65) 0%, rgba(250, 204, 21, 0) 65%);
  background-attachment: fixed;
}

/* ---------------------------------------------------------------------- */
/* Top bar                                                                 */
/* ---------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 10px 24px;
  background-color: #0c0c12;
  background-image:
    linear-gradient(rgba(8, 6, 16, 0.6), rgba(8, 6, 16, 0.6)),
    url("assets/textures/carbon-fiber.jpg");
  background-repeat: no-repeat, repeat;
  background-size: cover, 180px 135px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-link {
  display: block;
  line-height: 0;
  transition: opacity 0.15s ease;
}

.brand-link:hover {
  opacity: 0.85;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* ---------------------------------------------------------------------- */
/* Content                                                                 */
/* ---------------------------------------------------------------------- */

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px;
}

.game-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

/* ---------------------------------------------------------------------- */
/* Game card                                                               */
/* ---------------------------------------------------------------------- */

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 220px;
  height: 220px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  touch-action: manipulation;
  background-color: #140f2b;
}

/* Memory Match — diffused red/blue/yellow, matches the game's own brand */
.game-card--memory {
  background-image:
    radial-gradient(circle at 25% 20%, rgba(239, 68, 68, 0.85) 0%, rgba(239, 68, 68, 0) 55%),
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.85) 0%, rgba(37, 99, 235, 0) 55%),
    radial-gradient(circle at 50% 100%, rgba(250, 204, 21, 0.75) 0%, rgba(250, 204, 21, 0) 60%);
}

/* 4 en Raya — diffused red/yellow, the classic Connect-4 disc colours */
.game-card--connect4 {
  background-image:
    radial-gradient(circle at 22% 22%, rgba(220, 38, 38, 0.9) 0%, rgba(220, 38, 38, 0) 55%),
    radial-gradient(circle at 82% 18%, rgba(250, 204, 21, 0.9) 0%, rgba(250, 204, 21, 0) 55%),
    radial-gradient(circle at 50% 100%, rgba(30, 41, 59, 0.85) 0%, rgba(30, 41, 59, 0) 60%);
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-6px) scale(1.06) rotate(-1deg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.55);
}

.game-card:active {
  transform: translateY(-2px) scale(1.01);
}

.game-card-icon {
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.game-card-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------------- */
/* Small screens                                                           */
/* ---------------------------------------------------------------------- */

@media (max-width: 480px) {
  .content { padding: 40px 16px; }
  .game-card { width: 180px; height: 180px; }
  .game-card-icon { font-size: 52px; }
}
