/* ===========================================================
   WARM PASTEL THEME - COMBINED STYLESHEET
   Complete styling for markdown content and UI components
   Dark & Light theme support
   =========================================================== */

/* ==== GOOGLE FONTS ==== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ==== CSS VARIABLES ==== */
:root {
  /* Dark Theme Colors */
  --bg-primary: #1a1418;
  --bg-secondary: rgba(26, 20, 24, 0.95);
  --bg-tertiary: rgba(31, 23, 32, 0.8);
  --bg-gradient: linear-gradient(135deg, #1a1418 0%, #1f1720 50%, #1c1519 100%);
  
  --text-primary: #f0e6e6;
  --text-secondary: #e8d5d5;
  --text-muted: #c4a8a8;
  
  --accent-pink: #f4a6cd;
  --accent-coral: #f7a072;
  --accent-lavender: #c8a8e9;
  --accent-beige: #e6d2a3;
  --accent-mint: #a8d5ba;
  
  --border-color: rgba(244, 166, 205, 0.2);
  --border-color-coral: rgba(247, 160, 114, 0.3);
  --shadow-color: rgba(244, 166, 205, 0.15);
  
  --code-bg: rgba(168, 213, 186, 0.08);
  --code-border: rgba(168, 213, 186, 0.15);
  --blockquote-bg: linear-gradient(135deg, rgba(247, 160, 114, 0.03) 0%, rgba(244, 166, 205, 0.03) 100%);
  --blockquote-border: rgba(247, 160, 114, 0.4);
  
  --table-even: rgba(244, 166, 205, 0.02);
  --table-hover: rgba(247, 160, 114, 0.05);
  --table-header: linear-gradient(135deg, rgba(244, 166, 205, 0.2) 0%, rgba(247, 160, 114, 0.2) 100%);
  
  --copy-btn-bg: rgba(168, 213, 186, 0.1);
  --copy-btn-border: rgba(168, 213, 186, 0.3);
  --copy-btn-hover-bg: rgba(168, 213, 186, 0.2);
  --copy-btn-hover-border: rgba(168, 213, 186, 0.5);
  --copy-btn-copied-bg: rgba(168, 213, 186, 0.3);
  --copy-btn-copied-border: rgba(168, 213, 186, 0.6);
  
  --card-bg: rgba(31, 23, 32, 0.9);
  --card-border: rgba(244, 166, 205, 0.15);
  --card-hover: rgba(247, 160, 114, 0.08);
  
  --shadow: 0 4px 25px var(--shadow-color);
}

/* Light Theme Colors */
:root[data-theme="light"] {
  --bg-primary: #faf7f7;
  --bg-secondary: rgba(250, 247, 247, 0.95);
  --bg-tertiary: rgba(245, 240, 240, 0.9);
  --bg-gradient: linear-gradient(135deg, #faf7f7 0%, #f5f0f0 50%, #f8f5f5 100%);
  
  --text-primary: #2d1b1f;
  --text-secondary: #3d2b2f;
  --text-muted: #6b5b5f;
  
  --accent-pink: #d63384;
  --accent-coral: #fd7e14;
  --accent-lavender: #6f42c1;
  --accent-beige: #b08d57;
  --accent-mint: #20c997;
  
  --border-color: rgba(214, 51, 132, 0.3);
  --border-color-coral: rgba(253, 126, 20, 0.4);
  --shadow-color: rgba(214, 51, 132, 0.12);
  
  --code-bg: rgba(32, 201, 151, 0.1);
  --code-border: rgba(32, 201, 151, 0.25);
  --blockquote-bg: linear-gradient(135deg, rgba(253, 126, 20, 0.05) 0%, rgba(214, 51, 132, 0.05) 100%);
  --blockquote-border: rgba(253, 126, 20, 0.5);
  
  --table-even: rgba(214, 51, 132, 0.03);
  --table-hover: rgba(253, 126, 20, 0.08);
  --table-header: linear-gradient(135deg, rgba(214, 51, 132, 0.15) 0%, rgba(253, 126, 20, 0.15) 100%);
  
  --copy-btn-bg: rgba(32, 201, 151, 0.1);
  --copy-btn-border: rgba(32, 201, 151, 0.3);
  --copy-btn-hover-bg: rgba(32, 201, 151, 0.2);
  --copy-btn-hover-border: rgba(32, 201, 151, 0.5);
  --copy-btn-copied-bg: rgba(32, 201, 151, 0.3);
  --copy-btn-copied-border: rgba(32, 201, 151, 0.6);
  
  --card-bg: #ffffff;
  --card-border: rgba(214, 51, 132, 0.15);
  --card-hover: rgba(253, 126, 20, 0.05);
  
  --shadow: 0 4px 25px var(--shadow-color);
}

/* ==== GLOBAL RESET ==== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==== BASE LAYOUT ==== */
html {
  line-height: 1.6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  color: var(--text-primary);
  background: var(--bg-gradient);
  min-height: 100vh;
  scroll-behavior: smooth;
  transition: all 0.3s ease;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0;
}

body {
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 50px 50px 50px;
  background-color: var(--bg-secondary);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: var(--shadow);
  hyphens: auto;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  position: relative;
  transition: all 0.3s ease;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Main content spacing to prevent header overlap */
main.container,
.container {
  padding-top: 0.5rem;
}

/* Subtle animated background effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(244, 166, 205, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(247, 160, 114, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(200, 168, 233, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  opacity: 1;
  transition: opacity 0.3s ease;
}

:root[data-theme="light"] body::before {
  opacity: 0.5;
}

/* ==== THEME TOGGLE BUTTON ==== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--accent-pink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 15px var(--shadow-color),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 
    0 6px 20px var(--shadow-color),
    0 0 20px var(--shadow-color);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle span {
  pointer-events: none;
  user-select: none;
  display: inline-block;
}

/* ==== TYPOGRAPHY ==== */
p {
  margin: 1.2em 0;
  color: var(--text-secondary);
}

/* Headings with Warm Pastel Styling */
h1, h2, h3, h4, h5, h6 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent-pink);
  text-shadow: 0 0 6px rgba(244, 166, 205, 0.3);
  position: relative;
  transition: color 0.3s ease;
}

h1 {
  font-size: 2.2em;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.4em;
  text-align: center;
  font-weight: 700;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

h2 {
  font-size: 1.7em;
  border-bottom: 1px solid var(--border-color-coral);
  padding-bottom: 0.3em;
  color: var(--accent-coral);
  text-shadow: 0 0 4px rgba(247, 160, 114, 0.3);
}

h3 {
  font-size: 1.4em;
  color: var(--accent-lavender);
  text-shadow: 0 0 3px rgba(200, 168, 233, 0.2);
}

h4 {
  font-size: 1.2em;
  color: var(--accent-beige);
}

h5 {
  font-size: 1.1em;
  color: var(--accent-beige);
}

h6 {
  font-size: 1em;
  color: var(--text-muted);
  text-shadow: none;
}

/* Reduce space between header and first h1 in container */
.container > h1:first-child,
main.container > h1:first-child {
  margin-top: calc(1.6em);
}

/* ==== LINKS ==== */
a {
  color: var(--accent-coral);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-pink));
  transition: width 0.3s ease;
}

