:root {
  --primary: #2ad3d8;
  /* لون الفريق */
  --accent: #d96c29;
  /* لون ثانوي */
  --dark: #222;
  --light: #E7E7E7;
  --muted: #777;
}

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

body {
  font-family: "Cairo", sans-serif;
  background: var(--light);
  color: var(--dark);
  padding-top: 100px;
  /* تعويض مساحة الهيدر الثابت */
  animation: fadeIn 0.5s ease-out;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.fade-out {
  opacity: 0;
  transform: translateY(-15px);
  pointer-events: none;
}

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

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Container */
.container {
  width: min(1200px, 90%);
  margin: auto;
}

/* ================= NAVBAR ================= */

.navbar {
  background: var(--light);
  padding: 14px 0;
  border-bottom: 1px solid #eee;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
  /* تحت القائمة (1300) والسهم (1305) */
  transition: padding 0.3s ease, background 0.3s ease;
}

/* Dark Mode Overrides */
body.dark-mode {
  --light: #121212;
  --dark: #e0e0e0;
  --muted: #a0a0a0;
  background-color: var(--light);
}

body.dark-mode .navbar,
body.dark-mode .side-menu,
body.dark-mode .creator-card,
body.dark-mode .team-card,
body.dark-mode .featured-card,
body.dark-mode .modal-content {
  background-color: #1e1e1e;
  border-color: #333;
  color: var(--dark);
}

body.dark-mode .navbar {
  border-bottom: 1px solid #333;
}

body.dark-mode .nav-toggle span {
  background: var(--dark);
}

body.dark-mode .creator-img,
body.dark-mode .game-logo {
  background-color: #2a2a2a;
}

body.dark-mode .filter-btn {
  border-color: #444;
  color: var(--muted);
}

body.dark-mode .filter-btn:hover,
body.dark-mode .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

body.dark-mode .side-menu a {
  color: var(--dark);
}

body.dark-mode .side-menu a:hover {
  color: #fff;
}

body.dark-mode .featured-info h3 {
  color: var(--primary);
}

body.dark-mode .featured-info h3 {
  color: var(--primary);
}

body.dark-mode .page-header {
  background: transparent;
  color: #fff;
}

body.dark-mode .page-header::after {
  background-image: url('../assets/linedark.jpg');
}

body.dark-mode .page-header h1 {
  color: #fff;
}

body.dark-mode .join-form-container {
  background: #1e1e1e;
  /* Dark card background */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark-mode .join-form input,
body.dark-mode .join-form select,
body.dark-mode .join-form textarea {
  background: #2a2a2a;
  color: #fff;
  border-color: #444;
}

body.dark-mode .join-form input:focus,
body.dark-mode .join-form select:focus,
body.dark-mode .join-form textarea:focus {
  border-color: var(--primary);
  background: #2a2a2a;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  transition: transform 0.3s, color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  padding: 5px;
  border-radius: 50%;
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
  background-color: rgba(0, 0, 0, 0.05);
}

body.dark-mode .theme-toggle {
  color: #fff;
}

body.dark-mode .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
  padding: 5px 0;
  /* تصغير الهيدر عند السكرول */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 70px;
  transition: min-height 0.3s ease;
}

.navbar.scrolled .nav-inner {
  min-height: 50px;
  /* تصغير الارتفاع الداخلي */
}

/* يسار: لوقو */
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* وسط: اسم الفريق ثابت بالنص مهما صار */
.brand-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-weight: 800;
  z-index: 1;
}

