/* ==========================================================================
   SUPER FOUR GAMES - DESIGN SYSTEM & ARCHITECTURE
   ========================================================================== */

/* Design Tokens & CSS Variables */
:root {
  --bg-primary: #0a0915;
  --bg-secondary: #121026;
  --bg-glass: rgba(18, 16, 38, 0.7);
  --bg-card: rgba(30, 27, 61, 0.45);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 94, 126, 0.4);

  /* Brand Theme Colors */
  --color-pink: #ff5e7e;
  --color-green: #a2d24b;
  --color-blue: #4fc3f7;
  --color-yellow: #ffd54f;
  --color-purple: #9c27b0;

  /* Text System */
  --text-main: #f5f5f9;
  --text-muted: #8e8ba8;
  --text-dark: #0a0915;

  /* Glow Effects */
  --glow-pink: 0 0 20px rgba(255, 94, 126, 0.35);
  --glow-green: 0 0 20px rgba(162, 210, 75, 0.35);
  --glow-blue: 0 0 20px rgba(79, 195, 247, 0.35);
  --glow-yellow: 0 0 20px rgba(255, 213, 79, 0.35);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);

  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Quicksand', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 94, 126, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(79, 195, 247, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  position: relative;
}

/* Colorful glowing floating blobs for kids-friendly style */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(255, 94, 126, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(79, 195, 247, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 75%, rgba(162, 210, 75, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(255, 213, 79, 0.1) 0%, transparent 40%);
  animation: bgPulse 25s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes bgPulse {
  0% {
    filter: hue-rotate(0deg) blur(5px);
    transform: scale(1);
  }

  100% {
    filter: hue-rotate(360deg) blur(15px);
    transform: scale(1.05);
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 5px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-pink);
}

/* Typography Rules */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

/* Helper Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-pink {
  color: var(--color-pink);
}

.text-green {
  color: var(--color-green);
}

.text-blue {
  color: var(--color-blue);
}

.text-yellow {
  color: var(--color-yellow);
}

.bg-pink-light {
  background: rgba(255, 94, 126, 0.1);
}

.bg-green-light {
  background: rgba(162, 210, 75, 0.1);
}

.bg-blue-light {
  background: rgba(79, 195, 247, 0.1);
}

.bg-yellow-light {
  background: rgba(255, 213, 79, 0.1);
}

.hidden {
  display: none !important;
}

.optional {
  font-size: 0.85em;
  color: var(--text-muted);
  font-weight: normal;
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-pink) 0%, #ff3b60 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 94, 126, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 94, 126, 0.5), var(--glow-pink);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--border-glass);
}

.btn-outline:hover {
  border-color: var(--color-pink);
  background: rgba(255, 94, 126, 0.05);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.9rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 30px;
}

/* Glow Borders */
.pink-glow:hover {
  border-color: var(--color-pink);
  box-shadow: var(--glow-pink);
}

.green-glow:hover {
  border-color: var(--color-green);
  box-shadow: var(--glow-green);
}

.blue-glow:hover {
  border-color: var(--color-blue);
  box-shadow: var(--glow-blue);
}

.yellow-glow:hover {
  border-color: var(--color-yellow);
  box-shadow: var(--glow-yellow);
}

/* Navigation Header styling */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(10, 9, 21, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
  transition: var(--transition-normal);
}

.main-header.scrolled {
  height: 70px;
  background: rgba(10, 9, 21, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  height: 60px;
  width: auto;
  transition: var(--transition-normal);
}

.main-header.scrolled .nav-logo {
  height: 52px;
}

.nav-menu ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--color-pink);
  background: rgba(255, 94, 126, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

/* Page Containers */
.content-container {
  max-width: 1200px;
  margin: calc(var(--header-height) + 40px) auto 60px;
  padding: 0 20px;
  min-height: calc(100vh - var(--header-height) - 300px);
}

.tab-content {
  animation: fadeIn var(--transition-slow);
}

.tab-content.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

/* Toast Messages */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  transform: translateY(0);
  transition: var(--transition-normal);
}

.toast.hidden {
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
}

.toast-success {
  border-left: 4px solid var(--color-green);
}

.toast-error {
  border-left: 4px solid var(--color-pink);
}

.toast-info {
  border-left: 4px solid var(--color-blue);
}

/* ==========================================================================
   HOME VIEW STYLING
   ========================================================================== */

/* Hero banner */
.hero-section {
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 40px 0;
}

.hero-content {
  flex: 1.2;
}

.badge {
  display: inline-block;
  background: rgba(255, 94, 126, 0.12);
  color: var(--color-pink);
  border: 1px solid rgba(255, 94, 126, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 35px;
}

.hero-ctas {
  display: flex;
  gap: 20px;
}

.hero-visual {
  flex: 0.8;
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  animation: float1 4s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(255, 94, 126, 0.3));
}

@keyframes float1 {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes float2 {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(12px);
  }
}

/* Features Grid */
.highlights-section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.section-title p {
  color: var(--text-muted);
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  transition: var(--transition-normal);
}

.highlight-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-pink);
  box-shadow: var(--glow-pink);
}

