/* ============================================================
   AI HUB LANDING PAGE — games/ai/ai.css
   Covers the /ai overview page: hero, explainer, game cards.
   Uses main.css (base/header/footer) + nav.css (nav styles).
   ============================================================ */

body { background: #fff; color: #2a2a2a; }

/* ===== HERO ===== */
@keyframes ai-drift { from { transform: translate(0,0); } to { transform: translate(30px,30px); } }
@keyframes ai-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ai-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.ai-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 64px;
  text-align: center;
  background: linear-gradient(160deg, #f8faf2 0%, #edf2e0 60%, #e2ecd0 100%);
  border-bottom: 1px solid #dde8c8;
}
.ai-hero::before {
  content: '';
  position: absolute;
  inset: -56px;
  background-image: radial-gradient(circle, rgba(98,181,23,0.13) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  animation: ai-drift 22s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.ai-hero-badge {
  display: inline-block;
  background: rgba(209,219,36,0.25);
  border: 1px solid #d1db24;
  color: #4a8c11;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  animation: ai-fade-up 0.4s ease both;
}
.ai-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 900;
  line-height: 1.1;
  color: #2a2a2a;
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  animation: ai-fade-up 0.45s 0.1s ease both;
}
.ai-hero-accent {
  color: #62b517;
  position: relative;
}
.ai-hero-accent::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 4px;
  background: #d1db24;
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  animation: ai-underline 0.4s 0.5s ease forwards;
}
.ai-hero-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: #555;
  max-width: 560px;
  margin: 0 auto 8px;
  line-height: 1.55;
  position: relative;
  z-index: 1;
  animation: ai-fade-up 0.45s 0.2s ease both;
}
.ai-hero-sub2 {
  font-size: 13px;
  color: #888;
  max-width: 460px;
  margin: 0 auto 40px;
  position: relative;
  z-index: 1;
  animation: ai-fade-up 0.45s 0.28s ease both;
}
.ai-hero-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
  z-index: 1;
  animation: ai-fade-up 0.45s 0.34s ease both;
}
.ai-hero-icon-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ai-hero-icon-block span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #62b517;
}
.ai-hero-divider {
  font-size: 22px;
  color: #ccc;
  font-weight: 300;
  margin-bottom: 16px;
}