a:hover {
  color: var(--accent-pink);
  text-shadow: 0 0 3px rgba(244, 166, 205, 0.4);
}

a:hover::after {
  width: 100%;
}

a:visited {
  color: var(--accent-lavender);
}

/* ==== BUTTONS ==== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  border: 2px solid var(--accent-coral);
  background: rgba(247, 160, 114, 0.15);
  color: var(--accent-coral);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  background: var(--accent-coral);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-color);
  border-color: var(--accent-coral);
}

.btn:hover::after {
  display: none;
}

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

.btn.primary {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  color: var(--bg-primary);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.btn.primary:hover {
  background: var(--accent-coral);
  border-color: var(--accent-coral);
  box-shadow: 0 6px 20px var(--shadow-color);
}

/* ==== IMAGES ==== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 
    0 0 15px var(--shadow-color),
    0 4px 15px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
}

img:hover {
  transform: scale(1.05) translateY(-2px);
  border-color: var(--accent-coral);
  box-shadow: 
    0 0 25px var(--shadow-color),
    0 8px 25px rgba(0, 0, 0, 0.7);
}

figure {
  margin: 1.5em 0;
  text-align: center;
}

figure img {
  margin: 0 auto;
}

figcaption {
  font-style: italic;
  margin-top: 0.8em;
  color: var(--text-muted);
  font-size: 0.9em;
  font-family: 'Inter', sans-serif;
}

/* ==== LISTS ==== */
ul, ol {
  padding-left: 2em;
  margin-top: 1.2em;
  margin-bottom: 1.2em;
}

