/* copied from assets/styles.css */
/* =========================
   Base / Reset / Typography
   ========================= */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700&display=swap");

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: #ffffff;
  color: #000000;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =========================
   Background Decorations
   ========================= */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  background: #f5f5f5;
  border-radius: 50%;
  animation: float 20s infinite linear;
}

.shape:nth-child(1) {
  width: 100px;
  height: 100px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.shape:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: -8s;
  animation-duration: 30s;
}

.shape:nth-child(3) {
  width: 80px;
  height: 80px;
  top: 80%;
  left: 70%;
  animation-delay: -15s;
  animation-duration: 20s;
}

/* =============
   Animations
   ============= */
@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
    opacity: 0.3;
  }
  100% {
    transform: translateY(0px) rotate(360deg);
    opacity: 0.1;
  }
}

/* =========================
   Container / Layout
   ========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  position: relative;
  z-index: 1;
}

/* =========================
   Header
   ========================= */
.header {
  margin-bottom: 80px;
  text-align: center;
  opacity: 0;
  animation: slideInDown 1s ease-out 0.2s forwards;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 200;
  letter-spacing: -0.05em;
  margin-bottom: 16px;
  line-height: 0.9;
  background: linear-gradient(45deg, #000000, #737373);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShine 3s ease-in-out infinite;
}

@keyframes textShine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.header p {
  font-size: 1.125rem;
  color: #737373;
  font-weight: 300;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

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

/* =========================
   Controls (Filter / Counter)
   ========================= */
.controls {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.8s ease-out 0.8s forwards;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.controls::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.03),
    transparent
  );
  transition: left 0.6s ease;
}

.controls:hover::before {
  left: 100%;
}

.controls:hover {
  border-color: #d4d4d4;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

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

.controls-header {
  padding: 24px 32px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.controls-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #404040;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-counter {
  font-size: 0.875rem;
  color: #737373;
  font-weight: 400;
  transition: all 0.3s ease;
}

.game-counter.updating {
  transform: scale(1.1);
  color: #000000;
}

.filter-section {
  padding: 32px;
  border-bottom: 1px solid #e5e5e5;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #525252;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  background: #ffffff;
  border: 1px solid #d4d4d4;
  color: #404040;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.filter-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #000000;
  transition: left 0.3s ease;
  z-index: -1;
}

.filter-chip:hover {
  border-color: #a3a3a3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-chip:hover::before {
  left: 0;
}

.filter-chip:hover {
  color: #ffffff;
}

.filter-chip.active {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  transform: scale(1.05);
}

.filter-chip.active::before {
  left: 0;
}

.add-section {
  padding: 32px;
  text-align: center;
}

.minimal-btn {
  background: #000000;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.minimal-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: #ffffff;
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.minimal-btn:hover::before {
  width: 300px;
  height: 300px;
}

.minimal-btn:hover {
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.minimal-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* =========================
   Game List / Grid
   ========================= */
.games-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1px;
  background: #e5e5e5;
}

/* =========================
   Game Card (Item)
   ========================= */
.game-item {
  background: #ffffff;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  animation: staggerIn 0.6s ease-out forwards;
  transform-origin: center center;
  overflow: hidden;
}

.game-item:nth-child(1) {
  animation-delay: 1s;
}
.game-item:nth-child(2) {
  animation-delay: 1.2s;
}
.game-item:nth-child(3) {
  animation-delay: 1.4s;
}
.game-item:nth-child(4) {
  animation-delay: 1.6s;
}
.game-item:nth-child(5) {
  animation-delay: 1.8s;
}
.game-item:nth-child(6) {
  animation-delay: 2s;
}

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-item.hidden {
  display: none;
}

.game-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 0, 0, 0.03),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 1;
  pointer-events: none;
}

.game-item:hover::before {
  transform: translateX(100%);
}

.game-item:hover {
  background: #fafafa;
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  z-index: 5;
}

.game-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
  border-radius: 4px;
}

.game-item:hover .game-image {
  transform: scale(1.02);
}

.game-image-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #d4d4d4;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
  border-radius: 4px;
}

.game-item:hover .game-image-placeholder {
  background: linear-gradient(135deg, #e5e5e5, #d4d4d4);
  color: #a3a3a3;
}

.game-content {
  padding: 0 32px;
}

.item-header {
  padding: 24px 32px 0;
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.game-number {
  font-size: 3rem;
  font-weight: 200;
  color: #d4d4d4;
  line-height: 1;
  margin-right: 24px;
  min-width: 80px;
  transition: all 0.3s ease;
  transform-origin: center center;
}

.game-item:hover .game-number {
  color: #000000;
  transform: scale(1.05);
}

.game-header-content {
  flex: 1;
  min-width: 0;
}

.game-category-tag {
  background: #f5f5f5;
  color: #525252;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: inline-block;
  transition: all 0.3s ease;
  border-radius: 2px;
  transform-origin: left center;
}

.game-item:hover .game-category-tag {
  background: #000000;
  color: #ffffff;
  transform: translateX(3px);
}

.platform-tags {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.platform-chip {
  background: #eef2ff; /* distinct from category tag */
  color: #3730a3;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
  display: inline-block;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.game-item:hover .platform-chip {
  background: #e0e7ff;
  color: #312e81;
  transform: translateX(3px);
}

.game-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: all 0.3s ease;
  transform-origin: left center;
}

.game-item:hover .game-title {
  transform: translateX(3px);
}

.game-description {
  color: #525252;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  transform-origin: left center;
}

.game-item:hover .game-description {
  color: #404040;
  transform: translateX(3px);
}

.item-footer {
  padding: 24px 32px;
  border-top: 1px solid #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.launch-btn {
  background: transparent;
  border: 1px solid #d4d4d4;
  color: #404040;
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
  transform-origin: center center;
}

.launch-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #000000;
  transition: left 0.3s ease;
  z-index: -1;
}

.launch-btn:hover::before {
  left: 0;
}

.launch-btn:hover {
  color: #ffffff;
  border-color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.game-metadata {
  font-size: 0.8125rem;
  color: #a3a3a3;
  text-align: right;
  line-height: 1.4;
  transition: all 0.3s ease;
  transform-origin: right center;
}

.game-item:hover .game-metadata {
  color: #737373;
  transform: translateX(-3px);
}

/* =========================
   Empty State
   ========================= */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: #a3a3a3;
  font-size: 0.9375rem;
  opacity: 0;
  animation: fadeIn 0.5s ease-out 0.3s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  .container {
    padding: 40px 20px;
  }

  .games-layout {
    grid-template-columns: 1fr;
  }

  .item-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-number {
    margin-right: 0;
    margin-bottom: 16px;
    font-size: 2rem;
  }

  .game-description {
    padding: 0 24px;
  }

  .item-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .floating-shapes {
    display: none;
  }
}

/* =========================
   Reduced Motion
   ========================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-shapes {
    display: none;
  }
}