/* يمين: زر المنيو دائمًا */
.nav-toggle {
  margin-right: 0;
  margin-left: auto;
  position: relative;
  z-index: 1305;
  /* فوق السايد بار */
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* حالة التظليل لما القائمة تفتح */
.navbar.dimmed {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

/* محتوى الهيدر: الشعار بالنص */
.nav-content {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* يخلي الشعار بالنص */
  position: relative;
}

.logo-area .logo {
  width: 42px;
}

.logo-area .brand {
  font-weight: 800;
  font-size: 1.1rem;
}

/* ===== زر القائمة (أقصى اليمين) ===== */

/* شكل الخطوط الأساسية */
.nav-toggle span {
  width: 22px;
  height: 3px;
  background: var(--dark);
  border-radius: 51px;
  transition: 0.25s ease;
  transform-origin: right center;
  /* مهم للسهم */
}

/* Hover → يتحول لسهم < (مو X) */
.nav-toggle:hover span:nth-child(1) {
  transform: rotate(-21deg);
}

.nav-toggle:hover span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:hover span:nth-child(3) {
  transform: rotate(21deg);
}

.about {
  text-align: center;
  padding: 40px 20px;
}

.about h2 {
  font-size: 1.8rem;
  /* الخط العريض اللي بالصورة */
  font-weight: 900;
  margin-bottom: 10px;
}

.about p {
  max-width: 600px;
  margin: auto;
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

/* ===== CTA BUTTONS ===== */
.cta-box {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 24px 0 10px;
  /* Adjusted padding to sit nicely under text */
}

.cta-btn {
  /* Base Styles */
  padding: 12px 30px;
  border-radius: 50px;
  /* حواف دائرية بالكامل (Pill Shape) */
  font-size: 1rem;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid transparent;
  /* Prepare border for alignment */
  transition: all 0.3s ease;
}

/* Primary Button: Background Primary */
.cta-btn.btn-primary {
  background: var(--primary);
  color: #fff;
  /* White text on Teal/Cyan */
  box-shadow: 0 4px 14px rgba(42, 211, 216, 0.25);
}

.cta-btn.btn-primary:hover {
  background: #24b5b9;
  /* Slightly darker teal */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 211, 216, 0.4);
}

/* Outline Button: Dark Text, Primary Border */
.cta-btn.btn-outline {
  background: transparent;
  color: var(--dark);
  /* نص أسود (غامق) ليظهر على الخلفية البيضاء */
  border-color: var(--primary);
}

.cta-btn.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  /* يرجع أبيض عند التأشير */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 211, 216, 0.3);
}

/* ================= SIDE MENU ================= */

.side-menu {
  position: fixed;
  top: 0;
  right: -260px;
  width: 260px;
  height: 100vh;
  background: var(--light);
  padding: 80px 18px;
  box-shadow: -3px 0 12px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: right 0.35s ease;
  z-index: 3000;
  /* أعلى من overlay والهيدر */
}

/* عند الفتح */
.side-menu.open {
  right: 0;
}

/* روابط القائمة */
.side-menu a {
  position: relative;
  display: block;
  text-decoration: none;
  font-size: 1rem;
  padding: 12px 10px;
  color: var(--dark);
  overflow: hidden;
  /* يمنع خروج الأنيميشن */
  transition: color 0.2s ease;
}

/* الـ تأثير */
.side-menu a::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  /* يبدأ من اليمين */
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width .25s ease;
  z-index: -1;
  /* يخلي اللون خلف النص */
}

/* عند الـ hover */
.side-menu a:hover {
  color: #fff;
  /* النص يصير أبيض */
}

.side-menu a:hover::before {
  width: 100%;
  /* اللون يمتد من اليمين لليسار */
}

/* الرابط النشط (الصفحة الحالية) */
/* الرابط النشط (الصفحة الحالية) - موحد للجميع */
.side-menu a.active {
  color: var(--primary) !important;
  background: rgba(42, 211, 216, 0.1);
  border-right: 3px solid var(--primary);
  pointer-events: none;
  cursor: default;
  opacity: 1;
}

/* إلغاء التأثير للرابط النشط */
.side-menu a.active::before {
  display: none;
}



/* ===== overlay ===== */

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 1298;
  /* أقل من القائمة (1300) والسهم (1305) */
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ================= HERO ================= */

/* ================= HERO ================= */