li > ul, li > ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul {
  list-style: none;
}

ul li::before {
  content: '♥';
  color: var(--accent-coral);
  font-weight: bold;
  position: absolute;
  margin-left: -1.5em;
  text-shadow: 0 0 3px rgba(247, 160, 114, 0.3);
}

ul ul li::before {
  content: '◆';
  color: var(--accent-pink);
}

ul ul ul li::before {
  content: '●';
  color: var(--accent-lavender);
}

ol {
  list-style-type: decimal;
  counter-reset: item;
}

ol li {
  color: var(--text-secondary);
  position: relative;
}

li {
  margin: 0.6em 0;
  color: var(--text-secondary);
}

/* ==== BLOCKQUOTES ==== */
blockquote {
  margin: 1.5em 0 1.5em 2em;
  padding: 1em 1.5em;
  border-left: 4px solid var(--blockquote-border);
  background: var(--blockquote-bg);
  color: var(--text-muted);
  font-style: italic;
  border-radius: 0 8px 8px 0;
  position: relative;
}

blockquote::before {
  content: '"';
  font-size: 4em;
  color: var(--accent-coral);
  opacity: 0.3;
  position: absolute;
  top: -0.2em;
  left: 0.1em;
  font-family: serif;
}

blockquote p {
  margin: 0.5em 0;
  position: relative;
  z-index: 1;
}

/* ==== CODE ==== */
code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--accent-mint);
  background: var(--code-bg);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  border: 1px solid var(--code-border);
  text-shadow: 0 0 3px rgba(168, 213, 186, 0.2);
}

/* Code Blocks with Copy Button */
pre {
  margin: 1.5em 0;
  overflow: auto;
  background: var(--bg-tertiary);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 20px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.85em;
  line-height: 1.4;
  position: relative;
  box-shadow: 
    inset 0 0 20px rgba(168, 213, 186, 0.05),
    0 4px 15px rgba(0, 0, 0, 0.5);
}

pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-mint), transparent);
}

pre code {
  background-color: transparent;
  color: var(--accent-mint);
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: 1em;
}

