/* Inter Font Family */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
}

/* Font Awesome Local Paths */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("../fonts/fontawesome/fa-solid-900.woff2") format("woff2");
}

@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/fontawesome/fa-regular-400.woff2") format("woff2");
}

@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/fontawesome/fa-brands-400.woff2") format("woff2");
}

/* ============================================
   THEME SYSTEM - Color Schemes
   ============================================ */

/* Light Theme (Default) */
:root,
:root[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --accent-primary: #b5b5b5;
  --accent-secondary: #3f6212;
  --accent-hover: #15803d;
  --border-color: #e5e7eb;
  --border-hover: #d1d5db;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Hero gradient colors */
  --hero-from: #16a34a;
  --hero-via: #3f6212;
  --hero-to: #15803d;
}

/* Dark Theme */
:root[data-theme="dark"] {
  --bg-primary: #1f2937;
  --bg-secondary: #111827;
  --bg-tertiary: #0f172a;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --accent-primary: #9a9a9a;
  --accent-secondary: #84cc16;
  --accent-hover: #16a34a;
  --border-color: #374151;
  --border-hover: #4b5563;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  
  /* Hero gradient colors - darker greens */
  --hero-from: #15803d;
  --hero-via: #166534;
  --hero-to: #14532d;
}

/* Sepia Theme */
:root[data-theme="sepia"] {
  --bg-primary: #f4f1ea;
  --bg-secondary: #e8e3d3;
  --bg-tertiary: #ddd8c8;
  --text-primary: #3e2723;
  --text-secondary: #5d4037;
  --text-tertiary: #795548;
  --accent-primary: #a3a3a3;
  --accent-secondary: #8d6e63;
  --accent-hover: #5d4037;
  --border-color: #d7ccc8;
  --border-hover: #bcaaa4;
  --shadow-sm: 0 1px 2px 0 rgba(62, 39, 35, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(62, 39, 35, 0.15);
  --shadow-lg: 0 10px 15px -3px rgba(62, 39, 35, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(62, 39, 35, 0.25);
  
  /* Hero gradient colors - sepia browns */
  --hero-from: #8d6e63;
  --hero-via: #6d4c41;
  --hero-to: #5d4037;
}

/* Neon Theme (Bright & Bold) */
:root[data-theme="neon"] {
  --bg-primary: #0a0e27;
  --bg-secondary: #1a1f3a;
  --bg-tertiary: #252b4a;
  --text-primary: #ffffff;
  --text-secondary: #e0e7ff;
  --text-tertiary: #c7d2fe;
  --accent-primary: #939393;
  --accent-secondary: #00ffff;
  --accent-hover: #ff00aa;
  --border-color: #4c1d95;
  --border-hover: #7c3aed;
  --shadow-sm: 0 1px 2px 0 rgba(255, 0, 255, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(255, 0, 255, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(255, 0, 255, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(255, 0, 255, 0.6);
  
  /* Hero gradient colors - neon magenta to cyan */
  --hero-from: #ff00ff;
  --hero-via: #7c3aed;
  --hero-to: #00ffff;
}

/* Monochrome Theme (Black & White) */
:root[data-theme="monochrome"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e0e0e0;
  --text-primary: #000000;
  --text-secondary: #424242;
  --text-tertiary: #757575;
  --accent-primary: #212121;
  --accent-secondary: #424242;
  --accent-hover: #000000;
  --border-color: #bdbdbd;
  --border-hover: #9e9e9e;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  
  /* Hero gradient colors - grayscale */
  --hero-from: #424242;
  --hero-via: #212121;
  --hero-to: #000000;
}

/* ============================================
   THEME-AWARE OVERRIDES
   ============================================ */

/* Dark theme specific overrides */
:root[data-theme="dark"] {
  color-scheme: dark;
}

:root[data-theme="dark"] body {
  background-color: var(--bg-secondary);
}

:root[data-theme="dark"] .bg-white {
  background-color: var(--bg-primary) !important;
}

:root[data-theme="dark"] .bg-gray-50 {
  background-color: var(--bg-secondary) !important;
}

:root[data-theme="dark"] .bg-gray-100 {
  background-color: var(--bg-tertiary) !important;
}

:root[data-theme="dark"] .text-gray-900 {
  color: var(--text-primary) !important;
}

:root[data-theme="dark"] .text-gray-700 {
  color: var(--text-secondary) !important;
}

:root[data-theme="dark"] .text-gray-600 {
  color: var(--text-secondary) !important;
}

:root[data-theme="dark"] .text-gray-500 {
  color: var(--text-tertiary) !important;
}

:root[data-theme="dark"] .border-gray-200,
:root[data-theme="dark"] .border-gray-300 {
  border-color: var(--border-color) !important;
}

:root[data-theme="dark"] .shadow-md,
:root[data-theme="dark"] .shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* Neon theme specific overrides */
:root[data-theme="neon"] {
  color-scheme: dark;
}

:root[data-theme="neon"] body {
  background-color: var(--bg-secondary);
}

:root[data-theme="neon"] .bg-white {
  background-color: var(--bg-primary) !important;
}

:root[data-theme="neon"] .bg-gray-50 {
  background-color: var(--bg-secondary) !important;
}

:root[data-theme="neon"] .bg-gray-100 {
  background-color: var(--bg-tertiary) !important;
}

:root[data-theme="neon"] .text-gray-900 {
  color: var(--text-primary) !important;
}

:root[data-theme="neon"] .text-gray-700,
:root[data-theme="neon"] .text-gray-600 {
  color: var(--text-secondary) !important;
}

:root[data-theme="neon"] .text-gray-500 {
  color: var(--text-tertiary) !important;
}

:root[data-theme="neon"] .border-gray-200,
:root[data-theme="neon"] .border-gray-300 {
  border-color: var(--border-color) !important;
}

:root[data-theme="neon"] .shadow-md,
:root[data-theme="neon"] .shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

:root[data-theme="neon"] .text-green-600,
:root[data-theme="neon"] .text-green-700 {
  color: #00ff88 !important;
}

:root[data-theme="neon"] .text-indigo-600,
:root[data-theme="neon"] .text-purple-600 {
  color: var(--accent-primary) !important;
}

:root[data-theme="neon"] .bg-green-600,
:root[data-theme="neon"] .bg-green-700 {
  background-color: #00ff88 !important;
}

:root[data-theme="neon"] .bg-indigo-600,
:root[data-theme="neon"] .bg-purple-600 {
  background-color: var(--accent-primary) !important;
}

:root[data-theme="neon"] .hover\:bg-green-700:hover {
  background-color: #00dd77 !important;
}

:root[data-theme="neon"] .hover\:bg-indigo-700:hover,
:root[data-theme="neon"] .hover\:bg-purple-700:hover {
  background-color: var(--accent-hover) !important;
}

:root[data-theme="neon"] .bg-green-50,
:root[data-theme="neon"] .bg-lime-50,
:root[data-theme="neon"] .bg-emerald-50 {
  background-color: rgba(0, 255, 136, 0.15) !important;
}

:root[data-theme="neon"] .bg-amber-50,
:root[data-theme="neon"] .bg-yellow-50 {
  background-color: rgba(255, 215, 0, 0.15) !important;
}

/* Neon theme - gradient backgrounds for material blocks */
:root[data-theme="neon"] .bg-gradient-to-br.from-amber-50 {
  background-image: linear-gradient(to bottom right, rgba(255, 0, 255, 0.1), rgba(124, 58, 237, 0.1)) !important;
}

:root[data-theme="neon"] .bg-gradient-to-br.from-green-50 {
  background-image: linear-gradient(to bottom right, rgba(0, 255, 136, 0.1), rgba(0, 255, 255, 0.1)) !important;
}

:root[data-theme="neon"] .border-amber-400,
:root[data-theme="neon"] .border-amber-500 {
  border-color: #ffd700 !important;
}

:root[data-theme="neon"] .text-amber-600 {
  color: #ffd700 !important;
}

/* Neon glow effects */
:root[data-theme="neon"] .bg-green-600,
:root[data-theme="neon"] .bg-indigo-600,
:root[data-theme="neon"] .bg-purple-600 {
  box-shadow: 0 0 20px currentColor !important;
}

:root[data-theme="neon"] h1,
:root[data-theme="neon"] h2,
:root[data-theme="neon"] h3 {
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* Monochrome theme specific overrides */
:root[data-theme="monochrome"] body {
  background-color: var(--bg-secondary);
}

:root[data-theme="monochrome"] .bg-white {
  background-color: var(--bg-primary) !important;
}

:root[data-theme="monochrome"] .bg-gray-50 {
  background-color: var(--bg-secondary) !important;
}

:root[data-theme="monochrome"] .bg-gray-100 {
  background-color: var(--bg-tertiary) !important;
}

:root[data-theme="monochrome"] .text-gray-900 {
  color: var(--text-primary) !important;
}

:root[data-theme="monochrome"] .text-gray-700,
:root[data-theme="monochrome"] .text-gray-600 {
  color: var(--text-secondary) !important;
}

:root[data-theme="monochrome"] .text-gray-500 {
  color: var(--text-tertiary) !important;
}

:root[data-theme="monochrome"] .border-gray-200,
:root[data-theme="monochrome"] .border-gray-300 {
  border-color: var(--border-color) !important;
}

:root[data-theme="monochrome"] .text-green-500{
  color: #dadada !important;
}


/* All colored text becomes grayscale */
:root[data-theme="monochrome"] .text-green-600,
:root[data-theme="monochrome"] .text-green-700,
:root[data-theme="monochrome"] .text-indigo-500,
:root[data-theme="monochrome"] .text-indigo-600,
:root[data-theme="monochrome"] .text-purple-500,
:root[data-theme="monochrome"] .text-purple-600,
:root[data-theme="monochrome"] .text-amber-500,
:root[data-theme="monochrome"] .text-amber-600,
:root[data-theme="monochrome"] .text-blue-500,
:root[data-theme="monochrome"] .text-blue-600,
:root[data-theme="monochrome"] .text-red-500,
:root[data-theme="monochrome"] .text-red-600,
:root[data-theme="monochrome"] .text-yellow-500,
:root[data-theme="monochrome"] .text-yellow-600 {
  color: var(--accent-primary) !important;
}

/* All colored backgrounds become grayscale */
:root[data-theme="monochrome"] .bg-green-600,
:root[data-theme="monochrome"] .bg-green-700,
:root[data-theme="monochrome"] .bg-indigo-600,
:root[data-theme="monochrome"] .bg-purple-600,
:root[data-theme="monochrome"] .bg-blue-600,
:root[data-theme="monochrome"] .bg-red-600 {
  background-color: var(--accent-primary) !important;
}

:root[data-theme="monochrome"] .hover\:bg-green-700:hover,
:root[data-theme="monochrome"] .hover\:bg-indigo-700:hover,
:root[data-theme="monochrome"] .hover\:bg-purple-700:hover,
:root[data-theme="monochrome"] .hover\:bg-blue-700:hover {
  background-color: var(--accent-hover) !important;
}

/* All light colored backgrounds become light gray */
:root[data-theme="monochrome"] .bg-green-50,
:root[data-theme="monochrome"] .bg-lime-50,
:root[data-theme="monochrome"] .bg-emerald-50,
:root[data-theme="monochrome"] .bg-amber-50,
:root[data-theme="monochrome"] .bg-yellow-50,
:root[data-theme="monochrome"] .bg-blue-50,
:root[data-theme="monochrome"] .bg-indigo-50,
:root[data-theme="monochrome"] .bg-purple-50,
:root[data-theme="monochrome"] .bg-red-50 {
  background-color: var(--bg-tertiary) !important;
}

/* All colored borders become gray */
:root[data-theme="monochrome"] .border-amber-400,
:root[data-theme="monochrome"] .border-amber-500,
:root[data-theme="monochrome"] .border-green-400,
:root[data-theme="monochrome"] .border-green-500,
:root[data-theme="monochrome"] .border-blue-400,
:root[data-theme="monochrome"] .border-blue-500,
:root[data-theme="monochrome"] .border-indigo-600,
:root[data-theme="monochrome"] .border-purple-600 {
  border-color: var(--border-color) !important;
}

/* Gradients become grayscale */
:root[data-theme="monochrome"] .bg-gradient-to-br,
:root[data-theme="monochrome"] .bg-gradient-to-r {
  background-image: linear-gradient(to bottom right, var(--hero-from), var(--hero-via), var(--hero-to)) !important;
}

:root[data-theme="monochrome"] .bg-gradient-to-br.from-amber-50,
:root[data-theme="monochrome"] .bg-gradient-to-br.from-green-50,
:root[data-theme="monochrome"] .bg-gradient-to-br.from-blue-50 {
  background-image: linear-gradient(to bottom right, #f5f5f5, #e0e0e0) !important;
}

/* Remove all color from icons and decorative elements */
:root[data-theme="monochrome"] .text-green-100,
:root[data-theme="monochrome"] .text-green-200,
:root[data-theme="monochrome"] .text-purple-100,
:root[data-theme="monochrome"] .text-indigo-100,
:root[data-theme="monochrome"] .text-blue-100,
:root[data-theme="monochrome"] .text-amber-100 {
  color: var(--bg-tertiary) !important;
}

/* Hover states in grayscale */
:root[data-theme="monochrome"] .hover\:text-green-600:hover,
:root[data-theme="monochrome"] .hover\:text-green-700:hover,
:root[data-theme="monochrome"] .hover\:text-blue-600:hover {
  color: var(--accent-hover) !important;
}

:root[data-theme="monochrome"] .hover\:bg-green-50:hover,
:root[data-theme="monochrome"] .hover\:bg-blue-50:hover {
  background-color: var(--bg-tertiary) !important;
}

/* Make all images grayscale */
:root[data-theme="monochrome"] img,
:root[data-theme="monochrome"] video,
:root[data-theme="monochrome"] picture {
  filter: grayscale(100%) !important;
}

/* Additional text color overrides for hero sections */
:root[data-theme="monochrome"] .text-green-50,
:root[data-theme="monochrome"] .text-green-100,
:root[data-theme="monochrome"] .text-lime-100,
:root[data-theme="monochrome"] .text-emerald-100,
:root[data-theme="monochrome"] .text-yellow-400,
:root[data-theme="monochrome"] .text-yellow-500,
:root[data-theme="monochrome"] .text-orange-400,
:root[data-theme="monochrome"] .text-orange-500 {
  color: #f5f5f5 !important;
}

/* Yellow/Orange buttons and backgrounds - make them light gray with dark text */
:root[data-theme="monochrome"] .bg-yellow-500,
:root[data-theme="monochrome"] .bg-yellow-600,
:root[data-theme="monochrome"] .bg-orange-500,
:root[data-theme="monochrome"] .bg-orange-600 {
  background-color: #e0e0e0 !important;
  color: #000000 !important;
}

:root[data-theme="monochrome"] .hover\:bg-yellow-600:hover,
:root[data-theme="monochrome"] .hover\:bg-orange-600:hover {
  background-color: #bdbdbd !important;
  color: #000000 !important;
}

/* Border colors for yellow/orange */
:root[data-theme="monochrome"] .border-yellow-500,
:root[data-theme="monochrome"] .border-orange-500 {
  border-color: var(--border-color) !important;
}

/* Sepia theme specific overrides */
:root[data-theme="sepia"] body {
  background-color: var(--bg-secondary);
}

:root[data-theme="sepia"] .bg-white {
  background-color: var(--bg-primary) !important;
}

:root[data-theme="sepia"] .bg-gray-50 {
  background-color: var(--bg-secondary) !important;
}

:root[data-theme="sepia"] .bg-gray-100 {
  background-color: var(--bg-tertiary) !important;
}

:root[data-theme="sepia"] .text-gray-900 {
  color: var(--text-primary) !important;
}

:root[data-theme="sepia"] .text-gray-700 {
  color: var(--text-secondary) !important;
}

:root[data-theme="sepia"] .text-gray-600 {
  color: var(--text-secondary) !important;
}

:root[data-theme="sepia"] .text-gray-500 {
  color: var(--text-tertiary) !important;
}

:root[data-theme="sepia"] .border-gray-200,
:root[data-theme="sepia"] .border-gray-300 {
  border-color: var(--border-color) !important;
}

/* Green color overrides for all themes */
:root[data-theme="dark"] .text-green-500,
:root[data-theme="dark"] .text-green-600,
:root[data-theme="dark"] .text-green-700 {
  color: var(--accent-primary) !important;
}

:root[data-theme="dark"] .bg-green-600,
:root[data-theme="dark"] .bg-green-700 {
  background-color: var(--accent-primary) !important;
}

:root[data-theme="dark"] .hover\:bg-green-700:hover {
  background-color: var(--accent-hover) !important;
}

:root[data-theme="sepia"] .text-green-500,
:root[data-theme="sepia"] .text-green-600,
:root[data-theme="sepia"] .text-green-700 {
  color: var(--accent-primary) !important;
}

:root[data-theme="sepia"] .bg-green-600,
:root[data-theme="sepia"] .bg-green-700 {
  background-color: var(--accent-primary) !important;
}

:root[data-theme="sepia"] .hover\:bg-green-700:hover {
  background-color: var(--accent-hover) !important;
}

/* Indigo/Purple colors for sepia theme */
:root[data-theme="sepia"] .text-indigo-600,
:root[data-theme="sepia"] .text-purple-600 {
  color: var(--accent-primary) !important;
}

:root[data-theme="sepia"] .bg-indigo-600,
:root[data-theme="sepia"] .bg-purple-600 {
  background-color: var(--accent-primary) !important;
}

:root[data-theme="sepia"] .hover\:bg-indigo-700:hover,
:root[data-theme="sepia"] .hover\:bg-purple-700:hover {
  background-color: var(--accent-hover) !important;
}

:root[data-theme="sepia"] .border-indigo-600,
:root[data-theme="sepia"] .border-purple-600 {
  border-color: var(--accent-primary) !important;
}

/* Hero gradient overrides */
:root[data-theme="dark"] .bg-gradient-to-br,
:root[data-theme="sepia"] .bg-gradient-to-br,
:root[data-theme="neon"] .bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--hero-from), var(--hero-via), var(--hero-to)) !important;
}

/* Neon theme - override green gradients with neon colors */
:root[data-theme="neon"] .bg-gradient-to-r,
:root[data-theme="neon"] .from-green-600,
:root[data-theme="neon"] .via-lime-500,
:root[data-theme="neon"] .to-emerald-600 {
  background-image: linear-gradient(to right, #ff00ff, #7c3aed, #00ffff) !important;
}

:root[data-theme="neon"] .from-green-700,
:root[data-theme="neon"] .via-lime-600,
:root[data-theme="neon"] .to-emerald-700 {
  background-image: linear-gradient(to right, #ff00ff, #7c3aed, #00ffff) !important;
}

/* Additional color overrides for better theme support */
:root[data-theme="dark"] .bg-indigo-600,
:root[data-theme="dark"] .bg-purple-600 {
  background-color: var(--accent-primary) !important;
}

:root[data-theme="dark"] .text-indigo-600,
:root[data-theme="dark"] .text-purple-600 {
  color: var(--accent-primary) !important;
}

:root[data-theme="dark"] .hover\:bg-indigo-700:hover,
:root[data-theme="dark"] .hover\:bg-purple-700:hover {
  background-color: var(--accent-hover) !important;
}

:root[data-theme="dark"] .border-indigo-600,
:root[data-theme="dark"] .border-purple-600 {
  border-color: var(--accent-primary) !important;
}

/* Yellow/Amber colors for dark theme */
:root[data-theme="dark"] .bg-yellow-500 {
  background-color: #eab308 !important;
}

:root[data-theme="dark"] .hover\:bg-yellow-600:hover {
  background-color: #ca8a04 !important;
}

:root[data-theme="dark"] .text-yellow-500 {
  color: #eab308 !important;
}

/* Yellow/Amber colors for sepia theme */
:root[data-theme="sepia"] .bg-yellow-500 {
  background-color: #d97706 !important;
}

:root[data-theme="sepia"] .hover\:bg-yellow-600:hover {
  background-color: #b45309 !important;
}

:root[data-theme="sepia"] .text-yellow-500 {
  color: #d97706 !important;
}

/* Green text colors for sepia */
:root[data-theme="sepia"] .text-green-100,
:root[data-theme="sepia"] .text-green-200 {
  color: #e8e3d3 !important;
}

:root[data-theme="sepia"] .text-purple-100,
:root[data-theme="sepia"] .text-indigo-100 {
  color: #e8e3d3 !important;
}

/* Hover states for links */
:root[data-theme="dark"] .hover\:text-green-600:hover,
:root[data-theme="dark"] .hover\:text-green-700:hover {
  color: var(--accent-primary) !important;
}

:root[data-theme="sepia"] .hover\:text-green-600:hover,
:root[data-theme="sepia"] .hover\:text-green-700:hover {
  color: var(--accent-hover) !important;
}

/* Background hover states */
:root[data-theme="dark"] .hover\:bg-green-50:hover {
  background-color: rgba(34, 197, 94, 0.1) !important;
}

:root[data-theme="sepia"] .hover\:bg-green-50:hover {
  background-color: rgba(109, 76, 65, 0.1) !important;
}

/* Card and container backgrounds */
:root[data-theme="dark"] .bg-green-50,
:root[data-theme="dark"] .bg-lime-50,
:root[data-theme="dark"] .bg-emerald-50 {
  background-color: rgba(34, 197, 94, 0.1) !important;
}

:root[data-theme="sepia"] .bg-green-50,
:root[data-theme="sepia"] .bg-lime-50,
:root[data-theme="sepia"] .bg-emerald-50 {
  background-color: rgba(141, 110, 99, 0.15) !important;
}

/* Amber/Yellow backgrounds */
:root[data-theme="dark"] .bg-amber-50,
:root[data-theme="dark"] .bg-yellow-50 {
  background-color: rgba(234, 179, 8, 0.1) !important;
}

:root[data-theme="sepia"] .bg-amber-50,
:root[data-theme="sepia"] .bg-yellow-50 {
  background-color: rgba(217, 119, 6, 0.15) !important;
}

/* Border colors for amber */
:root[data-theme="dark"] .border-amber-400,
:root[data-theme="dark"] .border-amber-500 {
  border-color: #fbbf24 !important;
}

:root[data-theme="sepia"] .border-amber-400,
:root[data-theme="sepia"] .border-amber-500 {
  border-color: #d97706 !important;
}

/* Text colors for amber */
:root[data-theme="dark"] .text-amber-600 {
  color: #fbbf24 !important;
}

:root[data-theme="sepia"] .text-amber-600 {
  color: #d97706 !important;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Font Size Classes */
body.font-small {
  font-size: 14px;
}

body.font-medium {
  font-size: 16px;
}

body.font-large {
  font-size: 18px;
}

/* ============================================
   CUSTOM OVERRIDES FOR TAILWIND
   ============================================ */

/* Override Tailwind colors with theme variables */
.bg-primary {
  background-color: var(--bg-primary) !important;
}

.bg-secondary {
  background-color: var(--bg-secondary) !important;
}

.text-primary {
  color: var(--text-primary) !important;
}

.text-secondary {
  color: var(--text-secondary) !important;
}

.border-custom {
  border-color: var(--border-color) !important;
}

/* Smooth transitions for theme changes */
* {
  transition-property: background-color, border-color, color;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Disable transitions for specific elements */
.no-transition,
.no-transition * {
  transition: none !important;
}

/* ============================================
   SETTINGS DROPDOWN
   ============================================ */

.settings-dropdown {
  position: relative;
  display: inline-block;
}

.settings-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.settings-trigger:hover {
  color: var(--accent-primary);
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  z-index: 1000;
  padding: 1rem;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.dropdown-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

#current-theme-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.theme-options {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: nowrap;
}

.theme-cube {
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
}

.theme-cube:hover {
  transform: translateY(-2px);
}

.theme-cube.active {
  box-shadow: 0 0 0 3px var(--accent-primary);
}

.theme-cube.active::after {
  content: '✓';
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-primary);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.theme-cube-inner {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-cube:hover .theme-cube-inner {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

/* Legacy support for old theme-option class */
.theme-option {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 2px solid transparent;
}

.theme-option:hover {
  background-color: var(--bg-secondary);
}

.theme-option.active {
  background-color: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.theme-option span {
  font-size: 0.875rem;
  white-space: nowrap;
}

.theme-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.font-size-slider {
  width: 100%;
  margin-top: 0.5rem;
}

.material-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.material-toggle label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.material-toggle input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
  .dropdown-menu {
    right: 0;
    left: auto;
    transform: none;
    max-width: calc(100vw - 2rem);
    margin-right: 0.5rem;
  }
  
  /* Ensure dropdown doesn't overflow on very small screens */
  @media (max-width: 360px) {
    .dropdown-menu {
      min-width: 240px;
      font-size: 0.875rem;
    }
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .settings-dropdown,
  .no-print {
    display: none !important;
  }
  
  body {
    background-color: white !important;
    color: black !important;
  }
}


/* ============================================
   DROPDOWN MENU FIX
   ============================================ */

/* Desktop dropdown hover */
.group:hover .group-hover\:opacity-100 {
  opacity: 1 !important;
}

.group:hover .group-hover\:visible {
  visibility: visible !important;
}

/* Ensure dropdown stays visible when hovering over it */
.group .absolute {
  pointer-events: none;
}

.group:hover .absolute,
.group .absolute:hover {
  pointer-events: auto;
}


/* ============================================
   PROSE / MARKDOWN CONTENT STYLING
   ============================================ */

.prose {
  color: var(--text-primary);
  max-width: 85ch;
}

.prose p {
  margin-top: 1.25em;
  /* margin-bottom: 1.25em; */
  text-align: justify;
  text-indent: 2em; /* Красная строка */
  line-height: 1.75;
  /*line-height: 0.5;*/
}


/*Зачем то первый параглаф без отступа, зачем непонятно*/
/* Первый параграф без отступа */
/*
.prose p:first-of-type {
  text-indent: 0;
}
*/

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: 700;
  line-height: 1.25;
  text-indent: 0;
}

.prose h1 {
  font-size: 2.25em;
  margin-top: 0;
}

.prose h2 {
  font-size: 1.875em;
}

.prose h3 {
  font-size: 1.5em;
}

.prose h4 {
  font-size: 1.25em;
}

.prose ul, .prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  text-align: justify;
}

.prose blockquote {
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding-left: 1em;
  border-left: 4px solid var(--accent-primary);
  font-style: italic;
  color: var(--text-secondary);
}

.prose strong {
  font-weight: 600;
  color: var(--text-primary);
}

.prose em {
  font-style: italic;
}

.prose code {
  background-color: var(--bg-secondary);
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background-color: var(--bg-secondary);
  padding: 1em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
}

.prose a {
  color: var(--accent-primary);
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: var(--accent-hover);
}

.prose img {
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.5em;
}

.prose hr {
  margin-top: 3em;
  margin-bottom: 3em;
  border-color: var(--border-color);
}

/* Larger prose variant */
.prose-lg {
  font-size: 1.125rem;
}

.prose-lg p {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

/* Remove text-indent for specific cases */
.prose .no-indent,
.prose li p {
  text-indent: 0;
}
