/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(150deg, #E8EAF0 0%, #EDEEF3 50%, #E5E7EF 100%);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1F2937;
  position: relative;
  overflow-x: hidden;
}

/* ============================================================
   DECORATIVE BACKGROUND WAVES (SVG)
   ============================================================ */
.bg-waves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   TOP-RIGHT CORNER BADGES (outside main card)
   ============================================================ */
.top-badges {
  position: fixed;
  top: 22px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 200;
}

.badge-mr {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #818CF8);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.badge-year {
  padding: 5px 14px;
  border-radius: 16px;
  border: 1px solid #D1D5DB;
  background: #fff;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
  white-space: nowrap;
}

.badge-dollar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #D1D5DB;
  background: #fff;
  font-size: 15px;
  color: #374151;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   MAIN WHITE CARD
   ============================================================ */
.main-card {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 56px auto 48px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  padding: 28px 32px 0;
}

/* ============================================================
   PILL NAVIGATION
   ============================================================ */
.pill-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  position: relative;
}

.pill-nav {
  display: inline-flex;
  align-items: center;
  background: #F3F4F6;
  border-radius: 25px;
  height: 44px;
  padding: 4px;
  gap: 2px;
}

.pill-nav a {
  text-decoration: none;
  padding: 7px 20px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  color: #6B7280;
  transition: color 0.2s;
  white-space: nowrap;
  line-height: 1;
}

.pill-nav a.active {
  background: #fff;
  color: #3B82F6;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.10);
  font-weight: 600;
}

.pill-nav a:hover:not(.active) {
  color: #374151;
}

.search-icon {
  border: none;
  background: none;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.search-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-avatar {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 61fr 39fr;
  gap: 16px;
  margin-bottom: 30px;
}

/* ---- Shared hero card styles ---- */
.hero-card {
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  height: 440px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ---- Hero image area (upper 75%) ---- */
.hero-img {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  min-height: 0;
}

.hero-card-left .hero-img {
  background: linear-gradient(140deg, #0a0a2e 0%, #1a1a4e 45%, #2d1b69 100%);
}

.hero-img-right {
  background: linear-gradient(140deg, #1E3A5F 0%, #4C1D95 55%, #7C3AED 100%);
  cursor: default;
}

/* ============================================================
   CSS COREBALL GAME ANIMATION (left hero card)
   ============================================================ */
.game-preview {
  position: relative;
  width: 190px;
  height: 190px;
  flex-shrink: 0;
}

.core-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #93C5FD, #3B82F6, #1D4ED8);
  box-shadow:
    0 0 24px rgba(59, 130, 246, 0.7),
    0 0 50px rgba(59, 130, 246, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  z-index: 2;
}

.orbit {
  position: absolute;
  top: 0;
  left: 0;
  width: 190px;
  height: 190px;
  animation: orbitSpin 5s linear infinite;
  z-index: 1;
}

/* Orbit balls */
.ob {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #E0E7FF);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 2px rgba(255, 255, 255, 0.9);
}

/* Orbit lines */
.ol {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.5px;
  height: 76px;
  margin-top: -76px;
  margin-left: -0.75px;
  background: linear-gradient(to top, rgba(255,255,255,0.08), rgba(255,255,255,0.55));
  transform-origin: bottom center;
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============================================================
   COMING SOON ANIMATION (right hero card)
   ============================================================ */
.coming-preview {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  animation: cpPulse 3s ease-in-out infinite;
}

.cp-ring-1 {
  width: 160px;
  height: 160px;
  animation-delay: 0s;
  border-color: rgba(192, 132, 252, 0.3);
}

.cp-ring-2 {
  width: 110px;
  height: 110px;
  animation-delay: 0.5s;
  border-color: rgba(167, 139, 250, 0.4);
}

.cp-ring-3 {
  width: 65px;
  height: 65px;
  animation-delay: 1s;
  border-color: rgba(139, 92, 246, 0.6);
}

.cp-core {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #C084FC, #7C3AED);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.6);
}

@keyframes cpPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.06); opacity: 1; }
}

/* ============================================================
   PLAYING BADGE (top-left of hero-img)
   ============================================================ */
.playing-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: inline-block;
  margin-right: -7px;
  flex-shrink: 0;
}

.avatar-stack span:last-child {
  margin-right: 0;
}

.playing-label {
  background: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 5px 13px;
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 4px;
}

/* ============================================================
   HERO BOTTOM OVERLAY (info tags + title)
   ============================================================ */
.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.info-tag {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 11px;
  border-radius: 14px;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.info-tag .star {
  color: #FBBF24;
  font-size: 12px;
}

.hero-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.2px;
}

/* Right card h2 styled same as h1 for hero-title */
.hero-card-right .hero-title {
  font-size: 20px;
}

/* ============================================================
   APP BAR (bottom ~25% of hero card)
   ============================================================ */
.app-bar {
  height: 72px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 246, 250, 0.80);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.app-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.app-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a1a4e, #2563EB);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-text {
  overflow: hidden;
}