.hero-banner {
  position: relative;
  width: 100%;
  height: 60vh;
  /* Image height */
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

/* Theme Visibility */
body:not(.dark-mode) .hero-light {
  display: block;
}

body.dark-mode .hero-dark {
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 80%, var(--bg) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 40px 20px;
  background: var(--bg);
  /* Match page background */
  z-index: 2;
}

/* ===== Responsive Hero ===== */
@media (max-width: 900px) {
  .hero-banner {
    height: 25vh;
    min-height: 200px;
    width: 94%;
    /* Shrink width */
    margin: 10px auto;
    /* Space from all sides */
    border-radius: 16px;
    /* Nice rounded corners */
  }
}

.hero-container {
  max-width: 940px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-text h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  margin-bottom: 12px;
}

.hero-text p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 26px;
  max-width: 420px;
  line-height: 1.7;
}

/* Buttons */
.btn {
  padding: 12px 22px;
  font-size: .95rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  border: 2px solid transparent;
  transition: .2s;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  opacity: .85;
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* Logo area في الهيرو */
.hero-logo img {
  width: 250px;
  height: auto;
}

/* ===== Responsive ===== */

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

  .hero-logo img {
    margin-top: 20px;
    width: 180px;
  }

  .hero-text p {
    margin-inline: auto;
  }
}

/* ===== Navbar: خلي الزر أقصى اليمين + فوق السايد بار ===== */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  /* يخلي الزر يمين واللوقو يسار */
}

.nav-toggle {
  position: relative;
  z-index: 1305;
  /* فوق السايد بار */
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease, width .25s ease;
  transform-origin: center;
  /* سنتر عشان الـ X يجي في النص */
}

/* Cleaned up previous definitions to be handled by the new block below */

/* الوضع الطبيعي (Restore Missing Lines) */
.nav-toggle span:nth-child(1) {
  top: 16px;
  left: 10px;
  transform-origin: center;
}

.nav-toggle span:nth-child(2) {
  top: 21px;
  left: 10px;
  opacity: 1;
}

.nav-toggle span:nth-child(3) {
  top: 26px;
  left: 10px;
  transform-origin: center;
}

/* Side menu (Restored Bottom Definition) */
.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 280px;
  padding-top: 90px;
  transform: translateX(110%);
  transition: transform .28s ease;
  z-index: 1300;
}

.side-menu.open {
  transform: translateX(0);
}

/* غطاء خلف السايد بار (Restored) */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1299;
}

.menu-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Navbar Toggle Animation ===== */
/* Hover -> Arrow Left (<) */

/* Hide middle line on hover */
.nav-toggle:not(.open):hover span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

/* Top Line -> Upper part of < */
.nav-toggle:not(.open):hover span:nth-child(1) {
  width: 12px;
  /* Shorten for clean arrow tip */
  top: 21px;
  left: 8px;
  /* Anchor left */
  transform: rotate(-45deg);
  transform-origin: left center;
}

/* Bottom Line -> Lower part of < */
.nav-toggle:not(.open):hover span:nth-child(3) {
  width: 12px;
  top: 21px;
  left: 8px;
  transform: rotate(45deg);
  transform-origin: left center;
}

/* Open State -> X */
.nav-toggle.open span:nth-child(1) {
  top: 21px;
  left: 10px;
  width: 24px;
  transform: rotate(45deg);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  top: 21px;
  left: 10px;
  width: 24px;
  transform: rotate(-45deg);
  transform-origin: center;
}

/* ===== Hero image كبيرة + Overlay ===== */
.hero-banner {
  position: relative;
  width: 100%;
  height: 50vh;
  overflow: hidden;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  /* Stack images on top of each other */
  inset: 0;
  transition: opacity 0.5s ease-in-out;
}

.hero-img.hero-dark {
  opacity: 0;
}

.hero-img.hero-light {
  opacity: 1;
}

body.dark-mode .hero-img.hero-dark {
  opacity: 1;
}

body.dark-mode .hero-img.hero-light {
  opacity: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--light) 0%, transparent 20%, transparent 80%, var(--light) 100%);
}

/* نص الفريق تحت الصورة */
.hero-content {
  padding: 22px 18px 6px;
  text-align: center;
}

