/* ===============================
   OpenPlayground - Clean & Modern
   Solid Colors, No Gradients
   =============================== */

/* CSS Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ===============================
     Chatbot Styles
     =============================== */

/* Chatbot Toggle Button */
#chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  color: rgb(139, 69, 19);
  font-size: 22px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}

#chatbot-toggle:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
}

/* Chatbot Container */
.chatbot-container {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 420px;
  background: var(--surface);
  color: var(--text-primary);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

.chatbot-header {
  background: var(--primary-color);
  color: rgb(139, 69, 19);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.chatbot-header button {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.chatbot-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.bot-message,
.user-message {
  max-width: 80%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.bot-message {
  background: #f5e8d8;
  color: var(--text-primary);
}

html[data-theme="dark"] .bot-message {
  background: rgba(160, 82, 45, 0.15);
  color: var(--text-primary);
}

.user-message {
  background: #ff6b35;
  color: white;
  margin-left: auto;
}

.chatbot-input {
  display: flex;
  border-top: 1px solid var(--border-light);
}

.chatbot-input input {
  flex: 1;
  padding: 12px;
  border: none;
  outline: none;
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.chatbot-input button {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.chatbot-input button:hover {
  background: #ff5722;
}

@media (max-width: 480px) {
  .chatbot-container {
    right: 16px;
    left: 16px;
    width: auto;
    height: 70vh;
  }
}

/* Custom Properties - Light Theme */
:root {
  /* Primary Colors (Natural Brown) */
  --primary-50: #fdf8f3;
  --primary-100: #f5e8d8;
  --primary-200: #e8d0b8;
  --primary-300: #d4b08a;
  --primary-400: #b8860b;
  --primary-500: #a0522d;
  --primary-600: #8b4513;
  --primary-700: #6b4423;
  --primary-800: #5d3a1a;
  --primary-900: #4a2c12;

  /* Accent Colors (Natural Olive Green) */
  --accent-400: #9acd32;
  --accent-500: #556b2f;
  --accent-600: #4a5d26;

  /* Semantic Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #f0f0f0;
  --surface: #ffffff;
  --surface-elevated: #ffffff;

  --text-primary: #222222;
  --text-secondary: #666666;
  --text-muted: #888888;
  --text-disabled: #aaaaaa;

  --border-light: #e0e0e0;
  --border-default: #cccccc;
  --border-focus: var(--primary-500);

  /* Effects */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.3);

  /* Solid Colors (No Gradients) */
  --gradient-primary: var(--primary-500);
  --gradient-subtle: var(--bg-secondary);

  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: blur(10px);

  /* Light mode specific colors */
  --card-bg: var(--surface);
  --modal-bg: var(--surface);
  --input-bg: var(--surface);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "JetBrains Mono", monospace;

  scroll-behavior: smooth;
}

/* Dark Theme */
html[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #2a2a2a;
  --surface: #1e1e1e;
  --surface-elevated: #2a2a2a;

  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #888888;
  --text-disabled: #666666;

  --border-light: #333333;
  --border-default: #444444;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(255, 138, 101, 0.4);

  --gradient-subtle: var(--bg-secondary);

  --glass-bg: rgba(30, 30, 30, 0.9);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Dark mode specific colors for better contrast */
  --card-bg: var(--surface);
  --modal-bg: var(--surface-elevated);
  --input-bg: var(--surface-elevated);
}

/* Base Styles */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  transition: background-color var(--transition-slow),
    color var(--transition-slow);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===============================
   Theme Toggle
   =============================== */
.theme-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-icon {
  width: 22px;
  height: 22px;
  overflow: visible;
  opacity: 0.85;
  transition: transform 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

button#themeToggle {
  background: none !important;
}

.sun-core {
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-rays {
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.moon-bite {
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ===============================
   FIXED Theme Toggle Logic
   =============================== */

/* LIGHT MODE → Show MOON */
[data-theme="light"] .sun-rays {
  transform: scale(0.1);
  opacity: 0;
}

[data-theme="light"] .sun-core {
  transform: scale(1.3);
}

[data-theme="light"] .moon-bite {
  transform: translate(5px, -1.5px) scale(0.6);
}

/* DARK MODE → Show SUN */
[data-theme="dark"] .sun-rays {
  transform: scale(1.1);
  opacity: 1;
}

[data-theme="dark"] .sun-core {
  transform: scale(1);
}

[data-theme="dark"] .moon-bite {
  transform: translate(20px, -20px);
}

/* Shake Animation */
@keyframes shake {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(15deg);
  }

  50% {
    transform: rotate(-15deg);
  }

  75% {
    transform: rotate(10deg);
  }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* ===============================
   Navbar
   =============================== */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-light);
  z-index: 999;
  transition: all var(--transition-slow);
}

/* Reserve space for sticky navbar */
#header-placeholder {
  height: 72px;
  /* matches navbar height */
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.nav-logo i {
  font-size: 1.75rem;
  color: var(--primary-500);
}

.nav-logo:hover {
  transform: translateY(-1px);
  color: var(--primary-500);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-200);
}

/* Card Actions Container (Bookmark + Source) */
.card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

/* Base style for buttons in card-actions */
.card-actions .bookmark-btn,
.card-actions .source-btn {
  position: static;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 1.125rem;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.card-actions .source-btn {
  text-decoration: none;
}

/* Hover effects */
.card-actions .bookmark-btn:hover,
.card-actions .source-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-500);
  transform: scale(1.1);
}

.card:hover .card-actions .bookmark-btn,
.card:hover .card-actions .source-btn {
  opacity: 1;
  transform: scale(1);
}

/* Show bookmarked state always or on hover */
.card-actions .bookmark-btn.bookmarked {
  opacity: 1;
  transform: scale(1);
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

/* Dark theme overrides */
html[data-theme="dark"] .card-actions .bookmark-btn,
html[data-theme="dark"] .card-actions .source-btn {
  background: var(--surface-elevated);
  border-color: var(--border-default);
  color: var(--text-muted);
}

html[data-theme="dark"] .card-actions .bookmark-btn:hover,
html[data-theme="dark"] .card-actions .source-btn:hover {
  background: rgba(255, 107, 53, 0.2);
  color: var(--primary-400);
  border-color: var(--primary-400);
}

html[data-theme="dark"] .card-actions .bookmark-btn.bookmarked {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

/* List Card Actions Adjustment */
.list-card-actions {
  display: flex;
  gap: 8px;
}

.clear-btn {
  border-style: dashed;
  color: var(--text-muted);
}

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

/* Clear Filters Button */
.clear-btn {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.clear-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-secondary);
}

.clear-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin: 0 0 2rem 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-links a {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--primary-500);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-links .fullstack-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
}

.nav-links .fullstack-link i {
  transition: transform var(--transition-spring);
}

.nav-links .fullstack-link:hover {
 color: var(--text-secondary);
}

.nav-links .fullstack-link:hover i {
  transform: translateY(-3px) translateX(2px);
}


.nav-links .github-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--primary-500);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition-base);
}

.nav-links .github-link::after {
  display: none;
}

.nav-links .github-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-600);
  color: white;
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  padding: var(--space-2);
  transition: transform var(--transition-fast);
}