/* Copy Button Styling */
.code-block-container {
  position: relative;
  margin: 1.5em 0;
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--copy-btn-bg);
  border: 1px solid var(--copy-btn-border);
  color: var(--accent-mint);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 0 3px rgba(168, 213, 186, 0.3);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.copy-button:hover {
  background: var(--copy-btn-hover-bg);
  border-color: var(--copy-btn-hover-border);
  transform: translateY(-1px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 15px var(--shadow-color),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.copy-button:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.copy-button.copied {
  background: var(--copy-btn-copied-bg);
  border-color: var(--copy-btn-copied-border);
  color: var(--accent-mint);
}

.copy-button::before {
  content: '📋';
  font-size: 14px;
}

.copy-button.copied::before {
  content: '✅';
}

.copy-feedback {
  position: absolute;
  top: -30px;
  right: 0;
  background: rgba(168, 213, 186, 0.9);
  color: var(--bg-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 20;
}

:root[data-theme="light"] .copy-feedback {
  background: rgba(32, 201, 151, 0.9);
  color: var(--bg-primary);
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==== TABLES ==== */
table {
  margin: 2em 0;
  border-collapse: collapse;
  width: 100%;
  background: var(--bg-tertiary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
}

th {
  background: var(--table-header);
  color: var(--accent-pink);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-shadow: 0 0 3px rgba(244, 166, 205, 0.3);
}

tr:nth-child(even) {
  background-color: var(--table-even);
}

tr:hover {
  background-color: var(--table-hover);
}

/* ==== HORIZONTAL RULES ==== */
hr {
  height: 0;
  margin: 3em 0;
  border: none;
  border-top: 2px solid transparent;
  background: linear-gradient(90deg, transparent, var(--accent-pink), var(--accent-coral), var(--accent-pink), transparent);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  position: relative;
}

hr::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-pink), var(--accent-coral), var(--accent-pink), transparent);
  filter: blur(2px);
  opacity: 0.7;
}

/* ==== EMPHASIS ==== */
strong {
  font-weight: 600;
  color: var(--accent-beige);
}

em {
  font-style: italic;
  color: var(--accent-coral);
}

/* ==== DEFINITION LISTS ==== */
dt {
  font-weight: 600;
  color: var(--accent-pink);
  margin-top: 1.2em;
  font-family: 'Inter', sans-serif;
}

dd {
  margin-left: 2em;
  margin-bottom: 1em;
  color: var(--text-secondary);
}

/* ==== TOOLBAR ==== */
.toolbar {
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.toolbar input[type="search"]:focus {
  outline: none;
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 3px rgba(247, 160, 114, 0.25);
}

/* ==== FILTERS ==== */
.filters {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg-tertiary);
  padding: 1.5rem 2rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  max-width: 100%;
}

.filters:hover {
  background: var(--bg-secondary);
  box-shadow: 0 6px 25px var(--shadow-color);
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.filters select {
  font-size: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
  width: 100%;
  max-width: 100%;
}

.filters select:hover {
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 3px rgba(247, 160, 114, 0.2);
}

.filters select:focus {
  outline: none;
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(244, 166, 205, 0.25);
}

/* ==== GRID LAYOUT ==== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

/* ==== CARD COMPONENT ==== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  background: var(--card-hover);
  box-shadow: 0 8px 28px var(--shadow-color);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--card-border);
  margin: 0;
  border-radius: 0;
  cursor: default;
}

.card img:hover {
  transform: none;
  border-color: var(--card-border);
  box-shadow: none;
}

.card .pad {
  padding: 1rem;
}

.card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: var(--accent-lavender);
  text-shadow: none;
}

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

.badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.badge {
  background: rgba(244, 166, 205, 0.1);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  color: var(--accent-pink);
  border: 1px solid var(--border-color);
  transition: all 0.25s ease;
}

.badge:hover {
  background: var(--accent-coral);
  color: var(--bg-primary);
}

/* ==== MATH DISPLAY ==== */
.math {
  text-align: center;
  color: var(--accent-mint);
}

/* ==== FOOTNOTES ==== */
.footnotes {
  border-top: 2px solid var(--border-color);
  margin-top: 3em;
  padding-top: 1.5em;
  background: rgba(31, 23, 32, 0.5);
  border-radius: 8px;
  padding: 1.5em;
}

:root[data-theme="light"] .footnotes {
  background: rgba(245, 240, 240, 0.7);
}

.footnotes ol {
  padding-left: 1.5em;
}

.footnote-back {
  text-decoration: none;
  color: var(--accent-coral);
}

/* ==== HEADER STYLING ==== */
#title-block-header {
  text-align: center;
  margin-bottom: 3em;
  padding: 2em;
  background: rgba(244, 166, 205, 0.1);
  border-radius: 12px;
}

:root[data-theme="light"] #title-block-header {
  background: rgba(214, 51, 132, 0.08);
}

.title {
  color: var(--accent-pink);
  text-shadow: 0 0 20px rgba(244, 166, 205, 0.5);
  margin-bottom: 0.5em;
}

.subtitle {
  color: var(--accent-coral);
  font-size: 1.2em;
  font-style: italic;
  margin-bottom: 1em;
}

.author {
  color: var(--accent-lavender);
  font-family: 'Inter', sans-serif;
  margin: 0.3em 0;
}

.date {
  color: var(--text-muted);
  font-size: 0.9em;
  margin-top: 1em;
}

.abstract {
  margin-top: 2em;
  padding: 1.5em;
  background: rgba(247, 160, 114, 0.05);
  border: 1px solid rgba(247, 160, 114, 0.2);
  border-radius: 8px;
}

:root[data-theme="light"] .abstract {
  background: rgba(253, 126, 20, 0.07);
  border: 1px solid rgba(253, 126, 20, 0.25);
}

.abstract-title {
  color: var(--accent-coral);
  font-weight: bold;
  font-family: 'Inter', sans-serif;
  margin-bottom: 1em;
}

/* ==== TABLE OF CONTENTS ==== */
nav#TOC {
  background: var(--bg-tertiary);
  padding: 1.5em;
  border-radius: 8px;
  margin: 2em 0;
  border: 1px solid var(--border-color);
}