.team-title {
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: .5px;
  font-size: clamp(28px, 4vw, 46px);
}

.team-typing {
  margin: 0 auto;
  max-width: 900px;
  font-size: clamp(14px, 1.6vw, 18px);
  opacity: .95;
  line-height: 1.8;
  min-height: 48px;
}

.caret {
  display: inline-block;
  animation: blink 1s infinite;
  opacity: .9;
}

@keyframes blink {

  0%,
  49% {
    opacity: 1
  }

  50%,
  100% {
    opacity: 0
  }
}



/* ================= CREATORS PAGE ================= */

.page-header {
  background: transparent;
  color: var(--dark);
  padding: 100px 0 20px;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

/* .page-header::after removed */

@keyframes moveLine {
  from {
    background-position: 0 center;
  }

  to {
    background-position: -3000px center;
    /* Move huge distance to ensure flow */
  }
}

.page-header:hover::after {
  animation-play-state: paused;
}

@media (max-width: 768px) {
  .page-header::after {
    height: 25px;
    margin-top: 15px;
  }
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--dark);
  /* Use theme color */
}

.page-header p {
  opacity: 0.8;
  font-size: 1.1rem;
  color: var(--muted);
}

.creators-section {
  padding-bottom: 80px;
}

/* Featured Card */
.featured-card {
  display: flex;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(42, 211, 216, 0.15);
  margin-bottom: 50px;
  border: 1px solid rgba(42, 211, 216, 0.3);
  align-items: center;
  position: relative;
}

.featured-img {
  width: 300px;
  height: 300px;
  flex-shrink: 0;
}

.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-info {
  padding: 40px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-info h3 {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.featured-info h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 25px;
}

/* Featured Socials inherits generic styles */

/* Responsive Featured Card */
@media (max-width: 768px) {
  .featured-card {
    flex-direction: column;
    text-align: center;
  }

  .featured-img {
    width: 100%;
    height: 250px;
  }

  .featured-info {
    width: 100%;
    align-items: center;
  }

  .featured-socials a {
    justify-content: center;
  }
}

/* Filter Styles */
.filter-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border: 2px solid #eee;
  background: transparent;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  color: var(--muted);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.creator-card.hidden {
  display: none;
}

.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.creator-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  height: 420px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #eee;
  text-align: center;
}

.creator-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.creator-img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  background: #f9f9f9;
  overflow: hidden;
}

.creator-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  filter: saturate(0);
}

.creator-card:hover .creator-img img {
  filter: saturate(1);
}

.creator-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 217, 255, 0.089);
  filter: overlay;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.creator-card:hover .creator-img::after {
  opacity: 0;
}

.creator-img .img-default {
  opacity: 1;
  z-index: 1;
}

.creator-img .img-hover {
  display: none;
}

.creator-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.8) 50%, transparent 100%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 180px;
}

.creator-info h3 {
  margin-bottom: 5px;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.creator-info .role {
  display: block;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-links a {
  text-decoration: none;
  color: #ddd;
  font-size: 0.9rem;
  transition: 0.2s;
}

.social-links a:hover {
  color: var(--primary);
}

/* ================= TEAMS PAGE ================= */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding-bottom: 80px;
}

.team-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  height: 420px;
  text-align: center;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(42, 211, 216, 0.15);
  border-color: var(--primary);
}

.game-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.game-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: 0.3s;
}

.team-card:hover .game-logo img {
  transform: scale(1.1);
}

.team-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 25px;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.8) 50%, transparent 100%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 200px;
  color: #fff;
}

