
/* =====================================================================
   BRAIN ARCADE — GLOBAL GAMING DESIGN SYSTEM
   Premium responsive homepage styling
   Compatible with existing Brain Arcade homepage selectors.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* -------------------- DESIGN TOKENS -------------------- */

:root {
  color-scheme: dark;

  --bg-body: #080d1b;
  --bg-card: #111a2e;
  --bg-card-hover: #17243d;
  --bg-header: rgba(8, 13, 27, 0.88);
  --bg-input: #101a2e;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #64748b;

  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-secondary: #06b6d4;
  --accent-purple: #a855f7;

  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.25);

  --gradient-main: linear-gradient(120deg, #6366f1, #8b5cf6, #06b6d4);
  --gradient-button: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-card: linear-gradient(
    145deg,
    rgba(99, 102, 241, 0.13),
    rgba(6, 182, 212, 0.04)
  );

  --shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
  --shadow-hover: 0 20px 45px rgba(0, 0, 0, 0.35);
  --glow: 0 0 30px rgba(99, 102, 241, 0.18);

  --card-radius: 20px;
  --small-radius: 12px;
  --page-width: 1320px;
}

/* -------------------- LIGHT THEME -------------------- */

body.light {
  color-scheme: light;

  --bg-body: #f5f7fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8faff;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-input: #ffffff;

  --text-main: #111827;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-secondary: #0891b2;
  --accent-purple: #9333ea;

  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);

  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.12);
  --glow: 0 0 25px rgba(79, 70, 229, 0.10);

  background-color: var(--bg-body);
}

/* -------------------- GLOBAL RESET -------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;

  background:
    radial-gradient(
      ellipse at 15% 0%,
      rgba(99, 102, 241, 0.12),
      transparent 35%
    ),
    radial-gradient(
      ellipse at 90% 15%,
      rgba(6, 182, 212, 0.07),
      transparent 30%
    ),
    var(--bg-body);

  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.light {
  background:
    radial-gradient(
      ellipse at 10% 0%,
      rgba(99, 102, 241, 0.07),
      transparent 35%
    ),
    var(--bg-body);
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

::selection {
  background: rgba(99, 102, 241, 0.35);
  color: #ffffff;
}

/* -------------------- HEADER -------------------- */

.main-header {
  width: 100%;
  min-height: 76px;
  padding: 12px max(5%, calc((100% - var(--page-width)) / 2));

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border-bottom: 1px solid var(--border);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;

  color: var(--text-main);
  text-decoration: none;
}

.brand-logo {
  width: 43px;
  height: 43px;
  object-fit: contain;
  border-radius: 12px;
}

.brand-divider {
  width: 1px;
  height: 28px;
  background: var(--border-strong);
}

.brand-link h1 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.7px;

  background: var(--gradient-main);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.header-btn,
.icon-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--bg-card);
  color: var(--text-main);

  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;

  cursor: pointer;
}

.header-btn {
  padding: 10px 16px;
}

.icon-btn {
  min-width: 43px;
  padding: 9px 12px;
  font-size: 1rem;
}

.header-btn:hover,
.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.header-btn:focus-visible,
.icon-btn:focus-visible,
.game-card:focus-visible {
  outline: 3px solid var(--accent-secondary);
  outline-offset: 4px;
}

/* -------------------- HERO SECTION -------------------- */

.hero-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  width: 100%;
  max-width: var(--page-width);

  margin: 0 auto;
  padding: 76px 5% 55px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 55px;
}

.hero-section::before {
  content: "";
  position: absolute;
  z-index: -1;

  width: 380px;
  height: 380px;
  right: 5%;
  top: -170px;

  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  filter: blur(90px);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-content h2 {
  max-width: 720px;
  margin: 0 0 20px;

  font-size: clamp(2.5rem, 5vw, 4.4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -2.5px;

  color: var(--text-main);
}

.hero-content h2 span {
  background: var(--gradient-main);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  max-width: 570px;
  margin: 0;

  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.85;
}

/* -------------------- PLAYER DASHBOARD -------------------- */

.hero-profile-widget {
  position: relative;
  flex: 0 0 330px;
  min-width: 280px;

  padding: 25px;
  display: flex;
  flex-direction: column;

  background:
    var(--gradient-card),
    var(--bg-card);

  border: 1px solid var(--border-strong);
  border-radius: 22px;

  box-shadow: var(--shadow), var(--glow);
}

.hero-profile-widget::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 3px;

  background: var(--gradient-main);
  border-radius: 0 0 5px 5px;
}

.profile-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 16px;

  font-size: 0.9rem;
  font-weight: 700;
}