.nav-toggle:hover {
  transform: scale(1.1);
}

/* ===============================
   Hero Section
   =============================== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 168, 107, 0.1) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.1;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 100%);
}

html[data-theme="dark"] .hero-grid {
  opacity: 0.05;
}

/* --- View Toggle Logic --- */
.controls-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.search-sort-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.view-toggle {
  display: flex;
  background: var(--bg-secondary);
  padding: 7px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.view-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: all var(--transition-base);
  margin: 4px;
}

.view-btn:hover {
  color: var(--primary-500);
  background: var(--primary-50);
}

.view-btn.active {
  background: var(--primary-500);
  color: white;
  box-shadow: var(--shadow-sm);
}

.random-project {
  display: flex;
}

.random-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--primary-500);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.random-btn:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.random-btn:active {
  transform: translateY(0);
}

.hero-content {
  max-width: 900px;
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-600);
  margin-bottom: var(--space-6);
}

html[data-theme="dark"] .hero-badge {
  background: rgba(255, 107, 53, 0.2);
  border-color: rgba(255, 107, 53, 0.3);
  color: var(--primary-400);
}

.hero-badge i {
  font-size: 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  letter-spacing: -0.03em;
}

.accent-text {
  color: var(--primary-500);
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.btn-primary {
  background: var(--primary-500);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: var(--primary-600);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-500);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-light);
}

/* ===============================
   Linkshala Badge Button
   =============================== */
.linkshala-badge {
  margin-top: var(--space-8);
  margin-bottom: var(--space-6);
  display: flex;
  justify-content: center;
}

.linkshala-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 24px;
  background: var(--bg-secondary);
  border: 2px solid var(--primary-500);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.linkshala-btn::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.7s;
}

.linkshala-btn:hover::before {
  left: 100%;
}

.linkshala-sparkle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-500);
  border-radius: var(--radius-full);
  color: white;
  font-size: 1rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.linkshala-sparkle i {
  animation: sparkle-rotate 4s linear infinite;
}

@keyframes sparkle-rotate {
  0% {
    transform: rotate(0deg) scale(1);
  }

  25% {
    transform: rotate(10deg) scale(1.1);
  }

  50% {
    transform: rotate(0deg) scale(1);
  }

  75% {
    transform: rotate(-10deg) scale(1.1);
  }

  100% {
    transform: rotate(0deg) scale(1);
  }
}

.linkshala-text {
  position: relative;
  z-index: 1;
  letter-spacing: 0.01em;
}

.linkshala-text strong {
  color: var(--primary-500);
  font-weight: 800;
  font-size: 1.05em;
}

.linkshala-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1rem;
  color: var(--primary-500);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  background: var(--primary-50);
  border-radius: var(--radius-full);
}

/* Hover states */
.linkshala-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.2);
  background: var(--primary-500);
  color: white;
  border-color: var(--primary-500);
}

.linkshala-btn:hover .linkshala-sparkle {
  transform: scale(1.15) rotate(15deg);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
  background: white;
  color: var(--primary-500);
}

.linkshala-btn:hover .linkshala-text strong {
  color: white;
}

.linkshala-btn:hover .linkshala-arrow {
  transform: translateX(3px);
  background: white;
  color: var(--primary-500);
}

/* Active state */
.linkshala-btn:active {
  transform: translateY(-2px);
}

/* Dark mode adjustments */
html[data-theme="dark"] .linkshala-btn {
  background: var(--surface-elevated);
  border-color: var(--primary-500);
}

html[data-theme="dark"] .linkshala-btn:hover {
  background: var(--primary-500);
}

/* Animation delay for linkshala badge */
.fade-up.delay-350 {
  animation-delay: 350ms;
}

/* ===============================
   Section Headers
   =============================== */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-12);
  padding: 0 var(--space-4);
}

.section-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

html[data-theme="dark"] .section-badge {
  background: rgba(255, 107, 53, 0.2);
  color: var(--primary-400);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ===============================
   Projects Section
   =============================== */
.projects-section {
  padding: var(--space-20) var(--space-6);
  background: var(--bg-primary);
}

/* Controls */
.controls-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.search-box,
.sort-box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  transition: all var(--transition-fast);
}

.search-box:focus-within,
.sort-box:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-box i,
.sort-box i {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.search-box input,
.sort-box select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  outline: none;
  min-width: 200px;
}

/* Dark mode select dropdown options */
[data-theme="dark"] select {
  color-scheme: dark;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

[data-theme="dark"] select option {
  background-color: #1e1e1e;
  color: #ffffff;
}

/* Category Filter */
.category-filter {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
  align-items: center;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}

.filter-btn i {
  font-size: 1rem;
}

.filter-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.filter-btn.active {
  background: var(--primary-500);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.filter-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: transparent;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-base);
  cursor: pointer;
}

.filter-clear-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.filter-clear-btn i {
  font-size: 1rem;
}

/* Advanced Filters Row - Below Category Filters */
.advanced-filters {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
  align-items: center;
}

/* Filter Label */
.filter-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--text-default);
  font-size: 0.875rem;
  white-space: nowrap;
}