nav#TOC h2 {
  color: var(--accent-pink);
  margin-top: 0;
  text-align: center;
}

nav#TOC a {
  color: var(--text-secondary);
}

nav#TOC a:hover {
  color: var(--accent-pink);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 600px) {
  html {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-size: 16px;
    padding: 0;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    margin: 0;
  }
  
  /* Add padding to main content area to prevent header overlap */
  main.container,
  .container {
    padding: 0.5rem 20px 20px 20px;
    margin-top: 0.5rem;
  }
  
  /* Hero section spacing */
  .hero {
    padding: 2rem 0;
  }
  
  h1 {
    font-size: 1.6em;
  }
  
  .theme-toggle {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .toolbar {
    flex-direction: column;
  }
  
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  /* Header sits flush at top with proper spacing below */
  .site-header {
    margin: 0;
    border-radius: 0;
    position: sticky;
    top: 0;
    width: 100%;
  }
  
  .header-content {
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    min-height: 70px;
    padding-right: 1rem;
  }
  
  .brand-name {
    font-size: 1.1rem;
  }
  
  .header-logo {
    height: 50px;
  }
  
  .site-header .theme-toggle {
    right: 3.5rem;
  }
  
  .mobile-menu-toggle {
    right: 1rem;
  }
}

/* ==== PRINT STYLES ==== */
@media print {
  * {
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  html {
    background: white;
    color: black;
  }
  
  body {
    background-color: white !important;
    color: black !important;
    font-size: 12pt;
    box-shadow: none;
  }
  
  body::before {
    display: none;
  }
  
  .theme-toggle,
  .copy-button,
  .copy-feedback {
    display: none !important;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black !important;
    page-break-after: avoid;
  }
  
  a, a:visited {
    color: black !important;
    text-decoration: underline;
  }
  
  img {
    max-width: 100% !important;
    border: 1px solid #ccc !important;
  }
  
  pre, blockquote {
    border: 1px solid #999 !important;
    page-break-inside: avoid;
    background: #f9f9f9 !important;
  }
  
  .card {
    page-break-inside: avoid;
  }
}

/* ==== THEME TRANSITION ENHANCEMENT ==== */
.theme-transition,
.theme-transition * {
  transition: 
    background-color 0.8s ease,
    color 0.8s ease,
    border-color 0.8s ease,
    box-shadow 0.8s ease,
    filter 0.8s ease !important;
}

/* === Dual-handle calorie slider (full width, better spacing) === */
.dual-range {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.range-container {
  position: relative;
  width: 100%;
  height: 50px;
  touch-action: none;
  padding: 0 17px;
  margin-top: 0.5rem;
}

.slider-track {
  position: absolute;
  top: 50%;
  left: 17px;
  right: 17px;
  height: 6px;
  transform: translateY(-50%);
  background: var(--border-color);
  border-radius: 3px;
  z-index: 1;
}

.range-container input[type="range"] {
  position: absolute;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0;
  left: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  z-index: 2;
}

/* Remove default track styling */
.range-container input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 50px;
}

.range-container input[type="range"]::-moz-range-track {
  background: transparent;
  height: 50px;
  border: none;
}

/* --- Thumbs --- */
.range-container input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-coral);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: 0;
}

.range-container input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-coral);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  border: 3px solid #fff;
}

/* Active state */
.range-container input[type="range"]:active::-webkit-slider-thumb {
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 0 4px rgba(247, 160, 114, 0.2);
}

.range-container input[type="range"]:active::-moz-range-thumb {
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 0 4px rgba(247, 160, 114, 0.2);
}