#playerName {
  color: var(--text-main);
  font-weight: 800;
}

.rank-tag,
.level-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 5px 10px;
  border-radius: 8px;

  background: rgba(99, 102, 241, 0.13);
  border: 1px solid rgba(99, 102, 241, 0.22);

  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 800;
}

.xp-bar-container {
  width: 100%;
  height: 9px;

  margin-bottom: 11px;
  overflow: hidden;

  background: var(--border-strong);
  border-radius: 20px;
}

.xp-bar-fill {
  width: 0;
  height: 100%;

  background: var(--gradient-main);
  border-radius: inherit;

  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
  transition: width 0.5s ease;
}

.xp-text {
  display: block;
  text-align: right;

  color: var(--text-muted);
  font-size: 0.77rem;
  font-weight: 600;
}

/* -------------------- SEARCH AND FILTERS -------------------- */

.controls-wrapper {
  width: 100%;
  max-width: var(--page-width);

  margin: 0 auto;
  padding: 10px 5% 25px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 780px;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);

  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.controls input,
.controls select {
  min-height: 55px;

  border: 1px solid var(--border-strong);
  border-radius: 14px;

  background: var(--bg-input);
  color: var(--text-main);

  font-size: 0.92rem;
  font-weight: 500;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.controls input {
  width: 100%;
  padding: 14px 18px 14px 50px;
}

.controls input::placeholder {
  color: var(--text-soft);
}

.controls select {
  width: 220px;
  padding: 14px 16px;
  cursor: pointer;
}

.controls input:focus,
.controls select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.13);
}

/* -------------------- MAIN CONTENT -------------------- */

main {
  flex: 1;
  width: 100%;
  max-width: var(--page-width);

  margin: 0 auto;
  padding: 28px 5% 75px;
}

.section-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;

  margin-bottom: 25px;
}

.section-header h2 {
  margin: 0;

  color: var(--text-main);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.game-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 35px;
  padding: 5px 12px;

  border-radius: 30px;
  background: rgba(99, 102, 241, 0.13);

  color: var(--accent-hover);
  font-size: 0.78rem;
  font-weight: 800;
}

/* -------------------- GAME GRID -------------------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  min-width: 0;
  min-height: 245px;

  padding: 23px;

  display: flex;
  flex-direction: column;

  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);

  color: var(--text-main);
  text-decoration: none;

  box-shadow: var(--shadow);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.game-card::before {
  content: "";
  position: absolute;
  z-index: -1;

  width: 160px;
  height: 160px;
  top: -95px;
  right: -75px;

  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  filter: blur(25px);

  transition: transform 0.3s ease;
}

.game-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 3px;
  background: var(--gradient-main);

  opacity: 0;
  transition: opacity 0.25s ease;
}

.game-card:hover {
  transform: translateY(-7px);

  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.55);

  box-shadow: var(--shadow-hover), var(--glow);
}

.game-card:hover::before {
  transform: scale(1.5);
}

.game-card:hover::after {
  opacity: 1;
}

.game-icon {
  width: 62px;
  height: 62px;

  margin-bottom: 19px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  border-radius: 17px;

  background:
    linear-gradient(
      135deg,
      rgba(99, 102, 241, 0.18),
      rgba(6, 182, 212, 0.08)
    );

  font-size: 2rem;
  line-height: 1;
}

.game-card h3 {
  margin: 0 0 9px;

  color: var(--text-main);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.35px;
}

.game-card p {
  flex: 1;

  margin: 0 0 20px;

  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: auto;
  padding-top: 15px;

  border-top: 1px solid var(--border);
}

.tag {
  display: inline-flex;
  align-items: center;

  padding: 6px 10px;
  border-radius: 8px;

  background: rgba(148, 163, 184, 0.09);

  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}

.game-level-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 10px;

  border: 1px solid var(--border-strong);
  border-radius: 8px;

  color: var(--accent-hover);
  background: rgba(99, 102, 241, 0.08);

  font-size: 0.76rem;
  font-weight: 800;
}

/* -------------------- FEEDBACK / COMMUNITY -------------------- */