.card-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 25px;
}

.highlight-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.highlight-card p {
  color: var(--text-muted);
}

/* Stats Banner */
.stats-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 25px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 40px 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-green) 0%, var(--color-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
}

.stat-label {
  color: var(--text-muted);
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 60px;
  background: var(--border-glass);
}

/* Game Teasers Grid (Home Page Cover updates) */
.teaser-games-section {
  padding: 60px 0;
}

.teaser-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.teaser-card:hover {
  transform: translateY(-5px);
}

.teaser-cover-wrapper {
  height: 350px;
  width: 100%;
  overflow: hidden;
  background: rgba(10, 9, 21, 0.4);
  border-bottom: 1px solid var(--border-glass);
}

.teaser-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.teaser-card:hover .teaser-img {
  transform: scale(1.05);
}

.teaser-info {
  padding: 25px;
}

.teaser-info h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.teaser-info p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ==========================================================================
   GAMES VIEW STYLING & TOGGLE CHANGER
   ========================================================================== */

.arcade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 20px;
}

/* Segment Control filters (Pills) */
.arcade-filters {
  display: inline-flex;
  background: rgba(10, 9, 21, 0.6);
  border: 1px solid var(--border-glass);
  padding: 5px;
  border-radius: 30px;
  gap: 4px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 24px;
  border-radius: 25px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  outline: none;
}

.filter-btn.active {
  background: var(--color-pink);
  color: #fff;
  box-shadow: var(--glow-pink);
}

.filter-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.sound-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sound-btn:hover {
  border-color: var(--color-blue);
  box-shadow: var(--glow-blue);
}

.sound-btn.muted {
  color: var(--text-muted);
  border-color: var(--border-glass);
  box-shadow: none;
}

/* Grid toggle states */
.active-grid-view {
  display: grid !important;
}

/* Game Cards */
.arcade-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 25px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.arcade-card:hover {
  transform: translateY(-8px);
}

/* Reduce overall Y height for mobile game cards without affecting cover/mask size */
.mobile-card {
  padding: 15px;
}
.mobile-card .game-card-cover {
  margin-bottom: 10px;
}
.mobile-card .game-card-info p {
  margin-bottom: 10px;
}

.game-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 10px;
  z-index: 10;
}

.neon-pink {
  background: #250d15;
  color: var(--color-pink);
  border: 1px solid var(--color-pink);
}

.neon-green {
  background: #141c0a;
  color: var(--color-green);
  border: 1px solid var(--color-green);
}

.neon-blue {
  background: #0a1b24;
  color: var(--color-blue);
  border: 1px solid var(--color-blue);
}

.neon-yellow {
  background: #241f0a;
  color: var(--color-yellow);
  border: 1px solid var(--color-yellow);
}

.game-card-cover {
  width: 100%;
  height: 275px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  margin-bottom: 15px;
  background: rgba(5, 4, 10, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-card-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 0.5s ease;
}

.arcade-card:hover .game-card-cover img {
  transform: scale(1.18);
}

.game-card-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.game-card-c4 .game-card-icon {
  color: var(--color-pink);
}

.game-card-memory .game-card-icon {
  color: var(--color-green);
}

.game-card-snake .game-card-icon {
  color: var(--color-blue);
}

.game-card-ttt .game-card-icon {
  color: var(--color-yellow);
}

.game-card-info {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
}

.game-card-info h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.game-card-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
  line-height: 1.5;
}

