/* ==========================================================================
   Apex Agency - Client Coming Soon Landing Page
   Multi-Game Arcade Hub (Including Original Super Mario, Tetris, Bomberman, etc.)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg-color: #ffffff;
  --text-dark: #1e293b;
  --text-body: #64748b;
  --accent-orange: #ff5733;
  --accent-blue: #38bdf8;
  --btn-blue: #38bdf8;
  --btn-blue-hover: #0284c7;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

html, body {
  min-height: 100vh;
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* Page Layout Wrapper */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* Background Soft Backdrop Shape */
.bg-shape {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 55vw;
  height: 120%;
  background: radial-gradient(circle at 60% 40%, rgba(254, 242, 242, 0.9), rgba(240, 249, 255, 0.7) 70%, transparent 100%);
  border-radius: 40% 0 0 60%;
  z-index: -1;
}

/* Header */
header {
  padding: 30px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0284c7, #ff5733);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.brand-name span {
  display: block;
  font-size: 0.72rem;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.agency-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

/* Main Content Split Layout */
main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 60px 8% 40px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

/* Left Content Area */
.left-content {
  max-width: 540px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-body);
  margin-bottom: 40px;
}

.client-name-tag {
  color: var(--text-dark);
  font-weight: 700;
}

/* Countdown Grid */
.countdown-container {
  display: flex;
  gap: 36px;
  margin-bottom: 44px;
}

.countdown-box {
  text-align: left;
}

.countdown-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-orange);
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}

.countdown-label {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Subscription Form Section */
.subscribe-section {
  margin-bottom: 40px;
}

.subscribe-label {
  font-size: 0.95rem;
  color: var(--text-body);
  margin-bottom: 14px;
  display: block;
}

.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
}

.subscribe-input {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 14px 24px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  transition: all 0.3s;
}

.subscribe-input:focus {
  background: #fff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.subscribe-btn {
  background: var(--btn-blue);
  color: #ffffff;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4);
  transition: all 0.3s ease;
}

.subscribe-btn:hover {
  background: var(--btn-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.6);
}

/* Social Icons */
.social-links {
  display: flex;
  gap: 14px;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: transform 0.3s;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.05);
}

.social-facebook { background-color: #3b5998; }
.social-twitter { background-color: #1da1f2; }
.social-linkedin { background-color: #0077b5; }
.social-youtube { background-color: #ff0000; }
.social-whatsapp { background-color: #25d366; }

/* Right Illustration Area */
.right-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.illustration-img {
  width: 100%;
  max-width: 580px;
  height: auto;
  border-radius: 24px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.08));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

/* ==========================================================================
   Multi-Game Arcade Hub Section (With Retro Console Emulators)
   ========================================================================== */
.game-section {
  padding: 60px 8% 80px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(240, 249, 255, 0.8) 100%);
  border-top: 1px dashed #cbd5e1;
}

.game-container {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.game-header h2 {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
}

.game-header p {
  color: var(--text-body);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

/* Game Selector Tab Navigation */
.game-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tab-btn.active {
  background: linear-gradient(135deg, #ff5733, #0284c7);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 87, 51, 0.35);
}

/* Game Wrapper Box */
.game-wrapper-box {
  position: relative;
  background: #0f172a;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  border: 4px solid #1e293b;
  min-height: 440px;
  display: flex;
  flex-direction: column;
}

/* Canvas Viewports */
canvas.game-canvas {
  display: block;
  width: 100%;
  height: 420px;
  background: #5c94fc; /* Mario Sky Blue */
}

/* Game HTML Container Viewports */
.html-game-view {
  width: 100%;
  height: 420px;
  background: #090d16;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.html-game-view.hidden {
  display: none;
}

/* 1. Whack-a-Bug Grid */
.bug-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 440px;
}

.bug-hole {
  aspect-ratio: 1;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.bug-target {
  font-size: 2.8rem;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  transition: top 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
}

.bug-hole.up .bug-target {
  top: 15%;
}

/* 2. Memory Match Grid */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.memory-card {
  height: 70px;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.3s;
  user-select: none;
}

.memory-card.flipped, .memory-card.matched {
  background: #0284c7;
  border-color: #38bdf8;
  transform: rotateY(180deg);
}

.memory-card.matched {
  background: #10b981;
  border-color: #34d399;
}

/* 3. Tic-Tac-Toe Grid */
.tictactoe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.ttt-cell {
  aspect-ratio: 1;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: background 0.2s;
  user-select: none;
}

.ttt-cell:hover {
  background: #334155;
}

/* Game Overlay Screen */
.game-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 20;
  padding: 20px;
}

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

.game-overlay h3 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ff5733, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-overlay p {
  font-size: 1.05rem;
  color: #94a3b8;
  margin-bottom: 24px;
  max-width: 540px;
}

.start-game-btn {
  background: linear-gradient(135deg, #ff5733, #f97316);
  color: #fff;
  border: none;
  padding: 14px 34px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 87, 51, 0.4);
  transition: all 0.3s;
}

.start-game-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 35px rgba(255, 87, 51, 0.7);
}

/* Score HUD */
.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
}

.hud-item span {
  color: #38bdf8;
  font-weight: 700;
}

/* Onscreen Controller / Keyboard Badges */
.controls-hint {
  margin-top: 14px;
  font-size: 0.88rem;
  color: #64748b;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.controls-hint kbd {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1e293b;
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .left-content {
    max-width: 100%;
    margin: 0 auto;
  }
  .countdown-container {
    justify-content: center;
  }
  .subscribe-form {
    margin: 0 auto;
  }
  .social-links {
    justify-content: center;
  }
  .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.4rem;
  }
  .countdown-container {
    gap: 20px;
  }
  .countdown-number {
    font-size: 2.5rem;
  }
  .subscribe-form {
    flex-direction: column;
  }
  .subscribe-btn {
    width: 100%;
  }
}