.filter-label i {
  font-size: 0.9375rem;
  color: var(--primary-500);
}

/* Tech Search Wrapper - Position relative for dropdown */
.tech-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

#tech-search {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 0.8125rem;
  color: var(--text-default);
  width: 120px;
  transition: all var(--transition-base);
}

#tech-search:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-50);
}

#tech-search::placeholder {
  color: var(--text-muted);
}

/* Tech Filter Results - Dropdown */
.tech-filter-results {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  gap: var(--space-2);
  flex-wrap: wrap;
  max-width: 350px;
  box-shadow: var(--shadow-md);
  z-index: 10;
  margin-top: var(--space-2);
  display: none;
}

.tech-filter-results.show {
  display: flex;
}

/* Filter Pills (for difficulty and tech) */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  background: var(--primary-50);
}

.filter-pill.active {
  background: var(--primary-500);
  color: white;
  border-color: var(--primary-500);
  box-shadow: var(--shadow-sm);
}

/* Projects Grid */
.projects-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
  padding: var(--space-4);
}

/* Project Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: var(--primary-500);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card:hover::before {
  opacity: 1;
}

.card-cover {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary-500);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

/* ===============================
   Difficulty Badge
   =============================== */

.card-cover {
  position: relative;
  /* required for badge positioning */
}

.difficulty-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 6;
  box-shadow: var(--shadow-sm);
}

/* Difficulty Variants */
.difficulty-badge.beginner {
  background: #22c55e;
  color: white;
}

.difficulty-badge.intermediate {
  background: #facc15;
  color: #000;
}

.difficulty-badge.advanced {
  background: #ef4444;
  color: white;
}

/* Dark mode safety */
html[data-theme="dark"] .difficulty-badge {
  filter: brightness(1.05);
}

/* ===============================
   Project Analytics Badges
   Feature #1291: Trending & Hidden Gem
   =============================== */

.project-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 10;
  box-shadow: var(--shadow-md);
  animation: badge-pulse 2s ease-in-out infinite;
}

.badge-trending {
  background: linear-gradient(135deg, #ff6b35, #ff8a50);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.badge-hidden-gem {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Adjust badge position for list view */
.list-card .project-badge {
  position: static;
  margin-left: 0.5rem;
  animation: none;
  font-size: 0.65rem;
  padding: 3px 8px;
}

/* Dark mode adjustments */
html[data-theme="dark"] .badge-trending {
  background: linear-gradient(135deg, #ff8a50, #ffab76);
  box-shadow: 0 4px 12px rgba(255, 138, 80, 0.3);
}

html[data-theme="dark"] .badge-hidden-gem {
  background: linear-gradient(135deg, #818cf8, #a5b4fc);
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.3);
}

/* Ensure badge doesn't conflict with card-actions */
.card .project-badge {
  right: 80px; /* Space for action buttons */
}


.card:hover .card-cover {
  background: var(--primary-500);
  color: white;
}

.card-cover i {
  transition: transform var(--transition-spring);
}

.card:hover .card-cover i {
  transform: scale(1.2) rotate(5deg);
}

/* Card Cover Variants - Solid Colors */
.calculator-cover {
  background: #fff3e0;
  color: #ff6b35;
}

.word-memory-game-cover {
  background: #fff8e1;
  color: #ffa726;
}

.tictactoe-cover {
  background: #e3f2fd;
  color: #2196f3;
}

.guess-the-number-cover {
  background: #fce4ec;
  color: #ec407a;
}

.hangman-game-cover {
  background: #f3e5f5;
  color: #9c27b0;
}

.file-upload-preview-cover {
  background: #e8f5e9;
  color: #4caf50;
}

.todo-cover {
  background: #e0f2f1;
  color: #26a69a;
}

.counter-cover {
  background: #fff3e0;
  color: #ff6b35;
}

.quiz-cover {
  background: #f3e5f5;
  color: #9c27b0;
}

.unit-cover {
  background: #e3f2fd;
  color: #2196f3;
}

.clock-cover {
  background: #ffebee;
  color: #f44336;
}

.runner-cover {
  background: #e8f5e9;
  color: #4caf50;
}

.password-cover {
  background: #e3f2fd;
  color: #2196f3;
}

.quote-cover {
  background: #fff3e0;
  color: #ff6b35;
}

.code-editor-cover {
  background: #f3e5f5;
  color: #9c27b0;
}

.password-gen-cover {
  background: #e8f5e9;
  color: #4caf50;
}

.educonnect-cover {
  background: #fff8e1;
  color: #ffa726;
}

.typing-cover {
  background: #e3f2fd;
  color: #2196f3;
}

.weather-cover {
  background: #e0f7fa;
  color: #00bcd4;
}

.palette-cover {
  background: #fce4ec;
  color: #ec407a;
}

.memory-cover {
  background: #fff8e1;
  color: #ffa726;
}

.reflex-cover {
  background: #ffebee;
  color: #f44336;
}

.card-content {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.card-heading {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.category-tag {
  flex-shrink: 0;
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.card-tech {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.card-tech span {
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

/* View Counter Styles */
.card-footer {
  padding-top: var(--space-3);
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.view-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  font-weight: 500;
}

.view-counter:hover {
  color: var(--primary-500);
  background: var(--bg-tertiary);
}

/* Dark mode adjustments */
html[data-theme="dark"] .view-counter {
  color: var(--text-muted);
}

html[data-theme="dark"] .view-counter:hover {
  color: var(--primary-400);
}

/* List view adjustments */
.list-card-meta .view-counter {
  font-size: 0.8rem;
  padding: var(--space-1) var(--space-2);
  border: none;
  margin: 0 var(--space-2);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}

.pagination-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary-500);
  color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pagination-btn.active {
  background: var(--primary-500);
  color: white;
  border-color: transparent;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===============================
   LIST VIEW STYLES
   =============================== */
.projects-list-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
}

.list-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.list-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}

.list-card-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  color: var(--primary-500);
  font-size: 1.5rem;
  transition: all var(--transition-base);
}

.list-card:hover .list-card-icon {
  background: var(--primary-500);
  color: white;
  transform: scale(1.05);
}

.list-card-content {
  flex: 1;
  min-width: 0;
}

.list-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-card-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.list-card-category {
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.list-card-actions {
  display: flex;
  gap: var(--space-2);
}

.list-card-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.list-card-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-500);
  transform: scale(1.1);
}

.list-card-btn.bookmarked {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

/* Dark theme overrides for list view */
html[data-theme="dark"] .list-card-btn {
  background: var(--surface-elevated);
  border-color: var(--border-default);
  color: var(--text-secondary);
}

html[data-theme="dark"] .list-card-btn:hover {
  background: rgba(255, 107, 53, 0.2);
  color: var(--primary-400);
  border-color: var(--primary-400);
}

html[data-theme="dark"] .list-card-btn.bookmarked {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

/* List view responsive */
@media (max-width: 768px) {
  .list-card {
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  .list-card-meta {
    width: 100%;
    justify-content: space-between;
    margin-top: var(--space-2);
  }

  .list-card-content {
    flex: 1 1 calc(100% - 72px);
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--text-muted);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.empty-state p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Error Message */
.error-msg {
  text-align: center;
  padding: var(--space-8);
  color: #ef4444;
  background: #fef2f2;
  border-radius: var(--radius-lg);
  margin: var(--space-4);
}

/* ===============================
   CONTRIBUTE SECTION - IMPROVED
   =============================== */
.contribute-section {
  padding: var(--space-24) var(--space-6);
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.contribute-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.contribute-decoration {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-50) 0%, transparent 70%);
  opacity: 0.3;
  z-index: 0;
}

.contribute-decoration:nth-child(1) {
  top: -200px;
  left: -200px;
}

.contribute-decoration:nth-child(2) {
  bottom: -200px;
  right: -200px;
}

.steps-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  position: relative;
  z-index: 1;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.step-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-300);
}

.step-card:hover::before {
  transform: scaleX(1);
}

.step-number {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-500);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  border-radius: var(--radius-xl);
  color: var(--primary-500);
  font-size: 2rem;
  transition: all var(--transition-base);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.1);
}

.step-card:hover .step-icon {
  background: var(--primary-500);
  color: white;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 32px rgba(255, 107, 53, 0.2);
}

.step-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.step-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.code-block-wrapper {
  margin-top: var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.code-header {
  background: #1a1a1a;
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #333;
}

.code-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-mono);
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 0.875rem;
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.code-copy-btn:hover {
  color: white;
  background: #333;
}

.code-block {
  background: #1a1a1a;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #e8e8e8;
  overflow-x: auto;
}

.code-block code {
  display: block;
  white-space: pre;
}

.code-block .comment {
  color: #6a9955;
}

.code-block .keyword {
  color: #569cd6;
}

.code-block .string {
  color: #ce9178;
}

.code-block .function {
  color: #dcdcaa;
}

.code-block .number {
  color: #b5cea8;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--primary-500);
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  margin-top: var(--space-6);
  border: 2px solid transparent;
}

.cta-button:hover {
  background: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-300);
}

.contribute-highlight {
  text-align: center;
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: var(--primary-50);
  border-radius: var(--radius-xl);
  border: 1px solid var(--primary-200);
  position: relative;
  overflow: hidden;
}

.contribute-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ff6b35' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.3;
}

html[data-theme="dark"] .contribute-highlight {
  background: rgba(255, 107, 53, 0.1);
  border-color: rgba(255, 107, 53, 0.2);
}

.contribute-highlight h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.contribute-highlight p {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===============================
   Contributors Section
   =============================== */
.contributors-section {
  padding: var(--space-20) var(--space-6);
  background: var(--bg-primary);
}

.contributors-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-5);
}

