/* ==========================================================================
   ThinkyPlay Global Stylesheet
   File: css/style.css
   Purpose: Global design system for homepage, shared components, header,
   footer, buttons, cards, blog cards, game cards, and basic animations.
   ========================================================================== */


/* ==========================================================================
   1. Design variables
   ========================================================================== */

:root {
  /* Background colors */
  --bg-body: #0B0F19;
  --bg-card: #151A25;
  --bg-card-hover: #1C2333;
  --bg-elevated: #1E2536;

  /* Accent colors */
  --accent-primary: #8B5CF6;
  --accent-primary-dark: #6D28D9;
  --accent-primary-glow: rgba(139, 92, 246, 0.35);

  --accent-secondary: #06B6D4;
  --accent-secondary-glow: rgba(6, 182, 212, 0.35);

  --highlight: #FBBF24;
  --success: #10B981;
  --danger: #EF4444;

  /* Text colors */
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-heading: #FFFFFF;

  /* Border colors */
  --border-color: #2D3748;
  --border-light: #374151;
  --border-soft: rgba(45, 55, 72, 0.65);

  /* Fonts */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Layout */
  --container-max: 1080px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.36);

  --shadow-glow-purple: 0 0 22px var(--accent-primary-glow);
  --shadow-glow-cyan: 0 0 22px var(--accent-secondary-glow);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}


/* ==========================================================================
   2. Reset and base styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-main);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ==========================================================================
   3. Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-heading);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 0.75rem;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
  font-size: 1.1rem;
}

p {
  margin-bottom: 1rem;
  overflow-wrap: break-word;
}

.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.small-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}


/* ==========================================================================
   4. Layout utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

main {
  flex: 1;
}

.section {
  padding-block: 4rem;
}

.section-soft {
  background: linear-gradient(
    180deg,
    rgba(21, 26, 37, 0.55),
    rgba(21, 26, 37, 0.25)
  );
  border: 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.section-action {
  margin-top: 2.75rem;
  text-align: center;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}


/* ==========================================================================
   5. Buttons, badges, pills
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.28);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.42);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-secondary);
  color: #fff;
  transform: translateY(-2px);
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.14);
  color: var(--accent-primary);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.pill-success {
  background: rgba(16, 185, 129, 0.14);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.28);
}

.pill-highlight {
  background: rgba(251, 191, 36, 0.14);
  color: var(--highlight);
  border-color: rgba(251, 191, 36, 0.28);
}


/* ==========================================================================
   6. Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 25, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.logo:hover {
  color: var(--text-heading);
}

.logo-icon {
  flex-shrink: 0;
}


/* ==========================================================================
   7. Main navigation
   ========================================================================== */

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--text-heading);
  outline: none;
}

.nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link svg,
.dropdown-menu svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.icon-chevron {
  transition: transform var(--transition-fast);
}


/* ==========================================================================
   8. Dropdown menu
   ========================================================================== */

.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.55rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 100;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu,
.has-dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.has-dropdown:hover .icon-chevron,
.has-dropdown:focus-within .icon-chevron,
.has-dropdown.is-open .icon-chevron {
  transform: rotate(180deg);
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background: var(--bg-elevated);
  color: var(--text-heading);
  outline: none;
}


/* ==========================================================================
   9. Mobile navigation
   ========================================================================== */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text-main);
  transition: all var(--transition-base);
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-body);
    border-top: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 1.05rem;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    min-width: 100%;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 1rem 0.75rem;
    opacity: 1;
    visibility: visible;
    display: none;
  }

  .has-dropdown.is-open .dropdown-menu {
    display: block;
  }

  .dropdown-menu li a {
    padding: 0.7rem 0.75rem;
  }
}


/* ==========================================================================
   10. Footer
   ========================================================================== */

.site-footer {
  background: #070A12;
  border-top: 1px solid var(--border-soft);
  padding-top: 4rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-heading {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-secondary);
}

.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-block: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.copyright {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-bottom-links a:hover {
  color: var(--accent-secondary);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   11. Breadcrumbs
   ========================================================================== */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent-secondary);
}

.breadcrumbs .separator {
  color: var(--border-light);
}

.breadcrumbs .current {
  color: var(--text-main);
}


/* ==========================================================================
   12. Hero section
   ========================================================================== */

.hero {
  position: relative;
  padding-block: 5rem 4rem;
  text-align: center;
  overflow: hidden;
}