.team-info h2 {
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.team-info p {
  color: #ddd;
  margin-bottom: 20px;
  flex-grow: 0;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.team-btn {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid var(--primary);
  background: rgba(42, 211, 216, 0.1);
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.3s;
  backdrop-filter: blur(5px);
}

.team-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(42, 211, 216, 0.5);
}

/* ================= JOIN PAGE ================= */
.join-section {
  padding-bottom: 80px;
}

.join-form-container {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.form-group {
  margin-bottom: 25px;
  text-align: right;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 2px solid #eee;
  font-family: inherit;
  font-size: 1rem;
  transition: 0.3s;
  background: #fdfdfd;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
  background: transparent;
  box-shadow: 0 0 0 4px rgba(42, 211, 216, 0.1);
}

.submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
}

.submit-btn:hover {
  background: #24b5b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(42, 211, 216, 0.4);
}

.radio-group {
  display: flex;
  gap: 20px;
  padding: 5px 0;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

/* ================= SUCCESS MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  width: 90%;
  max-width: 450px;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

/* Animated Checkmark */
.check-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-background {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary);
  /* Use blue/teal */
  position: absolute;
  transform: scale(0);
  animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.check-icon {
  width: 40px;
  height: 40px;
  z-index: 1;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  /* Start hidden */
  animation: drawCheck 0.5s ease 0.4s forwards;
}

.modal-content h2 {
  color: var(--dark);
  margin-bottom: 10px;
}

.modal-content p {
  color: #666;
  margin-bottom: 25px;
}

.modal-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.modal-btn:hover {
  background: #24b5b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(42, 211, 216, 0.3);
}

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

  to {
    transform: scale(1);
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* Form Switcher */
.form-switcher {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.switcher-btn {
  padding: 12px 30px;
  border: 2px solid #eee;
  background: white;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
  color: var(--muted);
  min-width: 200px;
}

.switcher-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(42, 211, 216, 0.4);
}

body.dark-mode .switcher-btn {
  background: #1e1e1e;
  border-color: #333;
}

body.dark-mode .switcher-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.form-section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.form-section.active {
  display: block;
}



/* Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(42, 211, 216, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile Optimization for Lists */
@media (max-width: 768px) {

  /* Creators List - Compact View */
  .creators-grid {
    gap: 15px;
  }

  .creator-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: right;
    padding: 15px;
    height: auto;
    /* Reset fixed height */
    position: relative;
    /* Keep context */
  }

  .creator-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    margin-left: 15px;
    flex-shrink: 0;
    position: relative;
    /* Remove absolute */
    background: transparent;
    overflow: hidden;
  }

  .creator-img img {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .creator-info {
    padding: 0;
    flex-grow: 1;
    position: static;
    /* Remove absolute */
    background: none;
    /* Remove gradient */
    min-height: auto;
    /* Reset height */
    justify-content: center;
    align-items: flex-start;
  }

  .creator-info h3 {
    margin-bottom: 2px;
    font-size: 1.1rem;
    color: var(--dark);
    /* Reset text color */
    text-shadow: none;
  }

  .creator-info .role {
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-shadow: none;
  }

  .social-links {
    justify-content: flex-start;
  }

  .social-links a {
    color: var(--muted);
    /* Reset icon color */
  }

  /* Teams/Games List - Compact View */
  .teams-grid {
    gap: 15px;
  }

  .team-card {
    flex-direction: row;
    align-items: center;
    padding: 10px;
    text-align: right;
    height: auto;
    /* Reset fixed height */
  }

  .game-logo {
    width: 90px;
    height: 90px;
    margin-left: 15px;
    border-radius: 12px;
    flex-shrink: 0;
    background: transparent;
    position: static;
    /* Remove absolute */
  }

  .game-logo img {
    max-width: 100%;
    height: 100%;
    border-radius: 12px;
  }

  .team-info {
    padding: 0;
    align-items: flex-start;
    text-align: right;
    position: static;
    /* Remove absolute */
    background: none;
    /* Remove gradient */
    min-height: auto;
  }

  .team-info h2 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark);
    /* Reset text color */
    text-shadow: none;
  }

  .team-info p {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #666;
    /* Reset text color */
    text-shadow: none;
  }

  .team-btn {
    padding: 6px 16px;
    font-size: 0.9rem;
    background: transparent;
    /* Reset button bg */
    color: var(--primary);
    border: 2px solid var(--primary);
    backdrop-filter: none;
  }

  /* Featured Card - Compact View */
  .featured-card {
    flex-direction: row;
    align-items: center;
    text-align: right;
    padding: 15px;
    height: auto;
  }

  .featured-img {
    width: 100px;
    height: 100px;
    margin-left: 15px;
    flex-shrink: 0;
    border-radius: 12px;
  }

  .featured-img img {
    border-radius: 12px;
  }

  .featured-info {
    width: auto;
    padding: 0;
    align-items: flex-start;
  }

  .featured-info h3 {
    font-size: 0.9rem;
  }

  .featured-info h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .featured-socials {
    flex-direction: row;
    gap: 15px;
    flex-wrap: wrap;
  }

  .featured-socials a {
    font-size: 0.9rem;
    justify-content: flex-start;
  }

  /* Form Switcher - Mobile */
  .form-switcher {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
  }

  .switcher-btn {
    min-width: unset;
    flex: 1;
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}

/* Verified Badge */
.verified-icon {
  width: 14px;
  height: 14px;
  margin-left: 0.5px;
  /* Space between icon and text (since icon is on right) */
  margin-right: 0;
  vertical-align: middle;
  background-color: currentColor;
  /* Matches text color */
  -webkit-mask: url('../assets/content_creator/verified.png') no-repeat center / contain;
  mask: url('../assets/content_creator/verified.png') no-repeat center / contain;
  display: inline-block;
}

/* Splash Screen Animation */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--light);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background-color 0.8s ease, visibility 0s linear 0.8s;
}