.contributor-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.contributor-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-500);
}

.contributor-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  object-fit: cover;
  border: 3px solid var(--bg-tertiary);
  transition: all var(--transition-base);
}

.contributor-card:hover .contributor-avatar {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

.contributor-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

/* Loading Skeleton */
.loading-skeleton {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-10);
}

.skeleton-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg,
      var(--bg-tertiary) 25%,
      var(--bg-secondary) 50%,
      var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  width: 100px;
  height: 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg,
      var(--bg-tertiary) 25%,
      var(--bg-secondary) 50%,
      var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.loading-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===============================
   Scroll to Top
   =============================== */
#scrollToTopBtn {
  position: fixed;
  bottom: 100px;
  right: var(--space-8);
  width: 48px;
  height: 48px;
  padding: 0;
  overflow: visible;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all var(--transition-base);
  z-index: 9999;
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#scrollToTopBtn:hover {
  transform: translateY(-5px) scale(1.1);
  background: var(--primary-500);
  color: white;
  border-color: var(--primary-500);
  box-shadow: var(--shadow-glow);
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.1s;
  transform-origin: 50% 50%;
  stroke-dasharray: 132;
  stroke-dashoffset: 132;
}

/* ===============================
   Footer
   =============================== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: var(--space-16) var(--space-6);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-logo i {
  font-size: 1.5rem;
  color: var(--primary-500);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===============================
   Responsive Design
   =============================== */
@media (max-width: 1024px) {
  .hero-stats {
    gap: var(--space-6);
  }

  .stat-number {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    padding: var(--space-4);
    gap: 0;
    display: none;
  }

  .nav-links.active {
    display: flex;
    animation: slideDown 0.25s ease;
  }

  .nav-links a {
    width: 100%;
    padding: var(--space-4) var(--space-2);
    border-bottom: 1px solid var(--border-light);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links .github-link {
    justify-content: center;
    margin-top: var(--space-2);
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
    padding: var(--space-12) var(--space-4);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-4);
  }

  .stat-divider {
    display: none;
  }

  .projects-container {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .controls-wrapper {
    flex-direction: column;
  }

  .search-box,
  .sort-box {
    width: 100%;
    max-width: 400px;
  }

  .search-box input {
    width: 100%;
  }

  #scrollToTopBtn {
    bottom: 85px;
    right: var(--space-4);
  }

  .nav-links .theme-icon,
  .nav-links.active .theme-icon {
    transition: transform 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6) !important;
    will-change: transform;
  }

  .nav-links .sun-core,
  .nav-links.active .sun-core {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform;
  }

  .nav-links .sun-rays,
  .nav-links.active .sun-rays {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease !important;
    will-change: transform, opacity;
  }

  .nav-links .moon-bite,
  .nav-links.active .moon-bite {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .card-cover {
    height: 120px;
  }

  .category-filter {
    gap: var(--space-2);
  }

  .filter-btn {
    padding: var(--space-2) var(--space-3);
    font-size: 0.8125rem;
  }

  .filter-btn i {
    display: none;
  }

  .contributors-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
  }

  .contributor-card {
    padding: var(--space-4);
  }

  .contributor-avatar {
    width: 56px;
    height: 56px;
  }

  .step-card {
    padding: var(--space-6);
  }

  .contribute-decoration {
    display: none;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/*            FOOTER             */
/* ============================= */

/* ===============================
   Centered Footer – Clean & Modern
   =============================== */

.footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
  padding: var(--space-16) var(--space-6);
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
}