.feedback-section {
  width: 100%;
  max-width: var(--page-width);

  margin: 0 auto;
  padding: 20px 5% 65px;
}

.feedback-card {
  position: relative;
  overflow: hidden;

  padding: 48px 35px;

  text-align: center;

  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(99, 102, 241, 0.18),
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(6, 182, 212, 0.12),
      transparent 35%
    ),
    var(--bg-card);

  border: 1px solid var(--border-strong);
  border-radius: 24px;

  box-shadow: var(--shadow);
}

.feedback-card h2 {
  margin: 0 0 12px;

  color: var(--text-main);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.8px;
}

.feedback-card p {
  max-width: 620px;
  margin: 0 auto 27px;

  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.feedback-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
}

.btn-whatsapp,
.btn-email {
  min-height: 49px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 13px 23px;

  border: 1px solid transparent;
  border-radius: 12px;

  color: #ffffff;
  text-decoration: none;

  font-size: 0.88rem;
  font-weight: 800;

  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-whatsapp {
  background: #16a34a;
}

.btn-email {
  background: var(--gradient-button);
}

.btn-whatsapp:hover,
.btn-email:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: var(--shadow);
}

/* -------------------- FOOTER -------------------- */

.main-footer {
  width: 100%;
  margin-top: auto;
  padding: 30px 20px;

  text-align: center;

  border-top: 1px solid var(--border);
  background: rgba(8, 13, 27, 0.25);

  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.8;
}

body.light .main-footer {
  background: rgba(255, 255, 255, 0.45);
}

.main-footer strong {
  color: var(--text-main);
  font-weight: 800;
}

/* -------------------- SCROLLBAR -------------------- */

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* -------------------- TABLET -------------------- */

