:root {
  --bg-main: #020617;
  --bg-card: #020617;
  --border-color: #1e293b;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #22c55e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

input, select, button {
  font-family: inherit;
}



/* 🌙 DARK MODE */
html[data-theme="dark"] {
  --bg-main: #020617;
  --bg-card: #020617;
  --border-color: #1e293b;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
}

/* ☀️ LIGHT MODE */
html[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255,255,255,0.85);
  --border-color: #dbeafe;
  --text-main: #020617;
  --text-muted: #475569;
}


* {
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

body {
  margin: 0;
   background: var(--bg-main);
  color: var(--text-main);

    position: relative;
  min-height: 100vh;
}

header,
.container,
.form-card {
  position: relative;
  z-index: 1;
}

.group-card,
.header,
.search-box {
  background: var(--bg-card);
  border-color: var(--border-color);
}

/* CONTAINER */
.container {
  width: 92%;
  max-width: 1300px;
  margin: auto;
}

/* HEADER */
.header {
  border-bottom: 1px solid #1e293b;
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}
.logo {
  font-size: 20px;
}
.header nav a {
  color: #9ca3af;
  margin-right: 15px;
  text-decoration: none;
}

/* HERO */
.hero {
  padding: 60px 0;
  text-align: center;
  /* background: radial-gradient(circle at top, #020617, #020617); */
}
.hero h2 {
  font-size: 28px;
}
.hero p {
  color: #9ca3af;
  margin: 10px 0 25px;
}

/* SEARCH */
.search-box {
  display: grid;
  grid-template-columns: 1fr 180px 180px 120px;
  gap: 10px;
}
.search-box input,
.search-box select {
  background: #020617;
  border: 1px solid #1e293b;
  padding: 12px;
  color: #fff;
  border-radius: 10px;
}
.search-box button {
  background: #22c55e;
  border: none;
  border-radius: 10px;
  font-weight: bold;
}

/* ADS */
.ad-slot {
  background: #facc15;
  color: #000;
  text-align: center;
  padding: 20px;
  border-radius: 14px;
  margin: 40px 0;
}

/* FILTER */
.filter-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}
.filter-bar a {
  padding: 8px 15px;
  border-radius: 20px;
  background: #020617;
  border: 1px solid #1e293b;
  color: #9ca3af;
  text-decoration: none;
}
.filter-bar a.active {
  background: #22c55e;
  color: #022c22;
}

/* GRID */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 20px;
}

.group-card {
  border: 1px solid #1e293b;
  border-radius: 18px;
  padding: 15px;
  text-align: center;
}
.group-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}
.group-card h3 {
  font-size: 15px;
  margin: 10px 0 5px;
}
.group-card span {
  font-size: 13px;
  color: #9ca3af;
}
.report {
  display: block;
  color: #facc15;
  font-size: 12px;
}

/* JOIN */
.join-btn {
  display: block;
  margin-top: 12px;
  padding: 10px;
  background: #22c55e;
  color: #022c22;
  text-decoration: none;
  border-radius: 12px;
  font-weight: bold;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 30px 0;
  color: #64748b;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}


/* ================= FORMS ================= */

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Inputs */
/* .form input,
.form select {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--text-main);
  font-size: 14px;
  transition: 0.2s;
} */

.form input,
.form select {
  width: 100%;
  height: 48px;
  padding: 0 44px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  line-height: 48px;
}


.form input::placeholder {
  color: var(--text-muted);
}

.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}

/* Submit button */
.form button {
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.35);
}

/* Messages */
.form-message-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid #f87171;
  color: #f87171;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.form-message-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid #22c55e;
  color: #22c55e;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 15px;
}


/* ================= FORMS ================= */

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Inputs */
.form input,
.form select {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--text-main);
  font-size: 14px;
  transition: 0.2s;
}

.form input::placeholder {
  color: var(--text-muted);
}

.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}

/* Submit button */
.form button {
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.35);
}

/* Messages */
.form-message-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid #f87171;
  color: #f87171;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.form-message-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid #22c55e;
  color: #22c55e;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 15px;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}

.input-group input,
.input-group select {
  padding-right: 42px;
}


.toggle-password {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.6;
}


button.loading {
  pointer-events: none;
  opacity: 0.7;
}

button.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


.form input:invalid {
  border-color: #f87171;
}

.form input:valid {
  border-color: #22c55e;
}


.form-card {
  animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* أيقونة يمين فقط */
.input-group .input-icon {
  right: 14px;
}

/* زر إظهار كلمة المرور (يسار) */
.input-group .toggle-password {
  left: 14px;
}

/* لو لا يوجد toggle */
.input-group:not(.has-toggle) input {
  padding-left: 16px;
}

/* لو يوجد toggle */
.input-group.has-toggle input {
  padding-left: 44px;
}


.input-icon,
.toggle-password {
  width: 20px;
  text-align: center;
}


/* ================= LIGHT MODE BACKGROUND ================= */

.light-bg {
  display: none;
}

[data-theme="light"] .light-bg {
  display: block;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px circle at 20% 10%, rgba(59,130,246,0.25), transparent 40%),
    radial-gradient(500px circle at 80% 30%, rgba(14,165,233,0.20), transparent 45%),
    radial-gradient(700px circle at 50% 80%, rgba(56,189,248,0.18), transparent 50%);
  filter: blur(60px);
}


[data-theme="light"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.12), transparent 60%),
    radial-gradient(circle at bottom left, rgba(14,165,233,.08), transparent 60%);
  filter: blur(40px);
  z-index: -1;
}


/* MOBILE */
@media (max-width: 900px) {
  .search-box {
    grid-template-columns: 1fr;
  }
  .header nav {
    display: none;
  }
}