.centered-footer {
  text-align: center;
}

.footer-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-logo i {
  color: var(--primary-500);
}

.footer-description {
  max-width: 520px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer Navigation */
.footer-nav {
  display: flex;
  gap: var(--space-6);
}

.footer-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
}

.footer-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--primary-500);
  transition: width 0.25s ease;
}

.footer-nav a:hover {
  color: var(--text-primary);
}

.footer-nav a:hover::after {
  width: 100%;
}

/* Social Icons */
.footer-social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
  justify-content: center;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.social-link:hover {
  background: var(--primary-500);
  color: white;
  transform: translateY(-3px);
  border-color: transparent;
}

/* Divider */
.footer-divider {
  margin: var(--space-8) auto;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg,
      transparent,
      var(--primary-500),
      transparent);
}

/* Bottom */
.footer-bottom {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-bottom-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  font-size: 0.9rem;
}

.footer-bottom-links a {
  color: var(--primary-500);
  font-weight: 500;
}

.footer-bottom-links a:hover {
  text-decoration: underline;
}

.heart {
  color: #ff6b35;
  animation: pulse-heart 1.4s infinite;
}

@keyframes pulse-heart {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .footer-nav {
    flex-direction: column;
    gap: var(--space-3);
  }

  .footer-social-links {
    flex-wrap: wrap;
  }
}

/* Empty Icon */
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Team Section */
.team-section {
  padding: var(--space-16) var(--space-6);
  background: var(--bg-primary);
}

.team-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8);
  max-width: 1000px;
  margin: 0 auto;
}

.team-card {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-width: 320px;
  transition: all var(--transition-base);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.team-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 3px solid var(--primary-100);
}

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

.team-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.team-role {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--primary-600);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

html[data-theme="dark"] .team-role {
  color: var(--primary-400);
}

.team-socials {
  display: flex;
  gap: var(--space-3);
}

.team-socials a {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.team-socials a:hover {
  background: var(--primary-500);
  color: white;
  transform: translateY(-2px);
}

/* ===============================
   NAVBAR (ADAPTIVE)
/* Rating Modal */
.rating-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.rating-modal {
  background: var(--modal-bg);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-light);
}

html[data-theme="dark"] .rating-modal {
  background: var(--surface-elevated);
  border-color: var(--border-default);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.rating-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-light);
}

.rating-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.rating-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.rating-modal-body {
  padding: var(--space-6);
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.star {
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.star.selected,
.star:hover {
  color: #ffc107;
}

/* Rating Modal Tabs */
.rating-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.tab-btn {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  border-bottom: 3px solid transparent;
}

.tab-btn.active {
  color: var(--primary-500);
  border-bottom-color: var(--primary-500);
}

.tab-btn:hover {
  color: var(--text-primary);
}

/* Tab Content */
.tab-content {
  display: none;
}

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

/* Current Rating Display */
.current-rating {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.rating-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.rating-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-500);
}

/* Reviews List */
.reviews-list {
  max-height: 400px;
  overflow-y: auto;
}

.no-reviews {
  text-align: center;
  padding: var(--space-4);
  color: var(--text-muted);
  font-style: italic;
}

.review-item {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-light);
  animation: fadeInCard 0.3s ease-out;
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.review-stars {
  display: flex;
  gap: 2px;
}

.review-stars i {
  font-size: 0.85rem;
  color: #ffc107;
}

.review-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.review-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.4;
}

.review-textarea {
  width: 100%;
  min-height: 80px;
  padding: var(--space-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  resize: vertical;
  font-family: inherit;
  margin-bottom: var(--space-4);
  background: var(--surface);
  color: var(--text-primary);
}

html[data-theme="dark"] .review-textarea {
  background: var(--surface-elevated);
  border-color: var(--border-default);
  color: var(--text-primary);
}

html[data-theme="dark"] .review-textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.submit-rating {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--primary-500);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: background var(--transition-fast);
}

.submit-rating:hover {
  background: var(--primary-600);
}

/* Card Rating */
.card-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.stars {
  display: flex;
  gap: 2px;
}

.stars i {
  font-size: 0.875rem;
  color: #ffc107;
}

.rating-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Skeleton Loading */
.skeleton-card {
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(90deg,
      var(--bg-secondary) 25%,
      var(--border-light) 50%,
      var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-title {
  height: 1.5rem;
  width: 70%;
  margin-bottom: var(--space-2);
}

.skeleton-category {
  height: 1rem;
  width: 30%;
}

.skeleton-description {
  height: 1rem;
  width: 100%;
  margin-bottom: var(--space-2);
}

.skeleton-rating {
  height: 1rem;
  width: 40%;
  margin-bottom: var(--space-3);
}

.skeleton-tech {
  height: 0.75rem;
  width: 3rem;
  margin-right: var(--space-2);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Component Skeleton Loading */
.skeleton-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

.skeleton-navbar .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 4rem;
}

.skeleton-navbar .nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skeleton-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.skeleton-text {
  height: 1.5rem;
  width: 8rem;
}

.skeleton-title {
  height: 1.5rem;
  width: 10rem;
}

.skeleton-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.skeleton-nav-link {
  height: 1.2rem;
  width: 4rem;
}

.skeleton-theme {
  height: 2rem;
  width: 4rem;
  border-radius: 2rem;
}

.skeleton-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.skeleton-hero .hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
  z-index: 2;
}

.skeleton-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  margin-bottom: 2rem;
}