@media (max-width: 1050px) {
  .hero-section {
    gap: 30px;
  }

  .hero-profile-widget {
    flex-basis: 300px;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------------------- SMALL TABLET -------------------- */

@media (max-width: 760px) {
  .main-header {
    padding: 12px 4%;
  }

  .hero-section {
    flex-direction: column;
    align-items: stretch;
    gap: 30px;

    padding: 55px 5% 35px;
  }

  .hero-content {
    text-align: center;
  }

  .hero-content h2 {
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(2.4rem, 8vw, 3.5rem);
    letter-spacing: -1.7px;
  }

  .hero-content p {
    margin: 0 auto;
    font-size: 0.98rem;
  }

  .hero-profile-widget {
    width: 100%;
    max-width: 440px;
    min-width: 0;
    margin: 0 auto;
  }

  .controls-wrapper {
    padding-left: 5%;
    padding-right: 5%;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrapper {
    max-width: none;
    width: 100%;
  }

  .controls select {
    width: 100%;
  }

  main {
    padding-top: 25px;
  }
}

/* -------------------- MOBILE -------------------- */

@media (max-width: 520px) {
  .main-header {
    min-height: 65px;
    padding: 10px 15px;
    gap: 8px;
  }

  .brand-link {
    gap: 9px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-divider {
    height: 22px;
  }

  .brand-link h1 {
    font-size: 1rem;
    letter-spacing: -0.4px;
  }

  .header-controls {
    gap: 6px;
  }

  .header-btn {
    display: none;
  }

  .icon-btn {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 9px;
    font-size: 0.9rem;
  }

  .hero-section {
    padding-top: 43px;
    padding-bottom: 30px;
  }

  .hero-content h2 {
    font-size: 2.35rem;
    line-height: 1.12;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .hero-profile-widget {
    padding: 21px;
  }

  .controls input,
  .controls select {
    min-height: 51px;
    font-size: 0.86rem;
  }

  main {
    padding: 20px 5% 45px;
  }

  .section-header {
    margin-bottom: 18px;
  }

  .section-header h2 {
    font-size: 1.25rem;
  }

  .game-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .game-card {
    min-height: 220px;
    padding: 21px;
  }

  .game-icon {
    width: 55px;
    height: 55px;
    font-size: 1.8rem;
  }

  .game-card h3 {
    font-size: 1rem;
  }

  .game-card p {
    font-size: 0.83rem;
  }

  .feedback-section {
    padding-bottom: 40px;
  }

  .feedback-card {
    padding: 35px 20px;
    border-radius: 19px;
  }

  .feedback-card p {
    font-size: 0.88rem;
  }

  .feedback-buttons {
    flex-direction: column;
  }

  .btn-whatsapp,
  .btn-email {
    width: 100%;
  }

  .main-footer {
    padding: 25px 15px;
    font-size: 0.76rem;
  }
}

/* -------------------- ACCESSIBILITY -------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* =====================================================================
   BRAIN ARCADE — HOMEPAGE STRUCTURE UPGRADE
   Additional styling for the actual index.html
   ===================================================================== */

/* HEADER NAVIGATION */

.main-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.main-navigation a {
  position: relative;
  padding: 9px 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a.nav-active {
  color: var(--text-main);
}

.main-navigation a.nav-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 5px;
  background: var(--gradient-main);
}

/* HERO EYEBROW */

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;

  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
  animation: arcadePulse 2s infinite;
}

@keyframes arcadePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero-content h2 span,
.brand-link h1 span,
.footer-brand span {
  background: var(--gradient-main);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* HERO BUTTONS */

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

.primary-cta,
.secondary-cta {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  padding: 13px 23px;
  border-radius: 12px;

  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;

  transition: all 0.25s ease;
}

.primary-cta {
  color: #ffffff;
  background: var(--gradient-button);
  border: 1px solid transparent;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
}

.primary-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.35);
}

.primary-cta span {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.primary-cta:hover span {
  transform: translateX(4px);
}

.secondary-cta {
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
}

.secondary-cta:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* HERO BENEFITS */

.hero-benefits {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 27px;
}

.hero-benefits span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

/* PLAYER DASHBOARD DETAILS */

.profile-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 23px;
}

.profile-overline {
  display: block;
  color: var(--accent-hover);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.profile-card-heading h3 {
  margin: 5px 0 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 15px;

  background: rgba(99, 102, 241, 0.15);
  font-size: 1.5rem;
}

.hero-profile-widget .profile-info {
  flex-wrap: wrap;
  gap: 9px;
}

#playerName {
  cursor: pointer;
}

#playerName:hover {
  color: var(--accent-hover);
}

.xp-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
}

.xp-heading span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.xp-heading strong {
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.profile-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 13px;

  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

/* FEATURE STRIP */

.feature-strip {
  width: 90%;
  max-width: 1320px;

  margin: 5px auto 60px;
  padding: 23px;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;

  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 19px;

  box-shadow: var(--shadow);
}

.feature-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px;
}

.feature-icon {
  width: 45px;
  height: 45px;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 13px;
  background: rgba(99, 102, 241, 0.13);
  font-size: 1.35rem;
}

.feature-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 800;
}

.feature-item small {
  display: block;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

/* GAME DISCOVERY */

.game-discovery {
  width: 100%;
  scroll-margin-top: 100px;
}

.discovery-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.discovery-heading .section-eyebrow {
  margin-bottom: 9px;
}

.discovery-heading h2 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -1px;
}

.discovery-heading p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.discovery-heading .game-count {
  flex-shrink: 0;
  margin-bottom: 5px;
}

/* COMMUNITY BANNER */

.community-banner {
  position: relative;
  overflow: hidden;

  width: 90%;
  max-width: 1320px;

  margin: 10px auto 65px;
  padding: 38px 42px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;

  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 22px;

  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(6, 182, 212, 0.16),
      transparent 40%
    ),
    linear-gradient(
      120deg,
      rgba(99, 102, 241, 0.16),
      rgba(139, 92, 246, 0.08)
    ),
    var(--bg-card);
}

.community-banner h2 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.8px;
}

.community-banner p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.87rem;
}

.community-banner .section-eyebrow {
  margin-bottom: 10px;
}

/* FOOTER BRAND */

.footer-brand {
  margin-bottom: 7px;
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.6px;
}

.main-footer p {
  margin: 5px 0;
}