#splash-logo {
  width: 150px;
  /* Initial large size */
  height: auto;
  transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
}

.splash-text {
  color: var(--dark);
  margin-top: 20px;
  font-family: 'Cairo', sans-serif;
  opacity: 0.7;
  animation: pulse 2s infinite;
  pointer-events: none;
  transition: opacity 0.3s;
}

#splash-screen.fade-out {
  background-color: transparent;
  pointer-events: none;
  visibility: hidden;
  /* Hide container after transition */
}

#splash-screen.fade-out .splash-text {
  opacity: 0;
}

/* Typewriter Cursor */
.cursor {
  display: inline-block;
  margin-right: 2px;
  font-weight: 100;
  color: var(--primary);
  /* Make it distinct */
}

.cursor.blinking {
  animation: blink 0.7s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Social Media Icons & Container */
.featured-socials,
.social-links {
  display: flex;
  align-items: center;
  gap: 15px;
  /* Spacing between icons */
  flex-wrap: wrap;
  /* Ensure responsiveness */
  margin-top: 10px;
}

/* Modern Toggle Switch */
.maintenance-controls {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 25px;
  align-items: center;
  backdrop-filter: blur(5px);
}

.maintenance-controls h3 {
  margin: 0;
  font-size: 0.9rem;
  color: #ccc;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: relative;
  cursor: pointer;
  width: 44px;
  height: 24px;
  background-color: #333;
  transition: .4s;
  border-radius: 34px;
  border: 1px solid #555;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(42, 211, 216, 0.4);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

.toggle-label {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Hover effect */
.toggle-switch:hover .slider {
  border-color: #777;
}

input:checked:hover+.slider {
  border-color: var(--primary);
}

.featured-socials a,
.social-links a {
  justify-content: center;
  color: var(--muted);
  transition: color 0.3s ease,
    transform 0.2s ease;
  text-decoration: none;
  padding: 5px;
}

.featured-socials a:hover,
.social-links a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

.featured-socials svg,
.social-links svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* =========================================
   Admin Panel Sidebar Layout
   ========================================= */

/* Layout Container */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #0a0a0a;
}

/* Reset for Admin Page */
body.admin-body {
  padding-top: 0 !important;
  margin: 0;
  overflow-x: hidden;
  background: #0a0a0a !important;
  color: #fff !important;
}

/* Sidebar Styling */
.sidebar {
  width: 260px;
  background: #111;
  border-left: 1px solid #222;
  /* RTL: Left border for sidebar on right */
  display: flex;
  flex-direction: column;
  padding: 25px 20px;
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  z-index: 1000;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

/* Brand/Logo Area */
.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 50px;
  padding-bottom: 25px;
  border-bottom: 1px solid #222;
}

.sidebar-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.brand h2 {
  font-size: 1.3rem;
  color: #fff;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Navigation Links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.nav-item {
  background: transparent;
  border: none;
  color: #999;
  text-align: right;
  /* RTL */
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  font-family: 'Cairo', sans-serif;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(-5px);
  /* RTL: Move left on hover */
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(42, 211, 216, 0.15), transparent);
  color: var(--primary);
  font-weight: 700;
  border-right: 3px solid var(--primary);
  /* RTL: Right border indicator */
}

.nav-item .icon {
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid #222;
  padding-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.back-link,
.logout-btn {
  color: #666;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  transition: 0.3s;
  background: transparent;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
}

.back-link:hover,
.logout-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.logout-btn:hover {
  color: #ff5555;
  background: rgba(255, 85, 85, 0.1);
}

/* Main Content Area */
.main-content {
  margin-right: 260px;
  /* RTL: Margin Right matches Sidebar Width */
  flex-grow: 1;
  padding: 40px;
  width: calc(100% - 260px);
  transition: margin 0.3s ease;
}

/* Top Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 50px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-title h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  color: #fff;
  font-weight: 800;
}

.header-title p {
  color: #888;
  font-size: 1rem;
  margin: 0;
}

/* Sections */
.content-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.content-section.active {
  display: block;
}

/* Dashboard Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.stat-card {
  background: linear-gradient(145deg, #151515, #111);
  border: 1px solid #222;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  border-color: #333;
}

.stat-card h3 {
  color: #888;
  font-size: 1rem;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1;
  background: linear-gradient(45deg, #fff, #888);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-status {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  margin: 0;
  text-shadow: 0 0 15px rgba(42, 211, 216, 0.4);
}

/* Quick Actions */
.quick-actions h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 20px;
}

.actions-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Settings & Maintenance */
.settings-card {
  background: #111;
  border: 1px solid #222;
  padding: 40px;
  border-radius: 20px;
  max-width: 700px;
}

.settings-card h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.6rem;
  color: #fff;
}