.hero h1 {
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 0%, #9CA3AF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.trust-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}


/* ==========================================================================
   13. Shared card styles
   ========================================================================== */

.game-card,
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background var(--transition-base);
}

.game-card:hover,
.blog-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: var(--shadow-md);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
}


/* ==========================================================================
   14. Card media
   Used for game thumbnails and blog featured images.
   ========================================================================== */

.card-media,
.game-card-thumb,
.blog-card-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-soft);
}

.card-media img,
.game-card-thumb img,
.blog-card-thumb img,
.card-media svg,
.game-card-thumb svg,
.blog-card-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.35s ease;
}

.game-card:hover .card-media img,
.game-card:hover .game-card-thumb img,
.blog-card:hover .card-media img,
.blog-card:hover .blog-card-thumb img,
.game-card:hover .card-media svg,
.game-card:hover .game-card-thumb svg,
.blog-card:hover .card-media svg,
.blog-card:hover .blog-card-thumb svg {
  transform: scale(1.035);
}


/* ==========================================================================
   15. Game cards
   ========================================================================== */

.game-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.game-card-desc {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.game-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.game-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  font-weight: 600;
  color: var(--accent-secondary);
}

.game-card-link:hover {
  color: #fff;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.featured-games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .featured-games-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   16. Blog cards
   ========================================================================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.blog-grid-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .blog-grid-featured {
    grid-template-columns: 1fr;
  }
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-card-title {
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-card-excerpt {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.95rem;
}


/* ==========================================================================
   17. Features, controls, updates, skills
   ========================================================================== */

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.14);
  color: var(--accent-primary);
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.feature-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.feature-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.update-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.skill-card {
  padding: 1.5rem 1rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.skill-card:hover {
  border-color: rgba(6, 182, 212, 0.45);
  transform: translateY(-3px);
}

.skill-icon {
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
  line-height: 1;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   18. FAQ
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent-primary);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform var(--transition-base);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--border-soft);
}

.faq-answer {
  padding: 1.25rem;
  color: var(--text-muted);
}


/* ==========================================================================
   19. CTA section
   ========================================================================== */

.cta-section {
  padding: 4rem 2rem;
  text-align: center;
  background:
    linear-gradient(
      135deg,
      rgba(139, 92, 246, 0.12),
      rgba(6, 182, 212, 0.1)
    ),
    var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.skill-cta-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-weight: 600;
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background var(--transition-base);
}

.skill-chip:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: var(--accent-secondary);
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.16);
  color: #fff;
}

.skill-chip svg {
  opacity: 0.85;
}


/* ==========================================================================
   20. Basic content body
   Used later for static pages and blog articles.
   ========================================================================== */

.content-body {
  max-width: 760px;
  margin-inline: auto;
}

.content-body h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.9rem;
}

.content-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.content-body p {
  margin-bottom: 1.15rem;
}

.content-body ul,
.content-body ol {
  margin-bottom: 1.15rem;
  padding-left: 1.25rem;
}

.content-body ul {
  list-style: disc;
}

.content-body ol {
  list-style: decimal;
}

.content-body li {
  margin-bottom: 0.5rem;
}

.content-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-body a:hover {
  color: var(--accent-secondary);
}


/* ==========================================================================
   21. Screen reader utility
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ==========================================================================
   22. Reveal animation
   Content is hidden only when JavaScript is active.
   This prevents blank content if JavaScript is unavailable.
   ========================================================================== */

.fade-up {
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

html.js .fade-up {
  opacity: 0;
  transform: translateY(18px);
}

html.js .fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   23. Reduced motion support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html.js .fade-up {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Premium arcade refresh
   Adds ambient glow, floating hero shapes, redesigned game cards,
   play buttons, and subtle gaming animations.
   ========================================================================== */

/* Hero ambient glow */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
}

.hero::before {
  width: 420px;
  height: 420px;
  left: -140px;
  top: -140px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.35),
    transparent 68%
  );
  opacity: 0.55;
}

.hero::after {
  width: 390px;
  height: 390px;
  right: -130px;
  bottom: -150px;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.28),
    transparent 68%
  );
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Floating hero shapes */
.hero-float {
  position: absolute;
  z-index: 0;
  opacity: 0.32;
  pointer-events: none;
  animation: heroFloat 9s ease-in-out infinite;
}

.hero-float svg {
  width: 100%;
  height: 100%;
}