/* ===== EXPLAINER SECTION ===== */
.ai-explainer {
  background: #fff;
  border-bottom: 1px solid #dde8c8;
  padding: 52px 24px;
}
.ai-main {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}
.ai-explainer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.ai-explainer-block {
  background: #fafdf2;
  border: 1.5px solid #dde8c8;
  border-radius: 14px;
  padding: 28px 28px 24px;
}
.ai-explainer-block-icon {
  width: 44px;
  height: 44px;
  background: #f4fae8;
  border: 1.5px solid #a8c96a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.ai-explainer-block-icon svg { width: 26px; height: 26px; display: block; }
.ai-explainer-block h2 {
  font-size: 18px;
  font-weight: 900;
  color: #2a3a10;
  margin-bottom: 10px;
  line-height: 1.2;
}
.ai-explainer-block p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}
.ai-explainer-block p strong { color: #2a3a10; }
.ai-explainer-block p em { color: #4a8c11; font-style: italic; }

/* Section label (small uppercase eyebrow) */
.ai-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #62b517;
  border-left: 4px solid #62b517;
  padding-left: 10px;
  margin-bottom: 8px;
}
.ai-section-title {
  font-size: 26px;
  font-weight: 900;
  color: #2a3a10;
  margin-bottom: 8px;
}
.ai-section-title em { font-style: normal; color: #62b517; }
.ai-section-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 640px;
}

/* ===== GAME CARDS SECTION ===== */
.ai-games {
  background: #f4fae8;
  border-bottom: 1px solid #dde8c8;
  padding: 52px 24px 56px;
}
.ai-game-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.ai-game-card {
  background: #fff;
  border-radius: 16px;
  border: 2px solid #dde8c8;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.18s, box-shadow 0.18s;
}
.ai-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* Card header band (colored top strip) */
.ai-game-card-header {
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
}
.ai-game-card-header::before {
  content: '';
  position: absolute;
  inset: -40px;
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}
.ai-game-card--nn .ai-game-card-header {
  background: linear-gradient(160deg, #f0fae4 0%, #e8f4d8 100%);
  border-bottom: 1px solid #dde8c8;
}
.ai-game-card--nn .ai-game-card-header::before {
  background-image: radial-gradient(circle, rgba(98,181,23,0.12) 1.5px, transparent 1.5px);
}
.ai-game-card--knn .ai-game-card-header {
  background: linear-gradient(160deg, #0a1f00 0%, #06120a 100%);
  border-bottom: 1px solid rgba(98,181,23,0.3);
}
.ai-game-card--knn .ai-game-card-header::before {
  background-image: radial-gradient(circle, rgba(98,181,23,0.15) 1.5px, transparent 1.5px);
}

.ai-game-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 14px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.ai-game-card--nn .ai-game-card-tag {
  background: rgba(98,181,23,0.15);
  border: 1px solid rgba(98,181,23,0.4);
  color: #4a8c11;
}
.ai-game-card--knn .ai-game-card-tag {
  background: rgba(98,181,23,0.18);
  border: 1px solid rgba(98,181,23,0.5);
  color: #a8c96a;
}

.ai-game-card-visual {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  position: relative;
  z-index: 1;
}
.ai-game-card-visual svg { width: 100%; height: 100%; display: block; }

.ai-game-card-name {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  text-align: center;
}
.ai-game-card--nn .ai-game-card-name { color: #2a3a10; }
.ai-game-card--knn .ai-game-card-name { color: #fff; }

.ai-game-card-tagline {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  position: relative;
  z-index: 1;
}
.ai-game-card--nn .ai-game-card-tagline { color: #62b517; }
.ai-game-card--knn .ai-game-card-tagline { color: #d1db24; }

/* Card body */
.ai-game-card-body {
  padding: 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-game-card-desc {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
}

/* Learning pills */
.ai-game-card-learns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-game-card-learn-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
}
.ai-game-card--nn .ai-game-card-learn-pill {
  background: #f4fae8;
  border: 1px solid #a8c96a;
  color: #4a8c11;
}
.ai-game-card--knn .ai-game-card-learn-pill {
  background: rgba(98,181,23,0.08);
  border: 1px solid rgba(98,181,23,0.25);
  color: #62b517;
}

/* Meta row: players, time */
.ai-game-card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ai-game-card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}
.ai-game-card--nn .ai-game-card-meta-item { color: #4a8c11; }
.ai-game-card--knn .ai-game-card-meta-item { color: #62b517; }

/* Card actions */
.ai-game-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.ai-game-card-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  padding: 11px 20px;
  border-radius: 9px;
  text-decoration: none;
  transition: all 0.15s;
  flex: 1;
  justify-content: center;
}
.ai-game-card--nn .ai-game-card-play {
  background: #62b517;
  color: #fff;
  box-shadow: 0 4px 14px rgba(98,181,23,0.28);
}
.ai-game-card--nn .ai-game-card-play:hover {
  background: #4a8c11;
  box-shadow: 0 6px 18px rgba(98,181,23,0.4);
}
.ai-game-card--knn .ai-game-card-play {
  background: #62b517;
  color: #fff;
  box-shadow: 0 4px 14px rgba(98,181,23,0.3);
}
.ai-game-card--knn .ai-game-card-play:hover {
  background: #4a8c11;
  box-shadow: 0 6px 18px rgba(98,181,23,0.45);
}
.ai-game-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  padding: 11px 16px;
  border-radius: 9px;
  text-decoration: none;
  border: 2px solid;
  transition: all 0.15s;
}
.ai-game-card--nn .ai-game-card-more {
  border-color: #a8c96a;
  color: #4a8c11;
}
.ai-game-card--nn .ai-game-card-more:hover {
  background: #f4fae8;
  border-color: #62b517;
}
.ai-game-card--knn .ai-game-card-more {
  border-color: rgba(98,181,23,0.4);
  color: #62b517;
}
.ai-game-card--knn .ai-game-card-more:hover {
  background: rgba(98,181,23,0.06);
  border-color: #62b517;
}

/* ===== TOGETHER SECTION ===== */
.ai-together {
  background: #2a3a10;
  padding: 52px 24px;
  text-align: center;
}
.ai-together h2 {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}
.ai-together h2 em { font-style: normal; color: #d1db24; }
.ai-together p {
  font-size: 14px;
  color: #a8c96a;
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.ai-together-chips {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.ai-together-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #e8f4d8;
}
.ai-together-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #d1db24;
  color: #2a3a10;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s;
  box-shadow: 0 4px 16px rgba(209,219,36,0.3);
}
.ai-together-cta:hover {
  background: #c8d020;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(209,219,36,0.45);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  .ai-explainer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .ai-game-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .ai-hero { padding: 48px 20px 44px; }
  .ai-games, .ai-explainer { padding: 36px 16px; }
  .ai-game-card-body { padding: 20px 20px; }
  .ai-game-card-header { padding: 24px 20px 20px; }
}