.settings-card p {
  color: #888;
  margin-bottom: 35px;
  line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .sidebar {
    width: 80px;
    padding: 20px 10px;
  }

  .brand h2,
  .nav-item span:not(.icon),
  .sidebar-footer span:not(.icon) {
    display: none;
  }

  .brand {
    justify-content: center;
  }

  .nav-item {
    justify-content: center;
    padding: 15px;
    border-right: none;
  }

  .nav-item.active {
    background: rgba(42, 211, 216, 0.1);
    border-right: none;
    border-radius: 12px;
  }

  .main-content {
    margin-right: 80px;
    width: calc(100% - 80px);
    padding: 25px;
  }

  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 600px) {
  .admin-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 20px;
    border-left: none;
    border-bottom: 1px solid #222;
    overflow-x: auto;
  }

  .main-content {
    margin-right: 0;
    width: 100%;
    padding: 20px;
  }

  .sidebar-nav {
    flex-direction: row;
    justify-content: center;
  }

  .brand,
  .sidebar-footer {
    display: none;
  }

  .nav-item {
    padding: 10px;
  }
}

/* =========================================
   Admin Modals Styling 
   ========================================= */
.modal {
  display: flex;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #fff;
  font-size: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #ccc;
  font-size: 0.95rem;
}

.modal .form-group input,
.modal .form-group select {
  width: 100%;
  padding: 12px 15px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.modal .form-group input:focus,
.modal .form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: #1a1a1a;
  color: #fff;
}

.file-upload {
  background: #1a1a1a;
  border: 2px dashed #444;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  color: #888;
  transition: all 0.3s;
}

.file-upload:hover {
  border-color: var(--primary);
  color: #fff;
}

.social-inputs .form-group {
  margin-bottom: 10px;
}