:root {
  /* Light theme (default) */
  --primary: #00695c;
  --accent: #ff5722;
  --bg-light: #f0f5f4;
  --text-dark: #212121;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 105, 92, 0.1);
  --secondary-text: #666;
  --tertiary-text: #888;
  --muted-text: #444;
  --border-light: #eee;
  --footer-bg: #222;
  --footer-text: #aaa;
  --gradient-start: #004d40;
  --gradient-mid: #00796b;
  --hover-primary: #004d40;
  --active-primary: #00251a;
  --section-bg: rgba(255,255,255,0.6);
  --sidebar-bg: rgba(255,255,255,0.9);
  --sidebar-bg2: rgba(240,245,244,0.9);
  --subcategory-bg: rgba(255,255,255,0.7);
  --nav-btn-bg: rgba(255,255,255,0.8);
  --about-bg2: #f8fffe;
  --shimmer-color: rgba(255,255,255,0.1);
  --subcategory-inline-bg: rgba(0,105,92,0.08);
}

[data-theme="dark"] {
  /* Dark theme */
  --primary: #26a69a;
  --accent: #ff7043;
  --bg-light: #121212;
  --text-dark: #e0e0e0;
  --card-bg: #1e1e1e;
  --border-color: #333;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --secondary-text: #b0b0b0;
  --tertiary-text: #a0a0a0;
  --muted-text: #c0c0c0;
  --border-light: #333;
  --footer-bg: #0a0a0a;
  --footer-text: #999;
  --gradient-start: #1a7a6e;
  --gradient-mid: #1a8b7a;
  --hover-primary: #1db584;
  --active-primary: #00695c;
  --section-bg: rgba(30,30,30,0.6);
  --sidebar-bg: rgba(30,30,30,0.9);
  --sidebar-bg2: rgba(35,35,35,0.9);
  --subcategory-bg: rgba(30,30,30,0.7);
  --nav-btn-bg: rgba(30,30,30,0.8);
  --about-bg2: #252525;
  --shimmer-color: rgba(255,255,255,0.1);
  --subcategory-inline-bg: rgba(38,166,154,0.08);
}

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

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--hover-primary);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-light);
}

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  transition: background 0.3s, color 0.3s;
  line-height: 1.6;
}

header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  background: linear-gradient(135deg, var(--primary), var(--gradient-start));
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 999;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.logo {
  width: clamp(40px, 8vw, 52px);
  height: clamp(40px, 8vw, 52px);
}

.brand-title {
  color: #fff;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.15;
}

.brand-subtitle {
  color: #e0f2f1;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem);
}

.section-title {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--primary);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  position: relative;
  line-height: 1.2;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.country-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  position: relative;
  overflow: hidden;
}

.country-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 105, 92, 0.16);
  border-color: rgba(0, 105, 92, 0.35);
}

.country-flag {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 1.25rem;
  display: block;
}

.country-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.country-subtitle {
  font-size: 0.95rem;
  color: var(--secondary-text);
  margin-bottom: 1rem;
}

.country-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--secondary-text);
  font-weight: 700;
}

.country-stats span {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 105, 92, 0.08);
}

.about-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  box-shadow: 0 2px 10px var(--shadow-color);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  position: relative;
}

.about-section h2 {
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
  font-weight: 700;
}

.about-section p {
  font-size: clamp(1rem, 2vw, 1.08rem);
  line-height: 1.7;
  color: var(--text-dark);
  max-width: 850px;
  margin: 0 auto;
}

.about-discord-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 100%;
  margin: 1.2rem auto 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #313338;
  color: #f2f3f5;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.about-discord-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #5865f2;
}

.about-discord-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.about-discord-copy {
  min-width: 0;
  display: grid;
  text-align: left;
  line-height: 1.2;
}

.about-discord-name {
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.about-discord-username {
  color: #b5bac1;
  font-weight: 600;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.contact-section {
  text-align: center;
  padding: 1rem 2rem 0;
}

.discord-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  background: #5865f2;
  color: #fff;
  padding: 1.15rem 2rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.28);
  position: relative;
  overflow: hidden;
}

.discord-cta-icon {
  width: 1.55rem;
  height: auto;
  flex-shrink: 0;
}

.discord-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.discord-cta:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(88, 101, 242, 0.34);
}

.discord-cta:focus-visible {
  outline: 3px solid rgba(88, 101, 242, 0.35);
  outline-offset: 4px;
}

.discord-cta:hover::before {
  left: 100%;
}

footer {
  text-align: center;
  padding: 2rem;
  background: var(--card-bg);
  color: var(--secondary-text);
  font-size: 0.9rem;
  margin-top: 3rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

.header-theme-toggle {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.theme-icon {
  display: none;
}

.theme-icon.moon {
  display: block;
}

[data-theme="dark"] .theme-icon.sun {
  display: block;
}

[data-theme="dark"] .theme-icon.moon {
  display: none;
}

@media (max-width: 768px) {
  .section-title { font-size: 2rem; }
  .countries-grid { grid-template-columns: 1fr; }
  .main-content { padding: 2rem 1rem; }
  .about-section { padding: 2rem; }
}