/* --- Value bubbles --- */
.bubble {
  position: absolute;
  top: -1.5rem;
  transform: translateX(-50%);
  background: var(--accent-coral);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  transition: top 0.2s ease, transform 0.2s ease;
  min-width: 36px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Offset overlapping bubbles */
.bubble.offset {
  top: -2.8rem;
}

.bubble::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: var(--accent-coral) transparent transparent transparent;
}

/* --- Responsive touch tweaks --- */
@media (max-width: 768px) {
  .filters {
    padding: 1.2rem 1.5rem;
    gap: 1.8rem;
  }
  
  .range-container {
    height: 50px;
    padding: 0 19px;
  }
  
  .slider-track {
    left: 19px;
    right: 19px;
  }
  
  .range-container input[type="range"] {
    height: 50px;
  }
  
  .range-container input[type="range"]::-webkit-slider-runnable-track,
  .range-container input[type="range"]::-moz-range-track {
    height: 50px;
  }
  
  .range-container input[type="range"]::-webkit-slider-thumb,
  .range-container input[type="range"]::-moz-range-thumb {
    width: 38px;
    height: 38px;
  }
  
  .bubble {
    top: -0.9rem;
    font-size: 0.9rem;
    padding: 5px 11px;
  }
  
  .bubble.offset {
    top: -2.2rem;
  }
  
  /* Adjust body padding for tablets */
  body {
    padding: 0 30px 30px 30px;
  }
  
  /* Content spacing for tablets */
  main.container,
  .container {
    padding-top: 0.5rem;
  }
  
  /* Header margin adjustment for tablets */
  .site-header {
    margin: 0 -30px 0.75rem -30px;
  }
  
  /* Footer margin adjustment for tablets */
  .site-footer {
    margin: 3rem -30px -30px -30px;
  }
}

@media (max-width: 600px) {
  .filters {
    padding: 1rem 1.2rem;
    gap: 2rem;
  }
  
  .bubble {
    top: -1.8rem;
    font-size: 0.85rem;
  }
  
  .bubble.offset {
    top: -3.2rem;
  }
}

/* ==== SLIDER LAYOUT IMPROVEMENTS ==== */

/* Wrap label and slider horizontally */
.filter-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.filter-label {
  flex: 0 0 180px; /* fixed width label on left */
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.filter-control {
  flex: 1; /* slider takes remaining width */
}

/* Ensure range container spans full width */
.range-container {
  width: 100%;
}

/* Mobile-friendly stack */
@media (max-width: 768px) {
  .filter-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .filter-label {
    flex: none;
    width: 100%;
    text-align: center;
  }

  .filter-control {
    width: 100%;
  }
}

/* ==== PROFESSIONAL HEADER ==== */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  margin: 0 -50px 0.75rem -50px;
  box-shadow: 0 2px 10px var(--shadow-color);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  width: auto;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Brand/Logo Section */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.3s ease;
  justify-content: flex-start;
  flex-shrink: 0;
}

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

.brand::after {
  display: none;
}

.header-logo {
  height: 70px;
  width: auto;
  transition: transform 0.3s ease;
}

.brand:hover .header-logo {
  transform: rotate(-5deg);
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-pink);
  font-family: 'Inter', sans-serif;
  text-shadow: 0 0 6px rgba(244, 166, 205, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation Menu */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
}

.nav-links li::before {
  display: none;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  display: block;
}

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

.nav-links a:hover {
  background: rgba(247, 160, 114, 0.1);
  color: var(--accent-coral);
  text-shadow: 0 0 8px rgba(247, 160, 114, 0.4);
}

.nav-links a.active {
  background: rgba(244, 166, 205, 0.15);
  color: var(--accent-pink);
}

/* Theme Toggle in Header */
.site-header .theme-toggle {
  position: static;
  width: 42px;
  height: 42px;
  font-size: 18px;
  flex-shrink: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--accent-coral);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover span {
  background: var(--accent-pink);
}