.app-name {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-desc {
  font-size: 12px;
  color: #9CA3AF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Play Now button */
.btn-play {
  height: 34px;
  min-width: 86px;
  padding: 0 18px;
  border-radius: 17px;
  border: none;
  background: rgba(59, 130, 246, 0.12);
  color: #3B82F6;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-play:hover {
  background: rgba(59, 130, 246, 0.22);
  transform: scale(1.02);
}

.btn-play:active {
  transform: scale(0.98);
}

/* Disabled button */
.btn-disabled {
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  background: rgba(0, 0, 0, 0.06);
  color: #9CA3AF;
  font-size: 13px;
  font-weight: 600;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   GAME IFRAME OVERLAY
   ============================================================ */
.game-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
}

.game-overlay.active {
  display: block;
}

.game-overlay iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.game-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 21;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s;
  line-height: 1;
}

.game-close-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* ============================================================
   TOP ARCADE GAMES (hidden - HTML ready)
   ============================================================ */
.top-arcade {
  display: none;
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1F2937;
}

.section-header a {
  font-size: 14px;
  color: #3B82F6;
  text-decoration: none;
  font-weight: 500;
}

.section-header a:hover {
  text-decoration: underline;
}

.arcade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.arcade-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.arcade-thumb {
  aspect-ratio: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arcade-emoji {
  font-size: 34px;
}

.arcade-thumb .rating-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #22C55E;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 10px;
}

.arcade-body {
  padding: 10px 12px 12px;
}

.arcade-body .name {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
}

.arcade-body .desc {
  font-size: 12px;
  color: #9CA3AF;
  margin: 2px 0 4px;
}

.arcade-body .free-tag {
  font-size: 11px;
  color: #3B82F6;
  font-weight: 600;
}

/* ============================================================
   SEO CONTENT AREA
   ============================================================ */
.seo-area {
  background: #F9FAFB;
  margin: 0 -32px;
  padding: 48px 32px;
}

.seo-section {
  margin-bottom: 52px;
}

.seo-section:last-child {
  margin-bottom: 0;
}

/* Section heading with icon */
.seo-h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

.seo-h2 svg {
  flex-shrink: 0;
}

/* ---- What Is Coreball (2-col) ---- */
.what-grid {
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 36px;
  align-items: center;
}

.what-text p {
  font-size: 15px;
  line-height: 1.75;
  color: #4B5563;
  margin-bottom: 14px;
}

.what-text p:last-child {
  margin-bottom: 0;
}

.howto-text {
  max-width: 740px;
}

.what-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.what-illustration svg {
  width: 100%;
  max-width: 260px;
  height: auto;
}

/* ---- Who Is Coreball For (2x2) ---- */
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.who-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.who-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.who-card svg {
  margin-bottom: 12px;
  display: block;
}

.who-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 7px;
}

.who-card p {
  font-size: 14px;
  color: #6B7280;
  line-height: 1.6;
}

/* ---- Coreball Features (3x2) ---- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feat-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.feat-card svg {
  margin: 0 auto 12px;
  display: block;
}

.feat-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 7px;
}

.feat-card p {
  font-size: 13px;
  color: #6B7280;
  line-height: 1.6;
}

/* ---- FAQ Accordion ---- */
.faq-list {
  max-width: 820px;
}

.faq-item {
  border-bottom: 1px solid #E5E7EB;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1F2937;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: #9CA3AF;
  font-weight: 300;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] > summary::after {
  content: '−';
}

.faq-answer {
  padding: 0 0 18px;
  font-size: 14px;
  color: #6B7280;
  line-height: 1.75;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #F3F4F6;
  margin: 0 -32px;
  padding: 22px 32px;
  text-align: center;
  font-size: 13px;
  color: #9CA3AF;
  border-radius: 0 0 24px 24px;
}

.site-footer p {
  margin-bottom: 4px;
}

.site-footer a {
  color: #6B7280;
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.2s;
}

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

.site-footer nav {
  margin-top: 6px;
}

/* ============================================================
   RESPONSIVE — TABLET (~900px)
   ============================================================ */
@media (max-width: 960px) {
  .main-card {
    margin: 20px 14px 32px;
    padding: 20px 20px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-card {
    height: 380px;
  }

  .hero-card-right {
    height: 300px;
  }

  .who-grid {
    grid-template-columns: 1fr;
  }

  .feat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .what-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .what-illustration {
    display: none;
  }

  .arcade-grid {
    grid-template-columns: 1fr 1fr;
  }

  .seo-area {
    margin: 0 -20px;
    padding: 36px 20px;
  }

  .site-footer {
    margin: 0 -20px;
  }

  .top-badges {
    display: none;
  }

  .nav-avatar {
    display: none;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (~600px)
   ============================================================ */
@media (max-width: 640px) {
  .main-card {
    margin: 10px 8px 24px;
    padding: 16px 16px 0;
  }

  .pill-nav a {
    padding: 6px 13px;
    font-size: 13px;
  }

  .hero-card {
    height: 340px;
  }

  .hero-card-right {
    height: 260px;
  }

  .hero-title {
    font-size: 18px;
  }

  .feat-grid {
    grid-template-columns: 1fr;
  }

  .seo-h2 {
    font-size: 20px;
  }

  .game-preview {
    width: 150px;
    height: 150px;
  }

  .seo-area {
    margin: 0 -16px;
    padding: 28px 16px;
  }

  .site-footer {
    margin: 0 -16px;
  }

  .arcade-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== GAME MODAL ===== */
.game-modal{
  display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;
  background:rgba(0,0,0,0.85);
  flex-direction:column;align-items:center;justify-content:center;
}
.game-modal.active{display:flex}
.game-modal-header{
  width:100%;max-width:100%;height:5vh;min-height:40px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 20px;background:#111;color:#fff;flex-shrink:0;
}
.game-modal-title{font-size:16px;font-weight:600;letter-spacing:1px}
.game-modal-close{
  width:36px;height:36px;border-radius:50%;border:none;
  background:rgba(255,255,255,0.15);color:#fff;font-size:20px;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background .2s;
}
.game-modal-close:hover{background:rgba(255,255,255,0.3)}
.game-modal-body{
  width:100%;height:90vh;position:relative;
}
.game-modal-body iframe{
  width:100%;height:100%;border:none;display:block;
}