.main-footer > a {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.main-footer > a:hover {
  text-decoration: underline;
}

/* TABLET */

@media (max-width: 1050px) {
  .main-navigation {
    gap: 17px;
  }

  .main-navigation a {
    font-size: 0.78rem;
  }

  .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* MOBILE NAVIGATION AND SECTIONS */

@media (max-width: 760px) {
  .main-header {
    flex-wrap: wrap;
  }

  .main-navigation {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 25px;
    padding: 8px 0 3px;
    border-top: 1px solid var(--border);
  }

  .main-navigation a {
    font-size: 0.75rem;
  }

  .feature-strip {
    margin-bottom: 40px;
    padding: 15px;
  }

  .discovery-heading {
    align-items: flex-start;
  }

  .community-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 25px;
    margin-bottom: 45px;
  }

  .community-banner .primary-cta {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .main-navigation {
    gap: 18px;
  }

  .main-navigation a {
    font-size: 0.69rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions a {
    width: 100%;
  }

  .hero-benefits {
    justify-content: center;
    gap: 11px;
  }

  .hero-benefits span {
    font-size: 0.68rem;
  }

  .feature-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
  }

  .feature-item {
    gap: 8px;
    padding: 7px 4px;
  }

  .feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.05rem;
  }

  .feature-item strong {
    font-size: 0.69rem;
  }

  .feature-item small {
    font-size: 0.61rem;
  }

  .discovery-heading {
    flex-wrap: wrap;
    gap: 12px;
  }

  .discovery-heading h2 {
    font-size: 1.55rem;
  }

  .discovery-heading p {
    font-size: 0.8rem;
  }

  .community-banner {
    padding: 25px 20px;
  }

  .xp-heading {
    align-items: flex-start;
  }

  .xp-heading strong {
    font-size: 0.67rem;
  }
}

/* =====================================================================
   HOMEPAGE UPDATES — Featured Game & Badges
   ===================================================================== */

/* ---- Featured Game Banner ---- */
#featuredBanner {
  display: none; /* Hidden by default until JS loads */
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.05)), var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 25px;
  box-shadow: var(--glow);
  position: relative;
  overflow: hidden;
}

#featuredBanner::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: var(--accent);
  filter: blur(60px);
  opacity: 0.3;
  border-radius: 50%;
}

.featured-content {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1;
}

.featured-icon {
  font-size: 2.5rem;
  background: var(--bg-body);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
}

.featured-text h3 {
  margin: 0 0 5px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.featured-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.featured-cta {
  background: var(--accent);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  z-index: 1;
  transition: transform 0.2s;
}

.featured-cta:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
}

/* ---- NEW and HOT Badges ---- */
.badge-new, .badge-hot {
  position: absolute;
  top: -8px;
  right: -12px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.badge-new {
  background: #ef4444; /* Red */
}

.badge-hot {
  background: #f97316; /* Orange */
}

/* ---- Game Difficulty Text ---- */
.game-difficulty {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Responsive Banner ---- */
@media (max-width: 760px) {
  #featuredBanner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .featured-cta {
    width: 100%;
    text-align: center;
  }
}

/* =====================================================================
   PREMIUM HERO PROFILE CARD REDESIGN
   ===================================================================== */

.hero-profile-widget {
  position: relative;
  flex: 0 0 360px;
  min-width: 300px;

  padding: 30px;
  display: flex;
  flex-direction: column;

  /* Glassmorphism Effect */
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.02));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid var(--border-strong);
  border-radius: 24px;

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.hero-profile-widget::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: var(--accent);
  filter: blur(60px);
  opacity: 0.3;
  border-radius: 50%;
  z-index: -1;
}

/* Header Section (Avatar + Name) */
.profile-card-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-avatar-wrap {
  position: relative;
}

.profile-avatar {
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-size: 1.6rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.profile-avatar-wrap .status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  animation: arcadePulse 2s infinite;
}