.skeleton-hero .hero-title {
  margin-bottom: 1.5rem;
}

.skeleton-title-large {
  height: 4rem;
  width: 20rem;
  margin: 0 auto;
}

.skeleton-hero .hero-subtitle {
  margin-bottom: 2rem;
}

.skeleton-description {
  height: 1.5rem;
  width: 30rem;
  margin: 0 auto;
}

.skeleton-hero .hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.skeleton-btn {
  height: 3rem;
  width: 8rem;
  border-radius: 0.5rem;
}

.skeleton-hero .hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.skeleton-stat {
  text-align: center;
}

.skeleton-stat .skeleton-number {
  height: 2rem;
  width: 3rem;
  margin-bottom: 0.5rem;
}

.skeleton-stat .skeleton-label {
  height: 1rem;
  width: 5rem;
}

/* ===============================
   List View Layout
   =============================== */
.projects-list-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 0 var(--space-4);
}

.list-card {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  background: var(--surface);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.list-card:hover {
  transform: translateX(8px);
  border-color: var(--primary-500);
  box-shadow: var(--shadow-lg);
}

.list-card-icon {
  width: 60px;
  height: 60px;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary-500);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
}

.list-card-content {
  flex: 1;
}

.list-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.list-card-description {
  font-size: 0.9375rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.list-card-category {
  padding: 4px 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.list-card-actions {
  display: flex;
  gap: var(--space-2);
}

.list-card-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.list-card-btn:hover {
  background: var(--primary-500);
  color: white;
}

.list-card-btn.bookmarked {
  color: var(--primary-500);
  background: var(--primary-50);
}

.list-card-btn.bookmarked i {
  color: var(--primary-500);
}

.list-card-btn.bookmarked:hover {
  background: var(--primary-500);
}

.list-card-btn.bookmarked:hover i {
  color: white;
}

/* Mobile Adjustments for List View */
@media (max-width: 768px) {
  .list-card {
    gap: var(--space-4);
    padding: var(--space-4);
  }

  .list-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 1.25rem;
  }

  .list-card-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-2);
  }
}

@media (max-width: 576px) {
  .list-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-card-meta {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    margin-top: var(--space-3);
  }

  .list-card-description {
    white-space: normal;
    align-items: center;
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-light);
  }
}

/* Custom Dropdown Styling */
.sort-box.custom-select-wrapper {
  padding: 0;
  border: none;
  background: transparent;
  display: block;
  min-width: 220px;
  position: relative;
  z-index: 50;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.custom-select-trigger:hover {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--primary-500);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.custom-select-trigger i {
  font-size: 1.125rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.custom-select-trigger .ri-sort-desc {
  color: var(--primary-500);
}

.selected-text {
  flex: 1;
}

.custom-select.open .arrow {
  transform: rotate(180deg);
  color: var(--primary-500);
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-top: none;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-spring);
  overflow: hidden;
}

html[data-theme="dark"] .custom-options {
  background: var(--surface-elevated);
  border-color: var(--border-default);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.6);
}

.custom-select.open .custom-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-option {
  padding: var(--space-3) var(--space-4);
  font-size: 0.9375rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-option:hover {
  color: var(--primary-600);
  background: var(--bg-tertiary);
  padding-left: var(--space-5);
}

html[data-theme="dark"] .custom-option:hover {
  color: var(--primary-400);
  background: var(--bg-tertiary);
}

.custom-option.selected {
  color: var(--primary-600);
  background: var(--primary-50);
  font-weight: 600;
}

html[data-theme="dark"] .custom-option.selected {
  background: rgba(255, 107, 53, 0.2);
  color: var(--primary-400);
}

/* Chatbot Transparency Styles */
.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-controls button {
  background: none;
  border: none;
  color: rgb(139, 69, 19);;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 4px;
  border-radius: 4px;
}

.header-controls button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.chatbot-logic {
  flex: 1;
  padding: 20px;
  background: var(--surface);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.logic-header {
  text-align: center;
  margin-bottom: 20px;
}

.logic-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.logic-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.logic-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

.logic-icon {
  font-size: 1.5rem;
  color: var(--primary-500);
}

.logic-text h4 {
  margin: 0 0 5px;
  color: var(--text-primary);
  font-size: 1rem;
}

.logic-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.logic-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--bg-secondary);
  padding: 15px;
  border-radius: 12px;
  border: 1px dashed var(--border-default);
}

.logic-step {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.logic-step.highlight {
  background: var(--primary-100);
  color: var(--primary-700);
  border-color: var(--primary-300);
  font-weight: 600;
}

html[data-theme="dark"] .logic-step.highlight {
  background: rgba(255, 107, 53, 0.2);
  color: var(--primary-400);
  border-color: var(--primary-600);
}

.logic-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.logic-comparison {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.comp-item {
  flex: 1;
  padding: 10px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.comp-item span {
  font-weight: 600;
  font-size: 0.9rem;
}

.comp-item .bad {
  color: #ff6b35;
}

.comp-item .good {
  color: #00a86b;
}

.comp-item small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.logic-back-btn {
  margin-top: auto;
  width: 100%;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.logic-back-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-500);
}

main
/* =================================================================
   FINAL FIX: High Contrast Buttons (LIGHT MODE ONLY)
   Paste this at the VERY BOTTOM of css/style.css
   (Replace the previous fix with this one)
   ================================================================= */

/* 1. Filter Buttons - ONLY in Light Mode */
[data-theme="light"] .filter-btn,
[data-theme="light"] .category-btn,
[data-theme="light"] .filters button {
  background-color: #f3f4f6 !important;
  /* Light Grey */
  color: #1f2937 !important;
  /* Dark Text */
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Dark Mode Filter Buttons - Better Contrast */
html[data-theme="dark"] .filter-btn,
html[data-theme="dark"] .category-btn,
html[data-theme="dark"] .filters button {
  background-color: var(--surface-elevated) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-default) !important;
  box-shadow: var(--shadow-sm) !important;
}

html[data-theme="dark"] .filter-btn:hover,
html[data-theme="dark"] .category-btn:hover {
  background-color: rgba(255, 107, 53, 0.2) !important;
  color: var(--primary-400) !important;
  border-color: var(--primary-400) !important;
}

html[data-theme="dark"] .filter-btn.active,
html[data-theme="dark"] .category-btn.active {
  background-color: var(--primary-500) !important;
  color: white !important;
  border-color: var(--primary-500) !important;
}

/* 2. Active Filter - ONLY in Light Mode */
[data-theme="light"] .filter-btn.active,
[data-theme="light"] .category-btn.active,
[data-theme="light"] .filter-btn[class*="active"] {
  background-color: #ff6b35 !important;
  color: #ffffff !important;
  border-color: #ff6b35 !important;
  font-weight: 600 !important;
}

/* 3. View Toggle Buttons (Grid/List) - ONLY in Light Mode */
[data-theme="light"] .view-toggle button,
[data-theme="light"] .layout-switcher button {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #e5e7eb !important;
}

/* Dark Mode View Toggle Buttons */
html[data-theme="dark"] .view-btn {
  background: var(--surface-elevated) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-default) !important;
}

html[data-theme="dark"] .view-btn:hover {
  background: rgba(255, 107, 53, 0.2) !important;
  color: var(--primary-400) !important;
  border-color: var(--primary-400) !important;
}

html[data-theme="dark"] .view-btn.active {
  background: var(--primary-500) !important;
  color: white !important;
  border-color: var(--primary-500) !important;
}

/* 4. Search Bar - ONLY in Light Mode */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="search"] {
  background-color: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #d1d5db !important;
}