.hero-float-1 {
  width: 34px;
  height: 34px;
  top: 24%;
  left: 11%;
  color: #8B5CF6;
}

.hero-float-2 {
  width: 28px;
  height: 28px;
  top: 18%;
  right: 14%;
  color: #06B6D4;
  animation-delay: 1.2s;
}

.hero-float-3 {
  width: 30px;
  height: 30px;
  bottom: 20%;
  left: 17%;
  color: #FBBF24;
  animation-delay: 2.1s;
}

.hero-float-4 {
  width: 32px;
  height: 32px;
  bottom: 18%;
  right: 12%;
  color: #10B981;
  animation-delay: 3s;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(6deg);
  }
}

/* Featured games section background */
.featured-games-section {
  position: relative;
  overflow: hidden;
}

.featured-games-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(139, 92, 246, 0.12),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(6, 182, 212, 0.08),
      transparent 40%
    );
}

.featured-games-section .container {
  position: relative;
  z-index: 1;
}

/* Redesigned game cards */
.game-card {
  border-radius: 20px;
  background: linear-gradient(
    180deg,
    rgba(21, 26, 37, 0.96),
    rgba(13, 17, 27, 0.98)
  );
  border: 1px solid rgba(139, 92, 246, 0.16);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.game-card:hover {
  transform: translateY(-7px);
}

.game-card-memory:hover {
  border-color: rgba(139, 92, 246, 0.62);
  box-shadow: 0 18px 42px rgba(139, 92, 246, 0.22);
}

.game-card-math:hover {
  border-color: rgba(16, 185, 129, 0.58);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.18);
}

.game-card-word:hover {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 18px 42px rgba(251, 191, 36, 0.16);
}

/* Game card media */
.game-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-soft);
}

.game-card-media svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1);
  transition: transform 0.4s ease;
}

.game-card:hover .game-card-media svg {
  transform: scale(1.045);
}

/* Game card body */
.game-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem;
}

.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.game-card-title {
  margin: 0;
  font-size: 1.3rem;
}

.game-difficulty {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.game-card-desc {
  margin: 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.game-card-action {
  margin-top: auto;
}

/* Vibrant play buttons */
.game-play-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 46px;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  color: #fff;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.game-play-btn svg {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.game-play-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.game-play-btn:hover svg {
  transform: scale(1.08);
}

.game-play-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
  transform: skewX(-18deg);
  transition: left 0.5s ease;
}

.game-play-btn:hover::after {
  left: 120%;
}

