/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #25D366;
  --green-dark: #128C7E;
  --green-light: #dcfce7;
  --accent: #00B09B;
  --bg: #0f1117;
  --bg2: #161b25;
  --bg3: #1e2535;
  --card: #1a2030;
  --card2: #222840;
  --border: #2a3347;
  --text: #f0f4ff;
  --text-muted: #8b95b0;
  --text-dim: #5a6480;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.3);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, #25D366 0%, #00B09B 50%, #96c93d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #25D366, #00B09B);
  color: #fff;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37,211,102,0.5);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: #fff;
  transform: translateY(-2px);
}
.btn-outline-light {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.btn-outline-light:hover {
  border-color: var(--green);
  color: var(--green);
}
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.header.scrolled {
  background: rgba(15,17,23,0.97);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}
.logo-text {
  background: linear-gradient(135deg, #25D366, #00B09B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-icon { display: flex; align-items: center; }

.nav { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--bg3); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 68px;
  left: 0; right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 12px 0;
  transform: translateY(-10px);
  opacity: 0;
  transition: var(--transition);
}
.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.mobile-nav a {
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--green); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 50%, rgba(37,211,102,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(0,176,155,0.06) 0%, transparent 60%),
              var(--bg);
  padding: 120px 0 80px;
}
.hero-bg-circles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(37,211,102,0.1);
  animation: pulse-ring 6s ease-in-out infinite;
}
.c1 { width: 600px; height: 600px; top: -200px; right: -100px; animation-delay: 0s; }
.c2 { width: 400px; height: 400px; bottom: -100px; left: -100px; animation-delay: 2s; }
.c3 { width: 800px; height: 800px; top: -300px; left: 50%; transform: translateX(-50%); animation-delay: 4s; opacity: 0.5; }

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.05); opacity: 0.6; }
}
.c3 { animation: pulse-ring-3 6s ease-in-out infinite; }
@keyframes pulse-ring-3 {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.15; }
  50% { transform: translateX(-50%) scale(1.03); opacity: 0.3; }
}

.hero-content { text-align: center; position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.25);
  color: var(--green);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease forwards;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s 0.1s ease both;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.6s 0.2s ease both;
}

/* Search Box */
.search-box {
  max-width: 700px;
  margin: 0 auto 48px;
  animation: fadeInUp 0.6s 0.3s ease both;
}
.search-inner {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 60px;
  padding: 6px 6px 6px 22px;
  gap: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}
.search-inner:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(37,211,102,0.12);
}
.search-icon {
  width: 20px; height: 20px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.search-inner input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.search-inner input::placeholder { color: var(--text-dim); }
.search-btn {
  background: linear-gradient(135deg, #25D366, #00B09B);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  white-space: nowrap;
}
.search-btn:hover { opacity: 0.9; transform: scale(1.02); }

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.search-tag {
  padding: 6px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.search-tag:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(37,211,102,0.08);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 40px;
  max-width: 640px;
  margin: 0 auto;
  animation: fadeInUp 0.6s 0.4s ease both;
}
.stat-item { text-align: center; padding: 0 28px; }
.stat-num {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green);
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ===== SECTIONS ===== */
.section { padding: 90px 0; }
.section-dark { background: var(--bg2); }
.section-header { text-align: center; margin-bottom: 50px; }
.section-badge {
  display: inline-block;
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.2);
  color: var(--green);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.section-subtitle { color: var(--text-muted); font-size: 1rem; }

/* ===== CATEGORIES ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,211,102,0.06), transparent);
  opacity: 0;
  transition: var(--transition);
}
.category-card:hover {
  border-color: var(--green);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(37,211,102,0.15);
}
.category-card:hover::before { opacity: 1; }
.category-emoji { font-size: 2rem; }
.category-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.category-count { font-size: 0.75rem; color: var(--text-dim); }

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-tab {
  padding: 9px 20px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.filter-tab:hover { border-color: var(--green); color: var(--green); }
.filter-tab.active {
  background: linear-gradient(135deg, #25D366, #00B09B);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}

/* ===== GROUP CARDS ===== */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.group-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease both;
}
.group-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #25D366, #00B09B);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}
.group-card:hover {
  border-color: rgba(37,211,102,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.group-card:hover::after { transform: scaleX(1); }

.group-card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.group-avatar {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  font-weight: 700;
  overflow: hidden;
}
.group-dp {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.group-info { flex: 1; min-width: 0; }
.group-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.group-category {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(37,211,102,0.12);
  color: var(--green);
  font-weight: 600;
}
.group-country { font-size: 0.75rem; color: var(--text-dim); }
.group-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.group-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.group-stats { display: flex; gap: 16px; }
.group-stat { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--text-dim); }
.group-stat svg { width: 13px; height: 13px; }
.join-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #25D366, #00B09B);
  color: #fff;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.join-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
}

.group-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}
.badge-trending { background: rgba(255,100,50,0.15); color: #ff6432; }
.badge-new { background: rgba(37,211,102,0.15); color: var(--green); }
.badge-verified { background: rgba(100,160,255,0.15); color: #64a0ff; }

.load-more-wrap { text-align: center; }

/* ===== SUBMIT SECTION ===== */
.section-submit {
  background: radial-gradient(ellipse at 50% 100%, rgba(37,211,102,0.07) 0%, transparent 70%), var(--bg);
}
.submit-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 60px;
}
.submit-icon-wrap { margin-bottom: 16px; }
.submit-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.2;
}
.submit-desc { color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }
.submit-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.submit-benefits li { font-size: 0.9rem; color: var(--text-muted); }

/* Form */
.submit-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(37,211,102,0.1);
}
.form-group select option { background: var(--bg2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Success */
.form-success {
  text-align: center;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.success-icon { font-size: 3rem; }
.form-success h3 { font-size: 1.4rem; font-weight: 700; }
.form-success p { color: var(--text-muted); }

/* ===== SEARCH RESULTS OVERLAY ===== */
.search-results-overlay {
  background: var(--bg);
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.search-results-header h3 { font-size: 1.3rem; font-weight: 700; }
.close-search {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
}
.close-search:hover { color: var(--text); border-color: var(--text-muted); }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-tagline { color: var(--text-muted); font-size: 0.88rem; margin: 14px 0 20px; line-height: 1.6; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: var(--transition);
}
.social-link:hover { border-color: var(--green); color: var(--green); }

.footer-links h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); transition: var(--transition); }
.footer-links a:hover { color: var(--green); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-dim); }
.footer-warning { color: rgba(255,180,50,0.7) !important; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #25D366, #00B09B);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 500;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(37,211,102,0.5); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .submit-card { padding: 40px; gap: 40px; }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .btn-outline { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 100px 0 60px; }
  .hero-stats { padding: 20px; border-radius: 14px; }
  .stat-item { padding: 0 16px; }
  .stat-num { font-size: 1.4rem; }
  .submit-card { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .groups-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .form-row { grid-template-columns: 1fr; }
  .search-inner { flex-wrap: wrap; border-radius: var(--radius); }
  .search-btn { width: 100%; border-radius: 8px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .stat-divider { width: 40px; height: 1px; }
  .submit-card { padding: 24px 16px; }
}
