/* =========================
   Reset
========================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* =========================
   Base
========================= */

body {
  background: #121212;
  color: #f5f5f5;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================
   Layout
========================= */

.container {
  width: 100%;
  max-width: 1200px;

  margin: 0 auto;
  padding: 24px;
}

/* =========================
   Typography
========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
}

.section-title {
  margin-bottom: 16px;
}

/* =========================
   Buttons
========================= */

button {
  border: none;
  border-radius: 10px;

  padding: 10px 16px;

  background: #3b82f6;
  color: white;

  cursor: pointer;

  font-size: 14px;
  font-weight: 600;

  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

button:hover {
  background: #2563eb;
}

button:active {
  transform: scale(0.98);
}

/* =========================
   Game List
========================= */

#gameList {
  list-style: none;

  margin: 0;
  padding: 0;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));

  gap: 16px;
}

#gameList li {
  margin: 0;
}

/* =========================
   Game Card
========================= */

.game-card {
  display: block;

  overflow: hidden;

  border: 1px solid #2a2a2a;
  border-radius: 14px;

  background: #1b1b1b;

  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #3b82f6;
}

.game-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;

  object-fit: cover;

  background: #2d2d2d;
}

.game-info {
  padding: 14px;
}

.game-info h3 {
  margin: 0 0 8px;

  font-size: 18px;
}

.game-info p {
  margin: 0;

  color: #bdbdbd;
  font-size: 14px;
  overflow: hidden;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;

  line-height: 1.5;
  min-height: calc(1.5em * 3);
}

/* =========================
   User Info
========================= */

.user-area {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 24px;
}

#userText {
  color: #cccccc;
}

/* =========================
   Mobile
========================= */

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  #gameList {
    grid-template-columns: 1fr;
  }

  .game-info h3 {
    font-size: 16px;
  }
}