/* ☁️ Blue blurry background (Light mode only) */
html[data-theme="light"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(59,130,246,0.15), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(14,165,233,0.15), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(96,165,250,0.12), transparent 50%);
  filter: blur(80px);
  z-index: -1;
}


/* ================= SEARCH & FILTER INPUTS FIX ================= */

/* منع تداخل form styles */
.search-bar input,
.search-bar button,
.filters select {
  all: unset;
  box-sizing: border-box;
}

/* Search bar */
.search-bar {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.search-bar input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
}

.search-bar button {
  padding: 0 24px;
  height: 48px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #022c22;
  font-weight: bold;
  cursor: pointer;
}

/* Filters */
.filters {
  margin-top: 30px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.filters select {
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
}


.search {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.search-input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.search-btn {
  height: 48px;
  padding: 0 26px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  font-weight: bold;
}


/* ================= INDEX PAGE FIX ================= */
.index-page input,
.index-page select,
.index-page button {
  all: unset;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

/* SEARCH */
.index-search {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 25px auto 0;
}

.index-search input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
}

.index-search button {
  height: 48px;
  padding: 0 28px;
  border-radius: 14px;
  background: var(--accent);
  color: #022c22;
  font-weight: bold;
  cursor: pointer;
}

/* FILTERS */
.index-filters {
  margin: 40px 0;
}

.index-filters select {
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
}

/* MOBILE */
@media (max-width: 768px) {
  .index-search {
    flex-direction: column;
  }
}


/* ================= FILTERS CENTERED ================= */

.filters {
  margin: 50px 0 30px;
}

.filters-center {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-select {
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  min-width: 140px;
}

.filter-select:hover {
  border-color: var(--accent);
}

.filter-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
}


/* ================= MODERN PAGINATION ================= */

.pagination-modern {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 50px 0;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.page-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--accent);
  color: #022c22;
  border-color: var(--accent);
}

.page-btn.prev,
.page-btn.next {
  font-weight: bold;
}


@media (max-width: 600px) {
  .filters-center {
    gap: 10px;
  }

  .filter-select {
    min-width: 100%;
  }
}


/* ================= FILTER CARD ================= */

.filter-card {
  max-width: 720px;
  margin: 40px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

/* Search */
.filter-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-search input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
}

.filter-search input::placeholder {
  color: var(--text-muted);
}

.filter-search button {
  height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #022c22;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.filter-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.35);
}

/* Selects */
.filter-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.select-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-group label {
  font-size: 13px;
  color: var(--text-muted);
}

.select-group select {
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
}


@media (max-width: 600px) {
  .filter-search {
    flex-direction: column;
  }

  .filter-search button {
    width: 100%;
  }

  .filter-selects {
    grid-template-columns: 1fr;
  }
}


/* ================= ADD GROUP PAGE ================= */

.add-group-wrapper {
  display: flex;
  justify-content: center;
  padding: 60px 20px;
}

.add-group-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  border: 1px solid var(--border-color);
}

.add-group-card h2 {
  text-align: center;
  margin-bottom: 6px;
}

.add-group-card .subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-muted);
}

.form-group input,
.form-group select {
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
}

/* Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Submit */
.submit-btn {
  margin-top: 10px;
  height: 52px;
  width: 100%;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.25s;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(34,197,94,0.35);
}

/* Mobile */
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}


.group-preview {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:20px;
}

.group-preview img {
  width:48px;
  height:48px;
  border-radius:50%;
  object-fit:cover;
}

.group-preview span {
  font-weight:600;
}
.progress-bar {
  height:8px;
  background:#e5e7eb;
  border-radius:20px;
  margin-bottom:20px;
  overflow:hidden;
}

.progress-fill {
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#22c55e,#16a34a);
  transition:.3s;
}


/* ================= AD LAYOUT ================= */

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 20px;
  max-width: 1600px;
  margin: auto;
  padding: 20px;
}

.main-content {
  min-width: 0;
}

/* Side ads */
.side-kicking {
  position: sticky;
  top: 90px;
  height: fit-content;
}

/* Mobile ads hidden by default */
.mobing-adding {
  display: none;
  margin: 30px auto;
  width: 92%;
}


@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-kicking {
    display: none;
  }

  .mobing-adding {
    display: block;
  }
}


.adding-boxing {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}


.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 20px;
  margin: 40px 0;
}

.stat-card {
  text-align: center;
}

.stat-card strong {
  font-size: 28px;
  display: block;
  margin-top: 10px;
}

.section-title {
  margin: 50px 0 20px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 20px;
}

.plan-card ul {
  padding: 0;
  list-style: none;
}

.plan-card ul li {
  margin: 8px 0;
}

.plan-card .price {
  font-size: 22px;
  font-weight: bold;
}



.report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.08);
  color: #f87171;
  transition: all 0.2s ease;
}

.report-btn:hover {
  background: rgba(239,68,68,0.18);
  border-color: #f87171;
  color: #fecaca;
  transform: translateY(-1px);
}

.report-btn:active {
  transform: scale(0.96);
}

/* عند ظهور تحذير القروب */
.bad-link {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(234,88,12,0.15);
  color: #fb923c;
  border: 1px solid rgba(234,88,12,0.4);
}


/* ================= MOBILE MENU ================= */

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 20px;
  border-radius: 10px;
  padding: 6px 12px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.mobile-menu a {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-main);
}

#filler-nav{
  display: block;
}

/* Mobile only */
@media (max-width: 900px) {
  .nav {
    display: none;
  }
  #filler-nav{
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu.active {
    display: flex;
  }
}