/* Dark Mode Search Bar */
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"] {
  background-color: var(--surface-elevated) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-default) !important;
}

html[data-theme="dark"] .search-box:focus-within {
  border-color: var(--primary-500) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2) !important;
}

/* Mobile Search Enhancements */
.search-box {
  position: relative;
  min-height: 44px; /* Touch-friendly height */
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  max-height: 200px;
  overflow-y: auto;
}

html[data-theme="dark"] .search-suggestions {
  background: var(--surface-elevated);
  border-color: var(--border-default);
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--border-light);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

html[data-theme="dark"] .suggestion-item:hover {
  background: rgba(255, 107, 53, 0.2);
  color: var(--primary-400);
}

.suggestion-item i {
  font-size: 1rem;
  color: var(--text-muted);
}

.suggestion-item span {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Mobile Responsive Search */
@media (max-width: 768px) {
  .search-box {
    width: 100%;
    max-width: none;
    min-height: 48px; /* Larger touch target on mobile */
  }
  
  .search-box input {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: var(--space-3) var(--space-4);
  }
  
  .search-suggestions {
    max-height: 250px;
  }
  
  .suggestion-item {
    padding: var(--space-4);
    min-height: 48px;
  }
}

/* 5. Theme Toggle Button - ONLY in Light Mode */
[data-theme="light"] .theme-toggle {
  background-color: #f1f5f9 !important;
  border: 2px solid var(--primary-color) !important;
}

.feedback {
  padding: 4rem 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
}

.feedback-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.feedback-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feedback-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
}

html[data-theme="dark"] .feedback-form input,
html[data-theme="dark"] .feedback-form textarea {
  background: var(--surface-elevated);
  border-color: var(--border-default);
  color: var(--text-primary);
}

html[data-theme="dark"] .feedback-form input:focus,
html[data-theme="dark"] .feedback-form textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.feedback-form input:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: var(--primary-500);
}

.feedback-btn {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: none;
  background: #ff6b35;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.feedback-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
  background: #ff5722;
}

/* ===============================
   Persistent Navbar Active Tracking
   =============================== */

/* Navbar Link Active State (Persistent) */
.nav-links a.active {
  color: var(--primary-500);
  font-weight: 600;
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-500);
  border-radius: var(--radius-full);
  transform: none !important;
  animation: none !important;
  opacity: 1 !important;
}

/* Hover state for active links - subtle change */
.nav-links a.active:hover {
  color: var(--primary-600);
}

.nav-links a.active:hover::after {
  background: var(--primary-600);
  height: 3px;
  bottom: -0.5px;
}

/* Dark mode adjustments */
html[data-theme="dark"] .nav-links a.active {
  color: var(--primary-400);
}

html[data-theme="dark"] .nav-links a.active::after {
  background: var(--primary-400);
}

html[data-theme="dark"] .nav-links a.active:hover {
  color: var(--primary-300);
}

html[data-theme="dark"] .nav-links a.active:hover::after {
  background: var(--primary-300);
}

/* Mobile Navbar Active States */
@media (max-width: 768px) {
  .nav-links a.active {
    background: var(--primary-50);
    border-left: 4px solid var(--primary-500);
    padding-left: calc(var(--space-2) - 4px);
    margin-left: -4px;
  }

  /* Remove underline on mobile, use left border instead */
  .nav-links a.active::after {
    display: none;
  }

  .nav-links a.active:hover {
    background: var(--primary-100);
    border-left-color: var(--primary-600);
  }

  html[data-theme="dark"] .nav-links a.active {
    background: rgba(255, 107, 53, 0.15);
    border-left-color: var(--primary-500);
  }

  html[data-theme="dark"] .nav-links a.active:hover {
    background: rgba(255, 107, 53, 0.25);
    border-left-color: var(--primary-400);
  }
}

/* GitHub Link Active State - Different styling */
.nav-links .github-link.active {
  background: var(--primary-600);
  box-shadow: var(--shadow-lg);
  color: white;
  position: relative;
}

.nav-links .github-link.active::after {
  display: none;
  /* No underline for GitHub button */
}

.nav-links .github-link.active:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
  color: white;
}