.game-play-memory {
  background: linear-gradient(135deg, #8B5CF6, #4F46E5);
  box-shadow: 0 10px 24px rgba(139, 92, 246, 0.3);
}

.game-play-math {
  background: linear-gradient(135deg, #10B981, #06B6D4);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.26);
}

.game-play-word {
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

/* Featured card entrance animation */
@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html.js .featured-games-grid .game-card.fade-up.is-visible {
  animation: cardEnter 0.55s ease backwards;
}

html.js .featured-games-grid .game-card.fade-up.is-visible:nth-child(2) {
  animation-delay: 0.12s;
}

html.js .featured-games-grid .game-card.fade-up.is-visible:nth-child(3) {
  animation-delay: 0.24s;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .hero-float {
    display: none;
  }

  .hero::before {
    width: 300px;
    height: 300px;
  }

  .hero::after {
    width: 280px;
    height: 280px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hero-float {
    animation: none;
  }

  .game-play-btn::after {
    transition: none;
  }

  html.js .featured-games-grid .game-card.fade-up.is-visible {
    animation: none;
  }

  .game-card,
  .game-card-media svg,
  .game-play-btn,
  .game-play-btn svg {
    transition: none;
  }
}

/* ==========================================================================
   Final homepage polish
   ========================================================================== */

/* Accent text */
.text-accent {
  background: linear-gradient(135deg, #8B5CF6, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero split layout */
.hero-split .hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
  text-align: left;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy .hero-actions {
  align-items: flex-start;
}

.hero-visual {
  position: relative;
  z-index: 0;
  opacity: 0.95;
  animation: heroVisualFloat 10s ease-in-out infinite;
}

.hero-visual svg {
  width: 100%;
  height: auto;
  max-width: 520px;
  margin-inline: auto;
}

@keyframes heroVisualFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* Badge spacing */
.hero .badge {
  display: inline-block;
  margin-bottom: 1.35rem;
}

/* Hero mobile layout */
@media (max-width: 900px) {
  .hero-split .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy .hero-actions {
    align-items: center;
  }

  .hero-visual {
    display: none;
  }

  .hero .badge {
    margin-bottom: 1.85rem;
  }

  .hero h1 {
    margin-bottom: 1rem;
  }
}

/* Show only two subtle floating shapes on mobile */
@media (max-width: 768px) {
  .hero-float {
    display: block;
    opacity: 0.18;
    animation-duration: 12s;
  }

  .hero-float-3,
  .hero-float-4 {
    display: none;
  }

  .hero-float-1 {
    width: 26px;
    height: 26px;
    top: 16%;
    left: 8%;
  }

  .hero-float-2 {
    width: 22px;
    height: 22px;
    top: 14%;
    right: 8%;
  }
}

/* Games navigation row */
.nav-games-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-games-link {
  padding-right: 0.25rem;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.dropdown-toggle:hover {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-toggle:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.has-dropdown.is-open .dropdown-toggle .icon-chevron {
  transform: rotate(180deg);
}

/* Mobile dropdown fix */
@media (max-width: 768px) {
  .nav-games-row {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .nav-games-link {
    flex: 1;
    padding: 1rem 0;
    font-size: 1.05rem;
  }

  .dropdown-toggle {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .has-dropdown .dropdown-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 100%;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 1rem 0.75rem;
    margin-top: 0;
  }

  .has-dropdown.is-open .dropdown-menu {
    display: block;
  }
}

/* Footer balance */
@media (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 0.9fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .footer-desc {
    max-width: 300px;
  }
}

/* Reduced motion support for final additions */
@media (prefers-reduced-motion: reduce) {
  .hero-visual {
    animation: none;
  }
}

/* ==========================================================================
   Final mobile dropdown position fix
   ========================================================================== */

@media (max-width: 768px) {

  .has-dropdown .dropdown-menu,
  .has-dropdown.is-open .dropdown-menu,
  .has-dropdown:hover .dropdown-menu,
  .has-dropdown:focus-within .dropdown-menu {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0.4rem 0 1rem 0.35rem !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none;
  }

  .has-dropdown.is-open .dropdown-menu {
    display: block !important;
  }

  .dropdown-menu li {
    width: 100%;
  }

  .dropdown-menu li a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    padding: 0.7rem 0.75rem;
    text-align: left;
  }
}

/* ==========================================================================
   Stop mobile menu slide glitch when link is clicked
   ========================================================================== */

.main-nav.nav-no-transition {
  transition: none !important;
}

/* ==========================================================================
   Fix mobile dropdown arrow stuck after closing
   ========================================================================== */

@media (max-width: 768px) {

  .has-dropdown:hover .icon-chevron,
  .has-dropdown:focus-within .icon-chevron,
  .has-dropdown:hover .dropdown-toggle .icon-chevron,
  .has-dropdown:focus-within .dropdown-toggle .icon-chevron {
    transform: none !important;
  }

  .has-dropdown.is-open .icon-chevron,
  .has-dropdown.is-open .dropdown-toggle .icon-chevron {
    transform: rotate(180deg) !important;
  }
}

/* ==========================================================================
   About page styles
   ========================================================================== */

.about-hero {
  padding-top: 3rem;
}

.about-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

.about-glance {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.about-glance h2 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.about-glance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-soft);
}

.about-glance-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.about-glance-item span:first-child {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.about-glance-item span:last-child {
  font-weight: 600;
  text-align: right;
}

.about-link-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.about-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.about-link-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-secondary);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
}

.about-link-item span {
  font-weight: 600;
}

.about-link-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.about-updated {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .about-hero-grid {
    grid-template-columns: 1fr;
  }

  .about-glance {
    padding: 1.4rem;
  }
}

/* ==========================================================================
   Contact page styles
   ========================================================================== */

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.contact-topic {
  text-align: left;
}

.contact-topic h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.contact-topic p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-steps {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
}

.contact-steps h3 {
  margin-bottom: 1rem;
}

.contact-steps ol {
  margin: 0;
  padding-left: 1.2rem;
}

.contact-steps li {
  margin-bottom: 0.65rem;
  color: var(--text-muted);
}

.contact-steps li:last-child {
  margin-bottom: 0;
}

.contact-small-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

@media (max-width: 560px) {
  .contact-actions .btn {
    width: 100%;
  }
}