/* ==== FOOTER MOBILE ENHANCEMENTS ==== */
@media (max-width: 600px) {
  .footer-content {
    padding: 1.5rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-input,
  .newsletter-btn {
    width: 100%;
  }

  .social-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  /* Fix footer margin for mobile - body has no padding */
  .site-footer {
    margin: 3rem 0 0 0;
  }
}

/* ==== MOBILE HEADER FIXES ==== */
@media (max-width: 900px) {
  .site-header {
    margin-left: 0;
    margin-right: 0;
  }
  
  .header-content {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    position: relative;
  }
  
  /* Right side controls container - horizontal layout */
  .site-header .theme-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 4rem;
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .main-nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    z-index: 99;
    box-shadow: 0 4px 10px var(--shadow-color);
  }

  .main-nav.active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    padding: 0 1rem;
  }

  .nav-links a {
    width: 100%;
    padding: 0.8rem 1rem;
  }

  .mobile-menu-toggle {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1rem;
  }

  .brand {
    flex: 0 1 auto;
    max-width: calc(100% - 100px);
    justify-self: flex-start;
    margin-right: auto;
  }
}

/* Additional mobile-specific fixes for <=600px */
@media (max-width: 600px) {
  .site-header {
    margin: 0;
  }
  
  .header-content {
    min-height: 65px;
    padding-right: 1rem;
  }
  
  .site-header .theme-toggle {
    width: 35px;
    height: 35px;
    font-size: 14px;
    right: 3.25rem;
  }
  
  .mobile-menu-toggle {
    right: 0.75rem;
  }
  
  .brand {
    max-width: calc(100% - 90px);
    margin-right: auto;
  }
  
  .brand-name {
    font-size: 1rem;
    white-space: noine-height: 1.2;
  }
  
  .header-logo {
    height: 45px;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .brand {
    max-width: calc(100% - 85px);
  }
  
  .brand-name {
    font-size: 0.9rem;
  }
  
  .header-logo {
    height: 40px;
  }
  
  .site-header .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 13px;
    right: 3rem;
  }
  
  .mobile-menu-toggle {
    right: 0.5rem;
  }
}

/* Mobile Menu Active State */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ==== ENTERPRISE FOOTER ==== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin: 4rem -50px -50px -50px;
  padding: 0;
  box-shadow: 0 -2px 10px var(--shadow-color);
  backdrop-filter: blur(10px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem 2rem;
}

/* Footer Grid Layout */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-pink);
  margin: 0 0 0.5rem 0;
  text-shadow: 0 0 6px rgba(244, 166, 205, 0.3);
  font-family: 'Inter', sans-serif;
}

.footer-section p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links li {
  margin: 0;
}

.footer-links li::before {
  display: none;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-coral);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-coral);
  text-shadow: 0 0 3px rgba(247, 160, 114, 0.4);
  transform: translateX(4px);
}

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

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-item span:first-child {
  font-size: 1.2rem;
  color: var(--accent-coral);
}

.contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--accent-coral);
}

.contact-item a::after {
  display: none;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(247, 160, 114, 0.1);
  border: 1px solid var(--border-color);
  color: var(--accent-coral);
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-link::after {
  display: none;
}

.social-link:hover {
  background: var(--accent-coral);
  color: var(--bg-primary);
  transform: translateY(-3px) rotate(5deg);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.social-link:active {
  transform: translateY(-1px) rotate(5deg);
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.newsletter-input {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent-coral);
  box-shadow: 0 0 0 3px rgba(247, 160, 114, 0.2);
}

.newsletter-input::placeholder {
  color: var(--text-muted);
}

.newsletter-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--accent-coral);
  background: var(--accent-coral);
  color: var(--bg-primary);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.newsletter-btn:hover {
  background: transparent;
  color: var(--accent-coral);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-color);
}

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

/* Footer Bottom Bar */
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-copyright span {
  color: var(--accent-coral);
  font-weight: 600;
}