.card-footer-action {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

.card-footer-action .btn {
  width: 100%;
}

/* Active Game Workspace Wrapper */
.active-game-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 30px;
  animation: fadeIn var(--transition-normal);
  max-width: 800px;
  margin: 0 auto;
}

.game-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-glass);
  gap: 15px;
}

.game-status-display {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-blue);
}

.game-settings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.game-settings select {
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
}

.scoreboard {
  display: flex;
  gap: 20px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
}

.player-score {
  padding: 6px 14px;
  border-radius: 15px;
  border: 1px solid var(--border-glass);
}

.red-score {
  background: rgba(255, 94, 126, 0.1);
  border-color: rgba(255, 94, 126, 0.3);
  color: var(--color-pink);
}

.yellow-score {
  background: rgba(255, 213, 79, 0.1);
  border-color: rgba(255, 213, 79, 0.3);
  color: var(--color-yellow);
}

.pink-score {
  background: rgba(255, 94, 126, 0.1);
  border-color: rgba(255, 94, 126, 0.3);
  color: var(--color-pink);
}

.blue-score {
  background: rgba(79, 195, 247, 0.1);
  border-color: rgba(79, 195, 247, 0.3);
  color: var(--color-blue);
}

.game-window {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   GAME 1 - CONNECT FOUR STYLING
   ========================================================================== */

.c4-board-wrapper {
  position: relative;
  background: #1a153b;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 4px 20px rgba(255, 255, 255, 0.05);
  border: 3px solid #282159;
  max-width: 500px;
  width: 100%;
}

.c4-selectors {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.c4-col-select {
  height: 35px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.c4-col-select::after {
  content: '\f0d7';
  /* Arrow down */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--text-muted);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: var(--transition-fast);
}

.c4-col-select:hover {
  background: rgba(255, 255, 255, 0.05);
}

.c4-col-select:hover::after {
  opacity: 1;
  color: var(--color-pink);
}

.c4-board {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 10px;
}

.c4-cell {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg-primary);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.c4-checker {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: dropToken 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

.c4-checker.red {
  background: radial-gradient(circle at 35% 35%, #ff7693 0%, #d5002b 70%, #99001b 100%);
  box-shadow: 0 4px 10px rgba(213, 0, 43, 0.4);
}

.c4-checker.yellow {
  background: radial-gradient(circle at 35% 35%, #fff176 0%, #fbc02d 70%, #f57f17 100%);
  box-shadow: 0 4px 10px rgba(245, 127, 23, 0.4);
}

@keyframes dropToken {
  from {
    transform: translateY(-400px);
  }

  to {
    transform: translateY(0);
  }
}

.c4-cell.winning-cell::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  border: 4px solid #fff;
  animation: pulseWin 1s infinite alternate;
}

@keyframes pulseWin {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ==========================================================================
   GAME 2 - MEMORY MATCH STYLING
   ========================================================================== */

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 440px;
  width: 100%;
  aspect-ratio: 1;
}

.memory-card {
  aspect-ratio: 1;
  border-radius: 15px;
  cursor: pointer;
  perspective: 1000px;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
  border-radius: 15px;
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  border: 2px solid var(--border-glass);
}

.memory-card-back {
  background: radial-gradient(circle, var(--bg-card) 30%, #17153b 100%);
  color: var(--color-green);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.memory-card:hover .memory-card-back {
  border-color: var(--color-green);
  box-shadow: var(--glow-green);
}

.memory-card-front {
  background: var(--bg-primary);
  transform: rotateY(180deg);
  border-color: rgba(162, 210, 75, 0.4);
}

.memory-card.matched .memory-card-front {
  border-color: var(--color-green);
  background: rgba(162, 210, 75, 0.08);
  animation: matchedScale 0.3s ease;
}

@keyframes matchedScale {

  0%,
  100% {
    transform: rotateY(180deg) scale(1);
  }

  50% {
    transform: rotateY(180deg) scale(1.1);
  }
}

/* ==========================================================================
   GAME 3 - RETRO SNAKE STYLING
   ========================================================================== */

.canvas-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#snake-canvas {
  background: #06050d;
  border: 4px solid var(--border-glass);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-width: 400px;
  width: 100%;
  aspect-ratio: 1;
}

.mobile-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}

.ctrl-row {
  display: flex;
  gap: 30px;
}

.ctrl-btn {
  width: 60px;
  height: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: var(--transition-fast);
}

.ctrl-btn:active {
  background: var(--color-blue);
  transform: scale(0.95);
}

/* ==========================================================================
   GAME 4 - TIC TAC TOE STYLING
   ========================================================================== */

.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 15px;
  width: 320px;
  height: 320px;
}

.ttt-cell {
  background: var(--bg-card);
  border: 2px solid var(--border-glass);
  border-radius: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  transition: var(--transition-fast);
  position: relative;
}

.ttt-cell:hover {
  border-color: var(--color-yellow);
  box-shadow: var(--glow-yellow);
  background: rgba(255, 213, 79, 0.03);
}

.ttt-cell.taken {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
}

.ttt-cell.x {
  color: var(--color-pink);
  text-shadow: 0 0 10px rgba(255, 94, 126, 0.5);
  animation: symbolDraw 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ttt-cell.o {
  color: var(--color-blue);
  text-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
  animation: symbolDraw 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes symbolDraw {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.ttt-cell.winning-ttt {
  border-color: var(--color-green);
  box-shadow: var(--glow-green);
  background: rgba(162, 210, 75, 0.08);
}

/* ==========================================================================
   CONTACT VIEW STYLING (Support Cleaned Card updates)
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  padding: 20px 0;
}

.card-header h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.card-header p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(10, 9, 21, 0.6);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 12px 16px 12px 45px;
  border-radius: 12px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  outline: none;
  transition: var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-pink);
  box-shadow: 0 0 0 3px rgba(255, 94, 126, 0.15);
  background: rgba(10, 9, 21, 0.9);
}

.contact-form input:focus+.input-icon,
.contact-form textarea:focus+.input-icon {
  color: var(--color-pink);
}

.text-area-wrapper .input-icon {
  top: 24px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  padding: 14px 20px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  margin-top: 10px;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.info-card-large {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 30px 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: var(--transition-normal);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.info-card-large:hover {
  transform: translateY(-3px);
  border-color: var(--color-green);
  box-shadow: var(--glow-green);
}

.large-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.large-card-header .card-icon {
  margin: 0;
  width: 60px;
  height: 60px;
  font-size: 1.7rem;
}

.large-card-header h3 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--text-main);
}

.support-email-link {
  display: block;
  text-align: center;
  background: rgba(162, 210, 75, 0.06);
  border: 2px dashed rgba(162, 210, 75, 0.25);
  color: var(--color-green);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 12px 10px;
  border-radius: 14px;
  text-decoration: none;
  transition: all var(--transition-fast);
  word-break: break-all;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.support-email-link:hover {
  background: rgba(162, 210, 75, 0.12);
  border-color: var(--color-green);
  text-shadow: 0 0 10px rgba(162, 210, 75, 0.4);
  box-shadow: var(--glow-green);
  transform: scale(1.02);
}

.support-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.support-commitment {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding-top: 25px;
}

.support-commitment h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--text-main);
}

.support-list-large {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-list-large li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

.support-list-large li i {
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* ==========================================================================
   PRIVACY POLICY VIEW STYLING
   ========================================================================== */

.privacy-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: flex-start;
  position: relative;
}

/* Privacy Sidebar Table of Contents */
.privacy-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 25px;
  max-height: calc(100vh - var(--header-height) - 80px);
  overflow-y: auto;
}

.privacy-sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
}

.privacy-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  display: block;
}

.p-nav-link:hover,
.p-nav-link.active {
  color: var(--color-pink);
  transform: translateX(4px);
}

.p-nav-link.active {
  font-weight: 700;
  border-left: 2px solid var(--color-pink);
  padding-left: 8px;
}

/* Privacy content panels */
.privacy-content {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 40px;
}

.privacy-header-box {
  margin-bottom: 40px;
}

.privacy-header-box h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.privacy-header-box .subtitle {
  color: var(--text-muted);
  font-weight: 600;
}

.privacy-section {
  padding: 20px 0;
}

.privacy-section h2 {
  font-size: 1.8rem;
  color: var(--text-main);
  margin-bottom: 20px;
}

.privacy-section p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.privacy-divider {
  border: 0;
  height: 1px;
  background: var(--border-glass);
  margin: 20px 0;
}

/* Children section highlight alert */
.alert-box {
  background: rgba(255, 213, 79, 0.05);
  border: 1px solid rgba(255, 213, 79, 0.2);
  border-left: 4px solid var(--color-yellow);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  display: flex;
  gap: 15px;
  line-height: 1.6;
}

.alert-icon {
  font-size: 1.5rem;
  color: var(--color-yellow);
  flex-shrink: 0;
  margin-top: 3px;
}

.alert-box strong {
  display: block;
  font-family: 'Fredoka', sans-serif;
  margin-bottom: 5px;
  color: var(--text-main);
}

.alert-box div {
  color: var(--text-muted);
}

.privacy-section a {
  color: var(--color-blue);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

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

.mini-icon {
  font-size: 0.8rem;
}

/* Badges for collected data */
.data-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.data-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-list {
  padding-left: 20px;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.privacy-list li {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.compact-list {
  padding-left: 20px;
  margin: 15px 0;
}

/* Security measures grid list */
.security-measures {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.measure-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.measure-card i {
  font-size: 1.4rem;
}

.measure-card div {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.measure-card strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 2px;
}

/* Integrations columns */
.integration-cards {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 25px;
}

.int-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 25px;
}

.int-card h4 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 5px;
}

.int-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  font-style: italic;
}

.int-detail {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 15px 20px;
  border-left: 3px solid var(--color-blue);
}

.int-detail strong {
  font-family: 'Fredoka', sans-serif;
  color: var(--text-main);
  display: block;
  margin-bottom: 8px;
}

.int-detail p {
  margin: 0;
  font-size: 0.95rem;
}

.sub-info-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.sub-info-block h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.sub-info-block p:last-child {
  margin-bottom: 0;
}

/* CCPA Rights layout */
.ccpa-rights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 25px 0;
}

.ccpa-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
}

.ccpa-card h5 {
  font-size: 1.1rem;
  color: var(--color-pink);
  margin-bottom: 8px;
}

.ccpa-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */

.main-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #07060e 0%, #0d0c24 100%);
  border-top: 1px solid var(--border-glass);
  padding: 60px 0 20px;
  margin-top: 80px;
}

