:root {
  --primary: #4f46e5;
  --secondary: #7c3aed;
  --bg-body: #f8f9fc;
  --bg-surface: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
}

[data-bs-theme="dark"] {
  --bg-body: #0f1117;
  --bg-surface: #171a24;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-soft: #2a2e3a;
}

body {
  background: var(--bg-body);
  color: var(--text-main);
  font-family: 'Segoe UI', system-ui, sans-serif;
  transition: background .25s ease, color .25s ease;
}

/* Header */
.site-header {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
[data-bs-theme="dark"] .site-header { background: rgba(23,26,36,0.85); }

.brand-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
.navbar-brand { color: var(--text-main) !important; }
.nav-link { color: var(--text-main) !important; font-weight: 500; }
.search-form input { border-radius: 20px; }
.btn-icon { border: none; background: transparent; color: var(--text-main); font-size: 1.1rem; }

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 0 0 32px 32px;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15), transparent 60%);
}

/* Glass cards */
.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(79,70,229,0.15);
}

.category-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

.section-title { font-weight: 700; color: var(--text-main); }
.section-subtitle { color: var(--text-muted); }

.badge-difficulty-easy { background: #d1fae5; color: #065f46; }
.badge-difficulty-medium { background: #fef3c7; color: #92400e; }
.badge-difficulty-hard { background: #fee2e2; color: #991b1b; }

/* Footer */
.site-footer {
  background: #111827;
}
.footer-links a { color: #d1d5db; text-decoration: none; display: block; padding: 4px 0; }
.footer-links a:hover { color: #fff; }
.social-icons a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.social-icons a:hover { background: var(--primary); }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--border-soft) 25%, #f0f0f5 50%, var(--border-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