.footer-legal {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-legal li {
  margin: 0;
}

.footer-legal li::before {
  display: none;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-legal a::after {
  display: none;
}

.footer-legal a:hover {
  color: var(--accent-coral);
}

/* Back to Top Button */
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  background: rgba(244, 166, 205, 0.1);
  border: 1px solid var(--border-color);
  color: var(--accent-pink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.back-to-top::after {
  display: none;
}

.back-to-top:hover {
  background: var(--accent-pink);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

/* Responsive Footer */
@media (max-width: 768px) {
  .site-footer {
    margin: 3rem -20px -20px -20px;
  }
  
  .footer-content {
    padding: 2rem 1.5rem 1rem 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .social-links {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .footer-bottom {
    padding: 1rem;
  }
}

/* ==== RESET FILTERS BUTTON ==== */
.reset-filters {
  display: none;
  margin: 1.5rem auto;
  padding: 0.9rem 1.8rem;
  border-radius: 12px;
  border: 2px solid var(--accent-lavender);
  background: linear-gradient(135deg, rgba(200, 168, 233, 0.15) 0%, rgba(244, 166, 205, 0.15) 100%);
  color: var(--accent-lavender);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 15px rgba(200, 168, 233, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
}

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

.reset-filters:hover {
  background: linear-gradient(135deg, rgba(200, 168, 233, 0.25) 0%, rgba(244, 166, 205, 0.25) 100%);
  border-color: var(--accent-pink);
  color: var(--accent-pink);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(200, 168, 233, 0.4),
    0 0 20px rgba(244, 166, 205, 0.3);
}

.reset-filters:hover::before {
  left: 100%;
}

.reset-filters:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(200, 168, 233, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pulse animation when button appears */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(200, 168, 233, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(200, 168, 233, 0.5);
  }
}

.reset-filters {
  animation: pulse 2s ease-in-out infinite;
}

.reset-filters:hover {
  animation: none;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .reset-filters {
    width: 100%;
    padding: 1rem;
    font-size: 0.95rem;
  }
}/* ==== RECIPE CAROUSELS ==== */
.recipe-carousel-section {
  margin: 0;
}

.recipe-carousel-section h3 {
  margin-bottom: 1.5rem;
  text-align: left;
}

.carousel-container {
  position: relative;
  padding: 0 3.5rem;
}

.carousel-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
  
  /* Hide scrollbar for PC users */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.carousel-scroll::-webkit-scrollbar {
  display: none;
}

.carousel-scroll .card {
  flex: 0 0 280px;
  height: auto;
}

.carousel-loading {
  width: 100%;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Carousel Navigation Buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--accent-coral);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1; /* prevent font descent offsets */
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px var(--shadow-color);
  padding: 0;
}

/* Remove the crooked offset */
.carousel-nav span {
  user-select: none;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0; /* remove -2px offset */
}

/* Adjust hover transform to scale from center properly */
.carousel-nav:hover {
  background: var(--accent-coral);
  color: var(--bg-primary);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.95);
}

/* Left / Right positioning */
.carousel-nav.prev {
  left: 0;
}

.carousel-nav.next {
  right: 0;
}


.carousel-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Tablet and smaller - reduce padding but keep buttons */
@media (max-width: 900px) {
  .carousel-container {
    padding: 0 2.5rem;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 1.75rem;
  }
}

/* Mobile - hide buttons, remove padding, allow thumb scrolling */
@media (max-width: 480px) {
  .carousel-container {
    padding: 0;
  }
  
  /* Hide navigation buttons on mobile - users can swipe */
  .carousel-nav {
    display: none;
  }
  
  .carousel-scroll {
    padding: 1rem 0;
    gap: 1rem;
  }
  
  .carousel-scroll .card {
    flex: 0 0 260px;
  }
}

@media (max-width: 360px) {
  .carousel-scroll .card {
    flex: 0 0 240px;
  }
}

.track .card {
  flex: 0 0 auto;
  width: 240px;
  margin-right: 1rem;
}

/* ==== SEE ALL RECIPES BUTTON ==== */
.see-all-recipes {
  width: 100%;
  margin: 0; /* no gap between carousel and dedication */
}

.see-all-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.5rem 0.75rem; /* thin height */
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
}


/* === LIFE HACKS === */
.lifehack-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.lifehack-card {
  width: 100%;
  max-width: 700px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lifehack-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow-color);
}

.lifehack-card h3 {
  color: var(--accent-coral);
  margin-bottom: 0.8rem;
}

.lifehack-card p {
  color: var(--text-secondary);
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-style: italic;
}