.profile-titles h3 {
  margin: 4px 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-titles h3:hover {
  color: var(--accent-hover);
}

.edit-icon {
  font-size: 0.8rem;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.profile-titles h3:hover .edit-icon {
  opacity: 1;
}

/* Rank & Level Row */
.profile-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.rank-tag {
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 800;
}

.level-tag {
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--gradient-button);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* XP Bar Section */
.xp-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.xp-heading span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.xp-heading strong {
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 800;
}

.xp-bar-container {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.xp-bar-fill {
  height: 100%;
  background: var(--gradient-main);
  border-radius: inherit;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Footer */
.profile-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}


/* =========================================================
   BRAIN ARCADE — PREMIUM GLOBAL GAME CARD DESIGN
========================================================= */

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

/* MAIN CARD */

.premium-game-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.premium-game-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
}

.premium-game-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* ARTWORK */

.game-artwork {
    position: relative;
    min-height: 175px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #172554, #312e81);
}

.game-artwork::before,
.game-artwork::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.game-artwork::before {
    width: 190px;
    height: 190px;
    right: -65px;
    top: -95px;
    background: rgba(255, 255, 255, 0.09);
}

.game-artwork::after {
    width: 150px;
    height: 150px;
    left: -65px;
    bottom: -90px;
    background: rgba(255, 255, 255, 0.08);
}

/* CATEGORY ARTWORK COLORS */

.artwork-strategy {
    background: linear-gradient(135deg, #164e63, #155e75);
}

.artwork-arcade {
    background: linear-gradient(135deg, #7c2d12, #be123c);
}

.artwork-puzzle {
    background: linear-gradient(135deg, #3730a3, #6d28d9);
}

.artwork-casual {
    background: linear-gradient(135deg, #9d174d, #be185d);
}

.artwork-christian {
    background: linear-gradient(135deg, #78350f, #a16207);
}

.artwork-educational {
    background: linear-gradient(135deg, #065f46, #0f766e);
}

/* ARTWORK TOP */

.artwork-top {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.artwork-category {
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.game-status-badge {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.7px;
}

.game-status-badge.badge-new {
    background: #16a34a;
    color: #fff;
}

.game-status-badge.badge-hot {
    background: #ea580c;
    color: #fff;
}

/* GAME ICON */

.artwork-icon {
    font-size: 76px;
    line-height: 1;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s ease;
}

.premium-game-card:hover .artwork-icon {
    transform: scale(1.13) rotate(-4deg);
}

.artwork-label {
    position: absolute;
    bottom: 12px;
    right: 14px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 2px;
}

/* CARD CONTENT */

.game-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.premium-game-card .game-title {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
}

.premium-game-card .game-description {
    margin: 0;
    min-height: 44px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

/* LEVEL AND DIFFICULTY */

.game-level-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 19px;
}

.game-level-info {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.game-difficulty {
    font-size: 11px;
    font-weight: 800;
}

/* GAME XP PROGRESS */

.game-progress-section {
    margin-top: 10px;
}

.game-progress-track {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--border);
}

.game-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 0.4s ease;
}

.game-progress-caption {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 10px;
}

/* PLAY FOOTER */

.game-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
}

.game-play-label {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.game-play-arrow {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: 17px;
    transition: transform 0.2s ease;
}

.premium-game-card:hover .game-play-arrow {
    transform: translateX(4px);
}

/* TABLET */

@media (max-width: 1050px) {
    .game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

/* MOBILE */

@media (max-width: 700px) {
    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .game-artwork {
        min-height: 135px;
    }

    .artwork-icon {
        font-size: 58px;
    }

    .game-card-content {
        padding: 13px;
    }

    .premium-game-card .game-title {
        font-size: 14px;
    }

    .premium-game-card .game-description {
        font-size: 11px;
        min-height: 54px;
    }

    .artwork-category,
    .game-status-badge {
        font-size: 8px;
        padding: 5px 7px;
    }
}

/* SMALL MOBILE */

@media (max-width: 380px) {
    .game-grid {
        grid-template-columns: 1fr;
    }

    .game-artwork {
        min-height: 160px;
    }

    .artwork-icon {
        font-size: 68px;
    }
}

/* REDUCED MOTION ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    .premium-game-card,
    .artwork-icon,
    .game-play-arrow {
        transition: none;
    }
}

/* =====================================================================
   BACK TO TOP BUTTON
   ===================================================================== */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 999;
  
  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Show class added by JavaScript */
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.back-to-top:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}