@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1A1A1A;
  background: #F6F4F0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  min-height: 100vh;
}

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Header */
.site-header {
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.site-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: #1A1A1A;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.tagline {
  font-size: 1.05rem;
  color: #8A8580;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Game Grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.game-card {
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  animation: cardReveal 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }

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

.game-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

.game-card a {
  display: block;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
}

.game-thumb {
  width: 56px;
  height: 56px;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #F6F4F0;
}

.game-thumb svg {
  width: 28px;
  height: 28px;
}

.game-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 0.35rem;
  color: #1A1A1A;
  letter-spacing: -0.02em;
}

.game-card p {
  color: #8A8580;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Game Page Layout */
.game-container {
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
  padding: 0.5rem;
  margin: 0.5rem 0;
}

.game-frame {
  width: 100%;
  height: 750px;
  border: none;
  border-radius: 16px;
  background: #FAFAF8;
}

.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.game-controls h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #1A1A1A;
}

.btn {
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: #B4654A;
  color: #FFFFFF;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn:hover {
  background: #9A533A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(180, 101, 74, 0.25);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Ad Containers */
.ad-container {
  margin: 2rem 0;
  text-align: center;
  min-height: 90px;
  background: #EDEAE6;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A8A39D;
  font-size: 0.85rem;
  font-weight: 500;
}

.ad-top { min-height: 90px; }
.ad-middle { min-height: 250px; }
.ad-sidebar { min-height: 600px; }

/* Related Games */
.related-games {
  margin: 2.5rem 0;
}

.related-games h3 {
  text-align: center;
  margin-bottom: 1.25rem;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #8A8580;
}

/* Home Link */
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #8A8580;
  text-decoration: none;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.home-link:hover {
  color: #B4654A;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  margin-top: 3rem;
  border-top: 1px solid #E5E2DE;
  color: #A8A39D;
  font-size: 0.85rem;
  font-weight: 500;
}

.site-footer nav { margin-top: 0.75rem; }
.site-footer a {
  color: #8A8580;
  margin: 0 0.6rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: #B4654A;
}

/* Responsive */
@media (max-width: 768px) {
  body { padding: 1.25rem; }
  .site-header { padding: 2rem 1rem 1.5rem; }
  .site-header h1 { font-size: 2rem; }
  .game-frame { height: 600px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-controls { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .btn { width: 100%; text-align: center; }
}
