/* ==========================================================================
   GleeBoo Official Landing Design System & Tokens
   Single Source of Truth matching GleeBoo Mobile App UI Tokens
   ========================================================================== */

:root {
  /* Dynamic typography token */
  --font-current: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-en: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;

  /* Official GleeBoo Palette Tokens */
  --purple-100: #EDE4F9;
  --purple-300: #9B6FD0;
  --purple-500: #6B3FA8;
  --purple-700: #4A2C7A;
  --purple-900: #2C2049;

  --teal-100: #E1F2EF;
  --teal-300: #7BC8BD;
  --teal-500: #35A99B;
  --teal-700: #27857A;

  --gold-100: #FFF3D0;
  --gold-300: #FFD873;
  --gold-500: #FFC530;
  --gold-600: #E0A400;

  --orange-300: #FFA94D;
  --orange-500: #F5820D;
  --orange-600: #D96B0B;

  --bg-dark: #2C2049;
  --bg-card: #342654;
  --bg-card-hover: #42316B;
  --text-main: #FFFFFF;
  --text-muted: #E5DFEE;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(237, 228, 249, 0.18);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-current);
}

section[id] {
  scroll-margin-top: 5rem;
}

/* Dynamic Language & Typography Rules */
[dir="rtl"], html[lang="ar"] {
  --font-current: 'Cairo', system-ui, -apple-system, sans-serif;
  direction: rtl;
  text-align: right;
  letter-spacing: normal !important;
}

[dir="ltr"], html[lang="en"] {
  --font-current: 'Outfit', system-ui, -apple-system, sans-serif;
  direction: ltr;
  text-align: left;
}

[dir="rtl"], [dir="rtl"] body, [dir="rtl"] button, [dir="rtl"] input {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
  letter-spacing: normal !important;
}

[dir="ltr"], [dir="ltr"] body, [dir="ltr"] button, [dir="ltr"] input {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif !important;
}

/* Ensure text elements inherit dynamic font */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] p, [dir="rtl"] span:not([class*="fa-"]), [dir="rtl"] a, [dir="rtl"] button, [dir="rtl"] small, [dir="rtl"] strong, [dir="rtl"] td, [dir="rtl"] th, [dir="rtl"] div {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
  letter-spacing: normal !important;
}

[dir="ltr"] h1, [dir="ltr"] h2, [dir="ltr"] h3, [dir="ltr"] h4, [dir="ltr"] h5, [dir="ltr"] h6,
[dir="ltr"] p, [dir="ltr"] span:not([class*="fa-"]), [dir="ltr"] a, [dir="ltr"] button, [dir="ltr"] small, [dir="ltr"] strong, [dir="ltr"] td, [dir="ltr"] th, [dir="ltr"] div {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif !important;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
}

.text-gradient-gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500), var(--orange-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-teal {
  background: linear-gradient(135deg, var(--teal-300), var(--teal-500), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(26, 18, 46, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

nav.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-app-icon-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--gold-300);
}

.lang-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
  background: var(--purple-500);
}

/* Buttons */
.btn {
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--orange-500));
  color: #1A122E;
  box-shadow: 0 10px 25px rgba(245, 130, 13, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(245, 130, 13, 0.5);
}

.btn-teal {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 163, 150, 0.35);
}

.btn-teal:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 163, 150, 0.5);
}

.btn-outline {
  border: 2px solid var(--teal-500);
  color: var(--teal-100);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(0, 163, 150, 0.15);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  padding: 11rem 0 6rem;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 70% 30%, rgba(107, 63, 168, 0.3) 0%, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-text p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-btns {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Hero Character Showcase Frame */
.hero-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-app-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 420px;
  animation: floatCard 6s ease-in-out infinite alternate;
}

@keyframes floatCard {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-15px); }
}

.hero-char-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
}

.hero-card-title {
  font-size: 1.6rem;
  margin-top: 1rem;
  color: var(--gold-300);
}

.hero-card-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.badge-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pill-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.pill-badge.gold {
  background: rgba(255, 197, 48, 0.2);
  color: var(--gold-300);
}

.pill-badge.teal {
  background: rgba(0, 163, 150, 0.2);
  color: var(--teal-300);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* Characters Catalog Section */
.characters-section {
  padding: 6rem 0;
  background: var(--purple-900);
  border-top: 1px solid var(--glass-border);
}

.char-filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 3rem;
}

.char-filter-btn {
  padding: 10px 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.char-filter-btn.active, .char-filter-btn:hover {
  background: var(--teal-500);
  color: white;
  border-color: var(--teal-300);
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.character-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.character-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--gold-500);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.char-badge-multiplier {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold-500);
  color: #1A122E;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
}

.char-img-wrap {
  width: 140px;
  height: 140px;
  margin: 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.char-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.char-info h3 {
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.char-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.char-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-300);
}

/* Rewards & Gifts Section */
.rewards-section {
  padding: 6rem 0;
  background: var(--bg-dark);
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.reward-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.reward-card:hover {
  transform: translateY(-6px);
  border-color: var(--teal-500);
  box-shadow: 0 20px 40px rgba(0, 163, 150, 0.2);
}

.reward-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: rgba(0, 163, 150, 0.15);
  color: var(--teal-300);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.reward-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.reward-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.reward-badge {
  display: inline-block;
  background: rgba(255, 197, 48, 0.15);
  color: var(--gold-300);
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Leaderboard Section */
.leaderboard-section {
  padding: 6rem 0;
  background: var(--purple-900);
  border-top: 1px solid var(--glass-border);
}

.leaderboard-table-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

[dir="rtl"] .leaderboard-table {
  text-align: right;
}

.leaderboard-table th {
  padding: 16px 20px;
  color: var(--teal-300);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--glass-border);
}

.leaderboard-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 1rem;
}

.leaderboard-table tr.top-rank td {
  background: rgba(255, 197, 48, 0.05);
}

.rank-cell {
  font-size: 1.2rem;
  font-weight: 800;
}

.coins-cell {
  color: var(--gold-300);
  font-weight: 700;
}

/* Download Callout Section */
.download-section {
  padding: 6rem 0;
  background: var(--bg-dark);
  text-align: center;
}

.download-app-box {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-900));
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.download-app-box h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.download-app-box p {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.store-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
  border-color: var(--gold-500);
}

.store-btn i {
  font-size: 2.2rem;
  color: var(--gold-300);
}

.store-btn .btn-text {
  text-align: left;
}

[dir="rtl"] .store-btn .btn-text {
  text-align: right;
}

.store-btn .btn-text small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.store-btn .btn-text strong {
  font-size: 1.25rem;
}

/* Footer */
footer {
  background: #110B20;
  border-top: 1px solid var(--glass-border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--gold-300);
}

.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Legal Content Container */
.legal-container {
  padding: 10rem 0 6rem;
}

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 4rem;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.legal-card h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--gold-300);
}

.legal-card h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  color: var(--teal-300);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.legal-card p, .legal-card ul {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.legal-card ul {
  padding-left: 1.5rem;
}

[dir="rtl"] .legal-card ul {
  padding-left: 0;
  padding-right: 1.5rem;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text h1 {
    font-size: 3rem;
  }
  .hero-text p {
    margin: 0 auto 2.5rem;
  }
  .hero-btns {
    justify-content: center;
  }
  .nav-links {
    display: none;
  }
}