/* Star background effects for the premium footer */
.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 2px, transparent 2px),
    radial-gradient(circle at 85% 80%, rgba(79, 195, 247, 0.05) 0%, transparent 40%);
  opacity: 0.8;
}



.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.2fr;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  height: 60px;
  width: auto;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links h4,
.footer-privacy-box h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-links h4::after,
.footer-privacy-box h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: var(--color-pink);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 0.95rem;
}

.footer-link:hover {
  color: var(--color-pink);
  transform: translateX(3px);
  display: inline-block;
}

.footer-privacy-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.footer-contact-item {
  color: var(--text-main);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 20px;
  border-top: 1px solid var(--border-glass);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .privacy-container {
    grid-template-columns: 1fr;
  }

  .privacy-sidebar {
    position: relative;
    top: 0;
    max-height: 200px;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
  }

  .hero-content h1 {
    font-size: 2.6rem;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-visual {
    height: 300px;
  }

  .stats-banner {
    flex-direction: column;
    gap: 30px;
    padding: 30px;
  }

  .stat-divider {
    width: 60px;
    height: 1px;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-secondary);
    transition: var(--transition-normal);
    border-top: 1px solid var(--border-glass);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    padding: 40px;
    align-items: center;
    gap: 20px;
  }

  .nav-cta {
    display: none;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .mobile-controls {
    display: flex;
  }
}