/* Active state indicators for different pages/sections */
.nav-links a[data-active="home"].active::after,
.nav-links a[href*="#home"].active::after {
  background: linear-gradient(90deg, var(--primary-500), #ff9f43);
}

.nav-links a[data-active="projects"].active::after,
.nav-links a[href*="#projects"].active::after {
  background: linear-gradient(90deg, var(--primary-500), #00a86b);
}

.nav-links a[data-active="contribute"].active::after,
.nav-links a[href*="#contribute"].active::after {
  background: linear-gradient(90deg, var(--primary-500), #ffc107);
}

.nav-links a[data-active="team"].active::after,
.nav-links a[href*="#team"].active::after {
  background: linear-gradient(90deg, var(--primary-500), #9c27b0);
}

/* Ensure underline stays visible at all times */
.nav-links a.active {
  pointer-events: auto;
}

.nav-links a.active:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 4px;
}

/* Add a subtle indicator dot for current page */
.nav-links a.active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -8px;
  width: 6px;
  height: 6px;
  background: var(--primary-500);
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-links a.active:hover::before {
  opacity: 1;
}

/* Remove the indicator dot on mobile */
@media (max-width: 768px) {
  .nav-links a.active::before {
    display: none;
  }
}

/* Special styling for when on exact page vs section */
.nav-links a.exact-active {
  font-weight: 700;
}

.nav-links a.exact-active::after {
  height: 3px;
  background: var(--primary-600);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

html[data-theme="dark"] .nav-links a.exact-active::after {
  background: var(--primary-300);
  box-shadow: 0 2px 8px rgba(255, 138, 101, 0.3);
}

/* Prevent animation interference */
.nav-links a::after {
  transition: width var(--transition-base),
    background-color var(--transition-base),
    height var(--transition-base),
    bottom var(--transition-base);
}

/* Ensure active state persists during scroll */
.navbar.scrolled .nav-links a.active {
  color: var(--primary-500);
}

.navbar.scrolled .nav-links a.active::after {
  opacity: 1;
  visibility: visible;
}

/* Active state for current section during scroll (if using scrollspy) */
.nav-links a.section-active {
  color: var(--primary-500);
  font-weight: 600;
}

.nav-links a.section-active::after {
  width: 100%;
  background: var(--primary-500);
  opacity: 0.7;
}
/* ===============================
   Templates Section
   =============================== */

.templates-section {
  padding: var(--space-20) var(--space-6);
  background: var(--bg-secondary);
}

.template-categories {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.template-filter-btn {
  padding: var(--space-3) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.template-filter-btn:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
  transform: translateY(-2px);
}

.template-filter-btn.active {
  background: var(--primary-500);
  color: white;
  border-color: transparent;
}

.templates-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-6);
  padding: var(--space-4);
}

.template-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-300);
}

.template-card-header {
  padding: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}

.template-icon {
  font-size: 2rem;
  color: var(--primary-500);
}

.template-difficulty {
  font-size: 0.75rem;
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.bg-green-100 { background: #dcfce7; color: #166534; }
.bg-yellow-100 { background: #fef9c3; color: #854d0e; }
.bg-red-100 { background: #fee2e2; color: #991b1b; }

.template-card-body {
  padding: var(--space-5);
  flex: 1;
}

.template-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.template-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.template-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.template-feature {
  font-size: 0.8125rem;
  padding: var(--space-1) var(--space-2);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.template-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.template-tech {
  font-size: 0.8125rem;
  padding: var(--space-1) var(--space-2);
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  color: var(--primary-700);
}

.template-card-footer {
  padding: var(--space-4);
  display: flex;
  gap: var(--space-3);
  border-top: 1px solid var(--border-light);
}

.template-btn {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
}

.template-btn.use-template {
  background: var(--primary-500);
  color: white;
}

.template-btn.use-template:hover {
  background: var(--primary-600);
}

.template-btn.preview-template {
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.template-btn.preview-template:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
}

/* Template Modal */
.template-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
}

.template-modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.template-modal-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.template-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-1);
}

.template-modal-close:hover {
  color: var(--text-primary);
}

.template-modal-body {
  padding: var(--space-5);
}

.template-modal-body ul {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}

.template-modal-body ul li {
  padding: var(--space-2) 0;
  padding-left: var(--space-6);
  position: relative;
  color: var(--text-secondary);
}

.template-modal-body ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-500);
  font-weight: bold;
}

.template-note {
  background: var(--bg-secondary);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.template-note i {
  color: var(--primary-500);
  font-size: 1.125rem;
}

.template-modal-footer {
  padding: var(--space-5);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

.template-modal-btn {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.template-modal-btn.secondary {
  background: var(--surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.template-modal-btn.secondary:hover {
  border-color: var(--primary-500);
  color: var(--primary-600);
}

.template-modal-btn.primary {
  background: var(--primary-500);
  color: white;
}

.template-modal-btn.primary:hover {
  background: var(--primary-600);
}

/* Template Preview */
.template-preview-modal {
  max-width: 700px;
}

.template-preview-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--space-4) 0 var(--space-2);
}

.template-structure {
  background: var(--bg-primary);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

.preview-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.preview-tech-stack span {
  font-size: 0.875rem;
  padding: var(--space-2) var(--space-3);
  background: var(--primary-50);
  border-radius: var(--radius-md);
  color: var(--primary-700);
}

.template-preview-content ul {
  list-style: disc;
  padding-left: var(--space-6);
}

.template-preview-content li {
  color: var(--text-secondary);
  padding: var(--space-1) 0;

/* ===============================
   Centralized Notification System
   =============================== */
.notification-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-notification {
  pointer-events: auto;
  min-width: 300px;
  max-width: 450px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary-500);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification.fade-out {
  transform: translateX(120%);
  opacity: 0;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-content i {
  font-size: 1.5rem;
}

.toast-content span {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 4px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-primary);
}

/* Notification Types */
.toast-notification.success {
  border-left-color: #00a86b;
}

.toast-notification.success i {
  color: #00a86b;
}

.toast-notification.error {
  border-left-color: #f4511e;
}

.toast-notification.error i {
  color: #f4511e;
}

.toast-notification.warning {
  border-left-color: #ffb74d;
}

.toast-notification.warning i {
  color: #ffb74d;
}

.toast-notification.info {
  border-left-color: var(--primary-500);
}

.toast-notification.info i {
  color: var(--primary-500);
}

@media (max-width: 480px) {
  .notification-container {
    top: auto;
    bottom: 24px;
    right: 16px;
    left: 16px;
  }

  .toast-notification {
    min-width: 0;
    width: 100%;
  }
}
