/* ==========================================
   LOCAL FONTS (100% OFFLINE SUPPORT)
   ========================================== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/inter-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-600.ttf') format('truetype');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-400.ttf') format('truetype');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-500.ttf') format('truetype');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-800.ttf') format('truetype');
}

/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
  --bg-primary: #FAF9F6;
  --bg-card: #FFFFFF;
  --accent: #FF5A36;
  --accent-hover: #E04B27;
  --accent-light: #FFEFEA;
  --text-main: #1A1A1A;
  --text-muted: #626262;
  --border-color: #ECEAE4;
  --border-dark: #1A1A1A;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);

  --card-ratio: 3 / 2;
  /* Dynamic aspect ratio for cards, default to 3:2 */

  /* Logo Badge Colors (Light Mode) */
  --logo-badge-bg: #FFFFFF;
  --logo-badge-border: #ECEAE4;
  --logo-badge-shadow: rgba(0, 0, 0, 0.06);
}


/* Dark Mode Theme Overrides */
body.dark-mode {
  --bg-primary: #121212;
  --bg-card: #1E1E1E;
  --text-main: #F5F5F5;
  --text-muted: #A5A5A5;
  --border-color: #2D2D2D;
  --border-dark: #F5F5F5;
  --accent-light: rgba(255, 90, 54, 0.16);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.6);

  /* Logo Badge Colors (Dark Mode) */
  --logo-badge-bg: #121212;
  --logo-badge-border: #2D2D2D;
  --logo-badge-shadow: rgba(0, 0, 0, 0.4);
}


body.dark-mode .header,
body.dark-mode .header-container,
body.dark-mode .header.scrolled,
body.dark-mode .header.scrolled .header-container {
  background-color: #121212 !important;
  border-bottom-color: #2D2D2D !important;
}

body.dark-mode .btn-mobile-search-toggle,
body.dark-mode .btn-theme-toggle {
  background-color: #1E1E1E !important;
  border-color: #2D2D2D !important;
  color: #F5F5F5 !important;
}

body.dark-mode .search-input-wrapper {
  background: transparent !important;
}

body.dark-mode .search-bar input {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  border-color: #333333 !important;
  border-radius: 99px !important;
}

body.dark-mode .header-container.search-expanded .search-input-wrapper {
  background-color: #1E1E1E !important;
  border-color: #333333 !important;
  border-radius: 12px !important;
}

body.dark-mode .side-nav {
  background-color: #181818;
}

body.dark-mode #shorts-view,
body.dark-mode .shorts-immersive-layout,
body.dark-mode .shorts-immersive-feed {
  background-color: #0A0A0A !important;
}

body.dark-mode .btn-shorts-back {
  background: rgba(30, 30, 30, 0.92);
  color: #FFFFFF;
  border-color: #333333;
}

body.dark-mode .hero-image-container {
  background-color: #1A1A1A;
}

body.dark-mode .gallery-nav-btn {
  background: rgba(30, 30, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: #F5F5F5;
}

body.dark-mode .gallery-nav-btn:hover {
  background: #F5F5F5;
  color: #121212;
}

body.dark-mode .thumb-btn {
  background-color: #2A2A2A;
  border-color: #333333;
}

body.dark-mode .thumb-btn.active {
  border-color: var(--accent);
}

body.dark-mode .recipe-media-container {
  background-color: var(--bg-card);
  border-bottom-color: #2D2D2D;
}

body.dark-mode .recipe-gallery-thumbs {
  background-color: var(--bg-card);
  border-bottom-color: #2D2D2D;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-theme-toggle:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(15deg) scale(1.05);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*,
*:hover,
*:focus,
*:focus-visible,
*:active {
  outline: none !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================
   HEADER
   ========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--border-color);
  transition: all 0.3s ease;
}

.header.scrolled {
  background-color: rgba(250, 249, 246, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.header-container {
  width: 100%;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.header.scrolled .header-container {
  padding: 8px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header-center {
  flex-grow: 1;
  display: flex;
  align-items: center;
  max-width: none;
  margin: 0 16px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.03em;
  color: var(--text-main);
  border: none;
  padding: 0;
  border-radius: 0;
  flex-shrink: 0;
  user-select: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover {
  transform: translateY(-1px) scale(1.02);
}

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--logo-badge-bg);
  border: 1.5px solid var(--logo-badge-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 12px var(--logo-badge-shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.logo:hover .logo-badge {
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 0 6px 18px var(--logo-badge-shadow);
}

.logo-badge .logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}



.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.logo-text .accent-text {
  color: var(--accent);
  font-weight: 800;
}

/* User Avatar */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border-color);
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Right Side */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  flex-grow: 0;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon-header {
  background: transparent;
  border: 1.5px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-header:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

/* Hide collapse cross icon button on desktop */
.btn-collapse-search {
  display: none !important;
}

/* Premium Search Bar */
.search-bar {
  flex-grow: 1 !important;
  width: 100% !important;
  max-width: none !important;
  transition: all 0.3s ease;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s ease;
}

.search-bar input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 48px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.035);
  border: 1.5px solid transparent;
  border-radius: 99px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-bar input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.search-bar input:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.search-bar input:focus {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: none !important;
  outline: none !important;
}

.search-bar input:focus+.search-icon {
  color: var(--accent);
  transform: translateY(-50%) scale(1.05);
}

/* ==========================================
   HAMBURGER MENU TOGGLE BUTTON
   ========================================== */
.btn-menu-toggle {
  background: transparent;
  border: 1.5px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.btn-menu-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

/* ==========================================
   LEFT SIDEBAR NAVIGATION
   ========================================== */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 72px;
  height: 100vh;
  background-color: var(--bg-card);
  border-right: 1.5px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
  z-index: 90;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.side-nav::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.side-nav-header {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

/* Expanded sidebar state */
.side-nav.expanded {
  width: 180px;
  align-items: flex-start;
  padding-left: 16px;
  padding-right: 16px;
}

.side-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  width: 56px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  white-space: nowrap;
  overflow: hidden;
}

/* Expanded item styles */
.side-nav.expanded .side-nav-item {
  flex-direction: row;
  width: 100%;
  gap: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  text-align: left;
}

.side-nav-item:hover {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.03);
}

.side-nav-item.active {
  color: var(--accent);
  background-color: rgba(255, 90, 54, 0.08);
}

.side-nav-item.active svg {
  stroke: var(--accent);
}

/* ==========================================
   MOBILE BOTTOM NAVIGATION
   ========================================== */
.bottom-nav {
  display: none;
  /* Hidden on desktop */
}

/* ==========================================
   LAYOUT CONTAINER
   ========================================== */
.container {
  --container-max-width: 1200px;
  width: auto;
  max-width: var(--container-max-width);
  margin-left: 72px;
  padding: 0 24px;
  box-sizing: border-box;
  transition: margin-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), margin-right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  flex: 1 0 auto;
  margin-bottom: 24px;
}

@media (min-width: 769px) {
  .container {
    margin-left: max(72px, 72px + (100vw - 72px - var(--container-max-width)) / 2);
    margin-right: max(0px, (100vw - 72px - var(--container-max-width)) / 2);
  }
}

/* When sidebar is expanded, push content over */
body.sidebar-expanded .container {
  margin-left: 180px;
}

@media (min-width: 769px) {
  body.sidebar-expanded .container {
    margin-left: max(180px, 180px + (100vw - 180px - var(--container-max-width)) / 2);
    margin-right: max(0px, (100vw - 180px - var(--container-max-width)) / 2);
  }
}

/* Adjust heading sizes when sidebar is expanded */
body.sidebar-expanded h1 {
  font-size: 32px;
}

/* Fluid typography container query handles this automatically */

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 32px;
  align-items: start;
  margin-top: 32px;
}

.primary-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ==========================================
   CARDS (RECIPE DETAILS)
   ========================================== */
.card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

/* Recipe Media Container (Side-by-side gallery layout on desktop) */
.recipe-media-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  /* Spacing between main image and thumbnails */
  padding: 32px 40px;
  background-color: var(--bg-card);
  border-bottom: 1.5px solid var(--border-color);
}

/* Recipe Hero Image Container */
.hero-image-container {
  position: relative;
  flex: 1;
  /* Stretch to fill available width */
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background-color: var(--border-color);
  border-radius: 12px;
  /* Add subtle radius for modern aesthetic */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  /* Premium shadow */
}

.recipe-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.25s ease-in-out;
  opacity: 1;
}

.card:hover .recipe-hero-img {
  transform: scale(1.02);
}

/* Gallery Navigation Arrows */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-image-container:hover .gallery-nav-btn {
  opacity: 1;
}

.gallery-nav-btn:hover {
  background: var(--text-main);
  color: var(--bg-card);
  transform: translateY(-50%) scale(1.05);
}

.prev-btn {
  left: 16px;
}

.next-btn {
  right: 16px;
}

/* Gallery Dots Indicator */
.gallery-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.gallery-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-dots .dot.active {
  background: #FFFFFF;
  transform: scale(1.3);
  width: 14px;
  /* Elongated dot for active state */
  border-radius: 4px;
}

/* Vertical Thumbnails Stack (Desktop default) */
.recipe-gallery-thumbs {
  display: flex;
  flex-direction: column;
  /* Stacked vertically on the right */
  justify-content: center;
  gap: 12px;
  width: auto;
}

.thumb-btn {
  position: relative;
  width: 72px;
  height: 60px;
  /* Increased height */
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background-color: var(--border-color);
  padding: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.thumb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--text-muted);
}

.thumb-btn:hover img {
  transform: scale(1.05);
}

.thumb-btn.active {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.15);
}

.thumb-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.recipe-badges {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 5;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-tag {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* Card Body */
.card-body {
  padding: 32px 40px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--accent);
}

h1 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 18px;
  transition: font-size 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Recipe Meta Grid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-primary);
  overflow: hidden;
  margin-bottom: 32px;
}

.meta-item {
  padding: 16px;
  text-align: center;
  border-right: 1.5px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-item:last-child {
  border-right: none;
}

.meta-item .val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.meta-item .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--text-main);
  color: var(--bg-card);
  border: 1.5px solid var(--text-main);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.02);
}

.btn-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-primary.saved {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.btn-primary.saved .star-icon {
  fill: currentColor;
}

/* Premium Recipe Actions Panel */
.recipe-actions-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: var(--transition);
}

.recipe-actions-panel:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.recipe-actions-panel .main-actions {
  display: flex;
  flex: 1;
  gap: 12px;
}

/* Individual premium action buttons */
.recipe-actions-panel .main-actions .btn {
  flex: 1;
  /* Make all buttons same width */
  min-width: max-content;
  white-space: nowrap !important;
  padding: 12px 16px;
  border-radius: 12px;
  /* Sleeker rounded rectangle rather than pill */
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
}

/* Save button specific */
.recipe-actions-panel #btnSave {
  background: var(--bg-primary);
  color: var(--text-main);
  border-color: var(--border-color);
}

.recipe-actions-panel #btnSave:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--accent-light);
}

.recipe-actions-panel #btnSave.saved {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 6px 20px var(--accent-light);
}

.recipe-actions-panel #btnSave.saved .star-icon {
  fill: var(--accent);
}

/* Share & Like button specific */
.recipe-actions-panel #btnShare,
.recipe-actions-panel #btnLike {
  background: var(--bg-primary);
  color: var(--text-main);
  border-color: var(--border-color);
}

.recipe-actions-panel #btnShare:hover {
  border-color: var(--text-main);
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.recipe-actions-panel #btnLike:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: #FEF2F2;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(239, 68, 68, 0.15);
}

.recipe-actions-panel #btnLike.liked {
  background: #FEE2E2;
  border-color: #EF4444;
  color: #EF4444;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
}

.recipe-actions-panel #btnLike.liked .heart-icon {
  fill: #EF4444;
  animation: heartPulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Divider styling */
.recipe-actions-panel .divider {
  width: 1.5px;
  height: 32px;
  background-color: var(--border-color);
  align-self: center;
}

/* Social media shares container */
.recipe-actions-panel .social-shares {
  display: flex;
  gap: 10px;
}

/* Social Buttons */
.btn-social {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-social svg {
  transition: transform 0.2s ease;
}

.btn-social:hover svg {
  transform: scale(1.15);
}

/* Brand specific styling & hovers */
.btn-pinterest {
  color: #E60023;
  background-color: #FFF0F2;
  border-color: #FFD6DC;
}

.btn-pinterest:hover {
  background-color: #E60023;
  border-color: #E60023;
  color: #FFFFFF;
  box-shadow: 0 6px 15px rgba(230, 0, 35, 0.3);
  transform: translateY(-2px);
}

.btn-facebook {
  color: #1877F2;
  background-color: #EEF5FE;
  border-color: #D2E4FD;
}

.btn-facebook:hover {
  background-color: #1877F2;
  border-color: #1877F2;
  color: #FFFFFF;
  box-shadow: 0 6px 15px rgba(24, 119, 242, 0.3);
  transform: translateY(-2px);
}

.btn-twitter {
  color: #000000;
  background-color: #F3F4F6;
  border-color: #E5E7EB;
}

.btn-twitter:hover {
  background-color: #000000;
  border-color: #000000;
  color: #FFFFFF;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* Icon animations */
.recipe-actions-panel .main-actions .btn svg {
  transition: transform 0.2s ease;
}

.recipe-actions-panel .main-actions .btn:hover svg {
  transform: scale(1.15);
}

/* Heart pop animation */
@keyframes heartPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}

/* Responsive adjustment */
@media (max-width: 768px) {
  .recipe-actions-panel {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px;
    gap: 10px;
    margin-bottom: 24px;
  }

  .recipe-actions-panel .main-actions {
    width: 100%;
    flex: 1 1 100%;
    gap: 10px;
  }

  .recipe-actions-panel .main-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    height: 40px;
    border-radius: 12px;
    font-size: 13px;
  }

  /* Make Like and Share keep their text and normal button styling */
  .recipe-actions-panel .main-actions .btn#btnLike,
  .recipe-actions-panel .main-actions .btn#btnShare {
    width: auto;
    height: 40px;
    min-width: 0;
    border-radius: 12px;
    padding: 10px 8px;
  }

  /* Restore text display on mobile */
  .recipe-actions-panel .main-actions .btn#btnLike .btn-text,
  .recipe-actions-panel .main-actions .btn#btnShare .btn-text {
    display: inline;
  }

  /* Hide the word "recipe" in "Save recipe" to save a little space */
  .recipe-actions-panel .hide-mobile {
    display: none;
  }

  /* Hide the divider and social sharing shortcuts on mobile */
  .recipe-actions-panel .divider,
  .recipe-actions-panel .social-shares {
    display: none;
  }
}

/* ==========================================
   STICKY NAVIGATION TABS
   ========================================== */
.jumpnav-wrap {
  position: sticky;
  top: 73px;
  z-index: 80;
  background-color: var(--bg-card);
  border-top: 1.5px solid var(--border-color);
  border-bottom: 1.5px solid var(--border-color);
  width: 100%;
  overflow: hidden;
  /* Force container boundaries to prevent horizontal page scaling */
}

.jumpnav {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Smooth momentum scrolling on mobile */
  scrollbar-width: none;
  /* Firefox */
  position: relative;
}

.jumpnav::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.jumpnav a {
  flex: 1;
  justify-content: center;
  padding: 18px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: var(--transition);
}

.jumpnav a:hover {
  color: var(--text-main);
}

.jumpnav a .idx {
  font-size: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.jumpnav a:hover .idx,
.jumpnav a.active .idx {
  border-color: var(--text-main);
  background-color: var(--text-main);
  color: var(--bg-card);
}

.jumpnav a.active {
  color: var(--text-main);
}

/* Tab indicator line */
.jumpnav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 3px;
  background-color: var(--text-main);
  transition: var(--transition);
  left: auto;
}


/* ==========================================
   RECIPE SECTIONS
   ========================================== */
.recipe-sections {
  padding-top: 8px;
}

section.block {
  padding: 36px 0;
  border-bottom: 1.5px dashed var(--border-color);
  scroll-margin-top: 135px;
  /* Offset for header + tabs */
}

section.block:last-of-type {
  border-bottom: none;
}

section.block h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

section.block h2 .sec-num {
  font-family: var(--font-mono);
  font-size: 13px;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--text-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  margin-bottom: 0;
}

/* Serving Tag & Badges */
.serving-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 4px;
  background-color: var(--bg-primary);
}

/* Overview Text */
.overview-text {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 68ch;
}

/* Simple Ingredients List */
.ingredients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: none;
  border-radius: 0;
  overflow: visible;
  padding: 0;
}

.ingredients-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-main);
  border-bottom: 1.5px dashed var(--border-color);
  transition: var(--transition);
}

.ingredients-list li:last-child {
  border-bottom: none;
}

.ingredient-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ingredient-bullet {
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.qty {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Instructions Steps */
.steps-list {
  display: flex;
  flex-direction: column;
}

.step-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1.5px dashed var(--border-color);
}

.step-item:first-child {
  padding-top: 8px;
}

.step-item:last-child {
  border-bottom: none;
  padding-bottom: 8px;
}

.step-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 90, 54, 0.15);
}

.step-content p {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 8px;
}

.step-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background-color: var(--accent-light);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Nutrition section */
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.nutrition-card {
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}

.nutrition-card .value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.nutrition-card .label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 4px;
  display: block;
}

.nutrition-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.bar-name {
  color: var(--text-muted);
}

.bar-track {
  height: 10px;
  background-color: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--text-main);
  border-radius: 99px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-percentage {
  text-align: right;
  color: var(--text-main);
}

/* Tips Section - Premium Minimalistic Layout */
.tips-list-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 12px;
}

.tip-item-text {
  padding-left: 16px;
  border-left: 2px solid var(--border-color);
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tip-item-text:hover {
  border-left-color: var(--accent);
  /* Brand accent highlights on hover */
}

.tip-item-text h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 6px;
}

.tip-item-text p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.bottom-feed-wrapper {
  margin-top: 48px;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-dark);
  padding-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
  /* ensures responsiveness on tablet/mobile */
}

.feed-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ratio-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ratio-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.ratio-buttons {
  display: flex;
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.btn-ratio {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.btn-ratio:hover {
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.03);
}

.btn-ratio.active {
  color: var(--bg-card);
  background-color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feed-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.feed-subtitle-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Unified Pins Grid */
.pins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}



/* Individual Pin Design */
.pin {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  container-type: inline-size;
}

.pin:hover {
  transform: none;
}

.pin-img-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--border-color);
  aspect-ratio: var(--card-ratio);
  /* Dynamic aspect ratio synced with controls */
}

.pin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.pin-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.pin-tag {
  font-family: var(--font-mono);
  font-size: clamp(10px, 3.5cqw, 14px);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.pin-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 5.5cqw, 22px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  /* Show full text without truncation */
  display: block;
  overflow: visible;
  height: auto;
  transition: font-size 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.25s ease;
}

.pin-meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: clamp(11px, 4cqw, 16px);
  color: var(--text-muted);
}

.pin-saves {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pin-saves.liked {
  color: #EF4444;
}

.pin-saves svg {
  color: var(--accent);
  fill: var(--accent);
}

.pin-saves.liked svg {
  color: #EF4444;
  fill: #EF4444;
}

/* ==========================================
   SIDEBAR (DESKTOP MODE)
   ========================================== */
.sidebar-layout {
  width: 100%;
  align-self: stretch;
  /* Stretch sidebar layout to the full height of the row */
}

.sidebar {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-sticky-wrapper {
  height: 100%;
  /* Enable height boundary for child sticky widgets to slide */
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sidebar Info Widgets */
.sidebar-widget {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.sidebar-widget:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-color);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 8px;
  transition: var(--transition);
}

.sidebar-widget:hover .widget-title {
  border-color: var(--border-dark);
}

/* Author Widget Details */
.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  background-color: var(--accent);
  color: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  user-select: none;
}

.author-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-main);
  display: block;
}

.author-title {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.author-bio {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Kitchen Tools List */
.tools-list {
  list-style: none;
}

.tools-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.tools-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tool-icon {
  color: var(--accent);
  flex-shrink: 0;
}

/* Dietary Tag Pills */
.dietary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diet-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  transition: var(--transition);
}

.diet-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-light);
}

/* ==========================================
   MORE VISUALS — 2×2 PIN GRID (SIDEBAR)
   ========================================== */
.visuals-widget {
  position: sticky;
  top: 80px;
  z-index: 10;
  padding: 12px;
  /* Reduced from 24px to give recipe cards more horizontal space */
}

.visuals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  /* Reduced from 12px */
}

/* Compact overrides for pin cards inside the sidebar */
.visuals-grid .pin-info {
  padding: 8px;
  /* Reduced from 10px */
  gap: 4px;
}

.visuals-grid .pin-title {
  font-size: 12px !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: auto;
}

.visuals-grid .pin-tag {
  font-size: 9px !important;
}

.visuals-grid .pin-meta {
  font-size: 10px !important;
  padding-top: 6px;
}

/* Collapsible Recipe Content Toggle */
.collapsible-recipe-content {
  display: none;
}

.recipe-detail.expanded .collapsible-recipe-content {
  display: block;
}

.recipe-detail.expanded .expand-btn-wrapper {
  display: none;
}

.expand-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.btn-expand {
  width: auto;
  background-color: var(--bg-primary);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: 99px;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-expand:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-light);
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.12);
}

.btn-expand .chevron-icon {
  transition: transform 0.3s ease;
}

.recipe-detail.expanded .btn-expand .chevron-icon {
  transform: rotate(180deg);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  margin-top: 64px;
  padding: 32px 0;
  border-top: 1.5px solid var(--border-color);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ==========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */

/* Tablet view styling */
@media (max-width: 1100px) {
  .header-nav {
    display: none;
    /* Hide navigation links to fit logo and search bar properly */
  }

  .recipe-media-container {
    flex-direction: column;
    gap: 16px;
  }

  .recipe-gallery-thumbs {
    flex-direction: row;
    gap: 10px;
    width: 100%;
  }

  .main-layout {
    grid-template-columns: 1fr;
    /* Sidebar drops below main content */
    gap: 40px;
  }

  .sidebar-layout {
    border-top: 1.5px solid var(--border-color);
    padding-top: 32px;
  }

  .sidebar-sticky-wrapper {
    position: static;
  }

  .bottom-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Small screens: Mobile view */
@media (max-width: 768px) {

  /* MOBILE 100% WIDTH REQUIREMENT
     Remove left and right padding to occupy full width edge-to-edge. */
  .container {
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    /* Remove sidebar offset on mobile */
  }

  /* Show hamburger button on mobile */
  .btn-menu-toggle {
    display: flex !important;
  }

  /* Slide-in sidebar drawer on mobile */
  .side-nav,
  .side-nav.expanded,
  body.sidebar-expanded .side-nav {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px !important;
    max-width: 85vw;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 1050;
    flex-direction: column;
    align-items: stretch !important;
    padding: 0 !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .side-nav {
    transform: translateX(-100%);
  }

  /* When sidebar is expanded/open on mobile */
  .side-nav.expanded,
  body.sidebar-expanded .side-nav {
    transform: translateX(0);
  }

  /* Mobile sidebar top header */
  .side-nav-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 64px;
    padding: 0 16px 0 20px;
    border-bottom: 1.5px solid var(--border-color);
    margin-bottom: 8px;
    flex-shrink: 0;
  }

  .side-nav-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .side-nav-header .logo-text {
    display: inline-block !important;
    font-size: 18px;
  }

  .btn-close-sidebar {
    margin-left: auto;
    background: transparent;
    border: 1.5px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
  }

  .btn-close-sidebar:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: var(--accent-light);
  }

  /* Mobile item layout inside drawer */
  .side-nav-item,
  .side-nav.expanded .side-nav-item {
    flex-direction: row;
    width: 100%;
    gap: 14px;
    padding: 14px 20px;
    font-size: 15px;
    text-align: left;
    border-radius: 0;
  }

  /* Backdrop overlay for mobile drawer */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-backdrop.active,
  body.sidebar-expanded .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }



  /* Disable header scroll animations on mobile for crisp, clear scrolling */
  .header,
  .header-container,
  .header.scrolled,
  .header.scrolled .header-container {
    transition: none !important;
    animation: none !important;
    background-color: var(--bg-primary) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    margin-left: 0;
  }

  .header-container {
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }

  .btn-menu-toggle {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .logo {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .logo-badge {
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
  }

  .logo-text {
    display: inline-block !important;
    font-size: 19px !important;
    font-family: var(--font-display) !important;
    font-weight: 800 !important;
  }

  .header-center {
    display: none !important;
  }

  .btn-collapse-search {
    display: none;
  }

  /* Expanding Header Search Bar on Mobile */
  .header-container.search-expanded .header-left,
  .header-container.search-expanded .header-right {
    display: none !important;
  }

  .header-container.search-expanded .header-center {
    display: flex !important;
    width: 100% !important;
    flex-grow: 1 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .header-container.search-expanded .search-bar {
    display: flex !important;
    width: 100% !important;
    flex-grow: 1 !important;
  }

  .header-container.search-expanded .search-input-wrapper {
    display: flex !important;
    width: 100% !important;
    height: 44px !important;
    border-radius: 14px !important;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-color) !important;
    padding: 0 10px 0 14px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
  }

  .header-container.search-expanded .search-input-wrapper input {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 16px !important;
    background: transparent !important;
    color: var(--text-main) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
  }

  .header-container.search-expanded .btn-collapse-search {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
  }

  .header-container.search-expanded .btn-collapse-search:hover {
    color: var(--accent);
  }

  .header-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  .btn-mobile-search-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: var(--transition) !important;
  }

  .user-avatar,
  .avatar-img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 11px !important;
  }

  .main-layout {
    margin-top: 0;
    gap: 0;
  }

  /* Make cards occupy full width on mobile with no border/radius for bleed effect */
  .card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .recipe-media-container {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-bottom: none;
  }

  .gallery-nav-btn {
    opacity: 1;
    /* Always show navigation arrows on touch screens */
    width: 36px;
    height: 36px;
  }

  .prev-btn {
    left: 10px;
  }

  .next-btn {
    right: 10px;
  }

  .recipe-gallery-thumbs {
    display: flex;
    flex-direction: row;
    /* Horizontal on mobile */
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: var(--bg-card);
    border-bottom: 1.5px solid var(--border-color);
    margin-top: 0;
    width: 100%;
  }

  .thumb-btn {
    width: 60px;
    height: 50px;
    border-radius: 6px;
  }

  .hero-image-container {
    border-radius: 0;
    aspect-ratio: 3 / 2;
    width: 100%;
    max-width: none;
    height: auto;
  }

  .card-body {
    padding: 24px 16px;
  }

  h1 {
    font-size: 21px;
    line-height: 1.25;
    margin-bottom: 14px;
  }

  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
    border-radius: 8px;
    margin-bottom: 24px;
  }

  /* Adjust border rules for 2x2 layout */
  .meta-item:nth-child(2n) {
    border-right: none;
  }

  .meta-item:nth-child(3),
  .meta-item:nth-child(4) {
    border-top: 1.5px solid var(--border-color);
  }

  .jumpnav-wrap {
    position: relative;
    /* Disable sticky navigation on mobile to save vertical screen space */
    top: auto;
    width: 100%;
    overflow: hidden;
  }

  .jumpnav {
    flex-wrap: wrap;
    /* Show exactly 2 items per line */
    overflow-x: visible;
  }

  .jumpnav a {
    flex: 0 0 50%;
    /* Make each option occupy exactly 50% width */
    padding: 12px 8px;
    font-size: 11px;
    justify-content: center;
    border-bottom: 1.5px solid var(--border-color);
    border-right: 1.5px solid var(--border-color);
    text-align: center;
  }

  .jumpnav a:nth-of-type(2n) {
    border-right: none;
    /* Remove right border for second column items */
  }

  .jumpnav a:nth-of-type(5) {
    flex: 0 0 100%;
    /* Spans full width for Tips (the 5th option) */
    border-right: none;
    border-bottom: none;
  }

  .jumpnav .progress-bar {
    display: none;
    /* Hide progress bar on mobile as tabs wrap on rows */
  }

  section.block {
    padding: 24px 0;
  }

  /* Ingredients mobile view */
  .ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .ingredients-list li {
    padding: 8px 0;
  }

  /* Nutrition mobile grid */
  .nutrition-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Tips mobile grid */
  .tips-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Feed container adjustments on mobile */
  .sidebar-layout {
    padding: 32px 16px;
  }

  .bottom-feed-wrapper {
    padding: 12px 16px 32px 16px;
    margin-top: 0;
  }

  .explore-feed-section {
    padding: 24px 16px 0 16px;
  }

  .pin-info {
    padding: 12px;
  }

  .pin-title {
    font-size: 14px;
  }

  .ratio-label {
    display: none;
    /* Hide Card Ratio: label on mobile */
  }

  .sidebar {
    position: static;
    width: 100%;
    margin-top: 28px;
    padding: 0 16px 32px 16px;
    box-sizing: border-box;
  }

  /* Profile panel mobile spacing */
  .profile-header-card {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
  .profile-tabs-wrapper {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }
  .profile-feed-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ==========================================
   SMALL DESKTOP & TABLET OPTIMIZATIONS
   ========================================== */

/* Small Desktop Layout Adjustments (769px - 1366px) */
@media (max-width: 1366px) and (min-width: 769px) {
  .container {
    --container-max-width: 1140px;
    padding: 0 20px;
  }
  .main-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 20px;
  }
}

/* Jumpnav Navigation Tabs Adaptability */
@media (max-width: 1300px) and (min-width: 769px) {
  .jumpnav a {
    padding: 18px 12px;
    font-size: 11px;
    gap: 6px;
  }
}

/* Sidebar Visuals Grid - Tablet (768px - 1100px) */
@media (max-width: 1100px) {
  .visuals-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

/* Sidebar Visuals Grid - Mobile */
@media (max-width: 768px) {
  .visuals-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Heading & Typography Scaling */
@media (max-width: 1200px) and (min-width: 769px) {
  h1 {
    font-size: 34px;
  }

  .meta-item {
    padding: 12px 8px;
  }

  .meta-item .val {
    font-size: 18px;
  }
}

/* Active Video segment tabs */
.active-video-tab {
  background-color: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

/* ==========================================
   EXPLORE FEED & DUAL VIEW STYLES
   ========================================== */

/* Fade-in Animation for Switching Views */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.view-container {
  animation: fadeInScale 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

#details-view {
  animation: none !important;
}

/* Explore Hero Banner */
.explore-hero {
  background: linear-gradient(135deg, #FFEFEA 0%, #FFF8F6 50%, #FAF9F6 100%);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 48px 40px;
  margin-top: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.explore-hero::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 90, 54, 0.06) 0%, rgba(255, 90, 54, 0) 70%);
  pointer-events: none;
}

.explore-hero .hero-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  display: inline-block;
}

.explore-hero h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.explore-hero p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 60ch;
}

/* Category Chips */
.category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  margin-top: 28px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.category-chips::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.chip {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  padding: 10px 22px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  user-select: none;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-light);
  transform: translateY(-1px);
}

.chip.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg-card);
  box-shadow: 0 4px 14px rgba(255, 90, 54, 0.25);
}

/* Explore Grid & Bottom Feed */
.explore-grid,
.bottom-feed {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
  width: 100%;
}

.explore-grid .pin {
  animation: fadeInScale 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

/* Add custom pin badging for saved state */
.pin-img-wrapper .pin-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 2;
}

/* Details Page Back Navigation Row */
.details-back-nav {
  margin-top: 24px;
  margin-bottom: 8px;
}

.btn-back {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-main) !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.btn-back:hover {
  border-color: var(--text-main) !important;
  background-color: rgba(0, 0, 0, 0.02) !important;
  box-shadow: var(--shadow-hover);
}

.btn-back svg {
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-back:hover svg {
  transform: translateX(-4px);
}

/* Dynamic container state toggling overrides */
.no-results-wide {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  border: 1.5px dashed var(--border-color);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  background-color: var(--bg-card);
  box-shadow: var(--shadow);
}

.explore-feed-section {
  padding-top: 32px;
}

/* Responsive Grid Columns adjustments */
@media (max-width: 1200px) {

  .explore-grid,
  .bottom-feed {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {

  .explore-grid,
  .bottom-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .explore-hero {
    padding: 36px 28px;
  }

  .explore-hero h2 {
    font-size: 30px;
  }
}

@media (max-width: 768px) {

  .explore-grid,
  .bottom-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .explore-hero {
    padding: 24px 20px;
    margin: 16px 16px 24px 16px;
  }

  .explore-hero h2 {
    font-size: 24px;
  }

  .explore-hero p {
    font-size: 14px;
  }

  .chip {
    padding: 8px 16px;
    font-size: 12.5px;
  }
}

@media (max-width: 480px) {

  .explore-grid,
  .bottom-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ==========================================
   FEATURED CHEF COLLECTIONS SECTION
   ========================================== */

.collections-section {
  margin-top: 24px;
  margin-bottom: 32px;
}

.collections-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  width: 100%;
  padding: 4px 0 16px 0;
}

@media (max-width: 1200px) {
  .collections-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .collections-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.collection-card {
  width: 100%;
  height: 130px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
  background-color: var(--bg-card);
}


.collection-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
}

.collection-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.collection-card:hover .collection-img {
  transform: scale(1.08);
}

.collection-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  color: #ffffff;
}

.collection-badge {
  align-self: flex-start;
  background: rgba(255, 90, 54, 0.9);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 6px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.collection-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.collection-subtitle {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.shorts-section {
  margin-top: 32px;
  padding: 0;
  margin-bottom: 24px;
}

.shorts-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 12px 2px;
  width: 100%;
}

.shorts-container::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}


.short-card {
  flex: 0 0 170px !important;
  width: 170px !important;
  height: 302.22px !important;
  aspect-ratio: 9 / 16 !important;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  background-color: #000;
}

.short-card:hover {
  transform: none;
  box-shadow: none !important;
}

.short-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}



.short-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  color: #ffffff;
  z-index: 2;
}

.short-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.short-views {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.short-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.3);
  z-index: 3;
}

.short-play-btn svg {
  fill: currentColor;
  margin-left: 3px;
  /* Center play triangle */
}



/* Shorts Modal Player */
.shorts-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1100;
  /* Higher than header sticky elements */
  display: none;
  align-items: center;
  justify-content: center;
}

.shorts-modal.visible {
  display: flex;
}

.shorts-modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.shorts-modal-content {
  position: relative;
  width: 360px;
  height: 640px;
  max-width: 95vw;
  max-height: 90vh;
  background-color: #000000;
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  z-index: 10;
  animation: modalEnter 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.shorts-video-wrapper {
  flex-grow: 1;
  position: relative;
  width: 100%;
  height: calc(100% - 64px);
}

.shorts-video-wrapper iframe,
.shorts-modal-img {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}

.shorts-modal-title {
  padding: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  font-size: 15px;
  background-color: #111111;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.btn-close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  transition: all 0.25s ease;
  line-height: 1;
  padding-bottom: 4px;
  /* Align cross vertically */
}

.btn-close-modal:hover {
  background-color: rgba(255, 90, 54, 0.9);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* Shorts mobile styling overrides */
@media (max-width: 768px) {
  .shorts-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    width: 100%;
  }

  .short-card {
    flex: 0 0 145px !important;
    width: 145px !important;
    height: 257.77px !important;
    aspect-ratio: 9 / 16 !important;
  }

  /* Show all cards scrolling horizontally on mobile */
  .short-card:nth-child(n+5) {
    display: block;
  }

  .shorts-section {
    padding: 0 16px;
    margin-top: 24px;
  }
}

/* Shorts Modal Footer styling */
.shorts-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: #111111;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.shorts-modal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}

.shorts-modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  font-size: 14.5px;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-bottom: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.shorts-modal-views {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.btn-modal-recipe {
  background: var(--accent) !important;
  border: none !important;
  color: #ffffff !important;
  padding: 10px 16px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.3) !important;
  transition: all 0.25s ease !important;
}

.btn-modal-recipe:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(255, 90, 54, 0.4) !important;
}

#shorts-view {
  background-color: #FFFFFF;
  height: calc(100vh - 64px);
  min-height: calc(100vh - 64px);
  position: relative;
  overflow: hidden;
}

/* Floating Top-Left Back Button for Shorts View (Anchored in Top Header Bar) */
.btn-shorts-back {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 8px 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-shorts-back:hover {
  background: #FFFFFF;
  color: var(--accent);
  border-color: var(--accent);
  transform: translateX(-3px) scale(1.03);
  box-shadow: 0 6px 22px rgba(255, 90, 54, 0.2);
}

.btn-shorts-back svg {
  transition: transform 0.2s ease;
}

.btn-shorts-back:hover svg {
  transform: translateX(-2px);
}

/* Dedicated Immersive Shorts View Styles (YouTube Shorts & Instagram Reels Style) */
.shorts-immersive-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  max-width: 100%;
  margin: 0 auto;
  height: 100%;
  background-color: #FFFFFF;
}

.shorts-immersive-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  height: calc(100vh - 64px);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  padding: 16px 0 16px 0;
  scrollbar-width: none;
  /* Firefox */
  background-color: #FFFFFF;
}

.shorts-immersive-feed::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.immersive-card-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex-shrink: 0;
  position: relative;
}

.immersive-short-card {
  position: relative;
  height: min(700px, calc(100vh - 84px)) !important;
  aspect-ratio: 9 / 16 !important;
  /* Strict 9:16 vertical ratio */
  width: auto !important;
  max-width: 95vw !important;
  border-radius: 20px;
  overflow: hidden;
  background-color: #000000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  border: 1.5px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease;
}

.immersive-short-card:hover {
  border-color: var(--accent);
}

.video-container-wrapper {
  flex-grow: 1;
  width: 100%;
  height: 100%;
}

.immersive-iframe,
.immersive-img {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.immersive-short-card:hover .immersive-img {
  transform: scale(1.03);
}

.immersive-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
  z-index: 5;
}

.immersive-info {
  pointer-events: auto;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 90%;
}

.immersive-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.immersive-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
}

.immersive-author-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11.5px;
}

.immersive-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.immersive-views {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Action buttons sitting outside on the right (YouTube Shorts style) */
.immersive-actions {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  z-index: 10;
  margin-bottom: 24px;
}

.immersive-action-btn {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.immersive-action-btn svg {
  transition: transform 0.2s ease;
}

.immersive-action-btn:hover {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(255, 90, 54, 0.18);
}

.immersive-action-btn:hover svg {
  transform: scale(1.1);
}

.immersive-action-btn .action-label {
  position: absolute;
  top: 52px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
}

.immersive-action-btn.btn-like.liked {
  background-color: #EF4444;
  border-color: #EF4444;
  color: #ffffff;
}

.immersive-action-btn.btn-like.liked .action-label {
  color: #EF4444;
}

.immersive-action-btn.btn-save.saved {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.immersive-action-btn.btn-save.saved .action-label {
  color: var(--accent);
}

/* Snapping & full screen 100% width & height on mobile */
@media (max-width: 768px) {
  .shorts-immersive-layout {
    padding: 0;
    max-width: 100%;
    width: 100%;
    height: 100%;
  }

  .shorts-immersive-feed {
    gap: 0;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    padding: 0;
    scrollbar-width: none;
    background-color: #FFFFFF;
  }

  .shorts-immersive-feed::-webkit-scrollbar {
    display: none;
  }

  .immersive-card-wrapper {
    position: relative;
    gap: 0;
    width: 100% !important;
    height: calc(100vh - 64px) !important;
    height: calc(100dvh - 64px) !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    flex-shrink: 0;
  }

  .immersive-short-card {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    scroll-snap-align: start !important;
    box-shadow: none !important;
  }

  .btn-shorts-back {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 1000;
    padding: 8px 16px 8px 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  }

  .btn-shorts-back svg {
    width: 20px;
    height: 20px;
  }

  .immersive-actions {
    position: absolute;
    right: 18px;
    bottom: 70px;
    z-index: 15;
    margin-bottom: 0;
    gap: 50px;
  }

  .immersive-action-btn {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 52px;
    height: 52px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  }

  .immersive-action-btn svg {
    width: 26px;
    height: 26px;
  }

  .immersive-action-btn .action-label {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    font-size: 10.5px;
    top: 56px;
    font-weight: 700;
  }

  .immersive-overlay {
    padding: 24px 18px 36px 18px;
  }

  .immersive-author-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .immersive-author-name {
    font-size: 13.5px;
  }

  .immersive-title {
    font-size: 15.5px;
  }

  /* On mobile: Hide text search bar in header, show mobile search icon button */
  .header-center .search-bar {
    display: none !important;
  }

  .btn-mobile-search-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
  }

  .btn-mobile-search-toggle:hover,
  .btn-mobile-search-toggle:active {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
  }
}

/* Desktop default: Hide mobile search toggle and overlay */
.btn-mobile-search-toggle {
  display: none;
}

/* ==========================================
   FULL SCREEN MOBILE SEARCH OVERLAY STYLES
   ========================================== */
.mobile-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-primary);
  z-index: 100000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.mobile-search-overlay.active {
  display: flex !important;
  animation: mobileSearchFadeIn 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes mobileSearchFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: var(--bg-card);
  border-bottom: 1.5px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.btn-close-mobile-search {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-close-mobile-search:hover,
.btn-close-mobile-search:active {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.mobile-search-input-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 0 14px;
  height: 48px;
  transition: var(--transition);
}

.mobile-search-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.12);
  background-color: var(--bg-card);
}

.mobile-search-input-wrapper input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
}

.btn-clear-mobile-search {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.mobile-search-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.search-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-tag {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.search-tag:hover,
.search-tag:active {
  background-color: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.mobile-search-results-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.mobile-search-item:hover,
.mobile-search-item:active {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(255, 90, 54, 0.12);
  transform: translateY(-1px);
}

.mobile-search-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.mobile-search-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

.mobile-search-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.3;
}

.mobile-search-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================
   DARK MODE OVERRIDES FOR MOBILE SEARCH
   ========================================== */
body.dark-mode .btn-mobile-search-toggle {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .mobile-search-overlay {
  background-color: var(--bg-primary) !important;
}

body.dark-mode .mobile-search-header {
  background-color: var(--bg-card) !important;
  border-bottom-color: var(--border-color) !important;
}

body.dark-mode .btn-close-mobile-search {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}

body.dark-mode .mobile-search-input-wrapper {
  background-color: var(--bg-primary);
  border-color: var(--border-color);
}

body.dark-mode .mobile-search-input-wrapper:focus-within {
  background-color: var(--bg-card);
  border-color: var(--accent);
}

body.dark-mode .mobile-search-input-wrapper input {
  color: var(--text-main);
}

body.dark-mode .search-tag {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

body.dark-mode .search-tag:hover,
body.dark-mode .search-tag:active {
  background-color: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

body.dark-mode .mobile-search-item {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

body.dark-mode .mobile-search-title {
  color: var(--text-main);
}

body.dark-mode .mobile-search-meta {
  color: var(--text-muted);
}


/* Desktop-only hover interactions (Scale + Lift animation) */
@media (hover: hover) and (min-width: 769px) {
  .pin:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
  }
  .short-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: none !important;
  }
  .bottom-feed .pin:hover {
    transform: none !important;
    box-shadow: var(--shadow) !important;
  }
}

/* ==========================================
   USER PROFILE PANEL STYLES
   ========================================== */
.profile-header-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 20px 24px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.profile-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border-color);
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-main);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.profile-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-tabs-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  border-bottom: 1.5px solid var(--border-color);
}

.profile-tabs {
  display: flex;
  gap: 32px;
}

.profile-tab {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 12px 4px;
  cursor: pointer;
  position: relative;
  transition: color 0.25s ease;
}

.profile-tab:hover {
  color: var(--text-main);
}

.profile-tab.active {
  color: var(--accent);
}

.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
  border-radius: 99px;
}

/* Edit Profile & Logout Action Buttons */
.profile-actions-wrapper {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.btn-profile-edit,
.btn-profile-logout {
  background: var(--bg-primary);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-profile-edit:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1.5px);
}

.btn-profile-logout:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: #FEF2F2;
  transform: translateY(-1.5px);
}

/* ==========================================
   UTILITY CLASSES (JS-free styling)
   ========================================== */

/* Theme toggle icon visibility */
.btn-theme-toggle .icon-sun {
  display: none;
}

.btn-theme-toggle.is-dark .icon-moon {
  display: none;
}

.btn-theme-toggle.is-dark .icon-sun {
  display: block;
}

/* Clickable cursor */
.clickable {
  cursor: pointer;
}

/* Hero image gallery fade transition */
.recipe-hero-img {
  transition: opacity 0.15s ease;
}

.recipe-hero-img.fading {
  opacity: 0.4;
}

/* Grid empty state */
/* Grid empty state */
.grid-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 15px;
}

/* ==========================================
   PREMIUM AUTH MODAL STYLING
   ========================================== */

/* Auth Modal Content Container override */
#authModal .shorts-modal-content {
  max-width: 400px;
  width: calc(100% - 32px);
  padding: 24px;
  border-radius: 24px;
  background-color: var(--bg-card);
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  animation: modalEnter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hide scrollbar for Chrome/Safari inside the modal */
#authModal .shorts-modal-content::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

/* Auth Modal Backdrop Fade-in */
#authModal .shorts-modal-backdrop {
  animation: authBackdropFade 0.3s ease forwards;
}

@keyframes authBackdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Close button positioning and styling */
#authModal .btn-close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

#authModal .btn-close-modal:hover {
  background: var(--accent-light);
  color: var(--accent);
  transform: rotate(90deg);
}

/* Tab Switcher Layout */
.auth-tabs-container {
  display: flex;
  background: var(--bg-primary);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
  gap: 4px;
  border: 1.5px solid var(--border-color);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  text-align: center;
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-tab:hover:not(.active) {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.02);
}

body.dark-mode .auth-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.02);
}

/* Form Styles */
.auth-form-group {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.auth-form-group.last {
  margin-bottom: 20px;
}

.auth-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px; /* Extra left padding for input icon */
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  box-sizing: border-box;
  transition: var(--transition);
  outline: none;
}

.auth-input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--accent-light);
}

/* Input Icon styling */
.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.auth-input:focus + .auth-input-icon {
  color: var(--accent);
}

/* Submit Button */
.auth-btn-submit {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid var(--accent);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  outline: none;
  box-shadow: 0 4px 12px rgba(255, 90, 54, 0.2);
}

.auth-btn-submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(255, 90, 54, 0.3);
}

.auth-btn-submit:active {
  transform: translateY(0);
}

/* Slide animation for switching tabs */
.auth-form-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.auth-form-container {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  width: 200%;
}

.auth-form-slide {
  width: 50%;
  flex-shrink: 0;
  padding: 2px;
  box-sizing: border-box;
  transition: opacity 0.35s ease;
}

.auth-form-slide.inactive {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================
   AUTHOR PROFILE HOVER STYLES
   ========================================== */
.author-info-link:hover .author-name {
  color: var(--accent) !important;
}
.author-info-link:hover .author-info {
  opacity: 0.85;
}

/* ==========================================
   EDIT PROFILE MODAL PREMIUM STYLES
   ========================================== */
.edit-profile-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

.edit-profile-input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.12);
}

.edit-profile-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  box-sizing: border-box;
  resize: vertical;
  transition: all 0.25s ease;
}

.edit-profile-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.12);
}

/* ==========================================
   SETTINGS PAGE STYLING
   ========================================== */
.settings-page-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

.settings-card {
  text-align: left;
  padding: 32px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

@media (max-width: 576px) {
  .settings-page-wrapper {
    padding: 24px 8px;
  }
  .settings-card {
    padding: 20px;
    border-radius: 20px;
  }
}

/* ==========================================
   CREATOR PAGE STYLING
   ========================================== */
.creator-page-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

.creator-card {
  text-align: left;
  padding: 32px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

@media (max-width: 576px) {
  .creator-page-wrapper {
    padding: 24px 8px;
  }
  .creator-card {
    padding: 20px;
    border-radius: 20px;
  }
}

/* Fix dropdown options readability in dark/light themes */
select option {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
}

/* Custom premium select styling (replaces default Chrome select arrow) */
select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF5A36' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px !important;
  padding-right: 32px !important;
  cursor: pointer !important;
}

/* Hide spin button arrows on number inputs globally (Chrome, Safari, Edge, Opera) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
/* Hide spin button arrows on Firefox */
input[type="number"] {
  -moz-appearance: textfield !important;
}

/* ==========================================
   BRAND FOOTER & DOCUMENT PAGES STYLING
   ========================================== */
.site-footer {
  background-color: var(--bg-card);
  border-top: 1.5px solid var(--border-color);
  padding: 20px 24px;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
  
  /* Sidebar padding offsets to prevent content truncation */
  padding-left: calc(72px + 24px);
  transition: padding-left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.sidebar-expanded .site-footer {
  padding-left: calc(180px + 24px);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand .logo {
  display: inline-flex;
}

.footer-tagline {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1.5px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-social-link {
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
}

.footer-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .site-footer {
    padding: 20px 16px !important;
  }
  .footer-inner {
    flex-direction: column !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .footer-copyright {
    text-align: center !important;
    width: 100% !important;
  }
  .footer-nav-links {
    justify-content: center !important;
    width: 100% !important;
  }
}

/* Informational Brand Pages (About, Contact, Terms, Privacy) */
.doc-page-wrapper {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 16px 40px 16px;
  box-sizing: border-box;
}

.doc-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 24px;
  padding: 48px;
  box-shadow: var(--shadow);
}

.doc-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 8px;
  text-align: left;
}

.doc-subtitle {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 32px;
  text-align: left;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 24px;
}

.doc-content {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  text-align: left;
}

.doc-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 32px;
  margin-bottom: 12px;
}

.doc-content p {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.doc-content ul {
  margin-top: 0;
  margin-bottom: 20px;
  padding-left: 20px;
  color: var(--text-muted);
}

.doc-content li {
  margin-bottom: 8px;
}

/* Contact page specific styling */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-method-card {
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.contact-method-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.contact-icon-wrapper {
  background: var(--bg-card);
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-method-details h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.contact-method-details p {
  font-family: var(--font-sans);
  font-size: 13.5px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .doc-card {
    padding: 24px;
    border-radius: 20px;
  }
  .doc-title {
    font-size: 26px;
  }
}

/* ==========================================
   SHARED CATEGORY CARDS STYLING
   ========================================== */
.categories-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 24px;
}

@media (min-width: 1025px) {
  .categories-page-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .categories-header {
    padding: 0 16px;
  }
  .categories-page-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px;
  }
  .category-page-card {
    height: 72px !important;
    border-radius: 12px !important;
  }
  .category-page-title {
    font-size: 14px !important;
  }
}

.category-page-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  border-radius: 16px;
  padding: 16px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  text-decoration: none;
  background-color: var(--bg-card);
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-page-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

.category-page-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  text-align: center;
  line-height: 1.3;
  transition: color 0.25s ease;
}

.category-page-card:hover .category-page-title {
  color: var(--accent);
}

/* ==========================================
   HORIZONTAL SCROLLABLE GRID
   ========================================== */
.horizontal-scroll-grid {
  display: flex !important;
  flex-direction: row !important;
  overflow-x: auto !important;
  gap: 20px !important;
  padding-bottom: 16px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.horizontal-scroll-grid::-webkit-scrollbar {
  height: 6px;
}

.horizontal-scroll-grid::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.horizontal-scroll-grid::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.horizontal-scroll-grid::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.horizontal-scroll-grid .pin {
  flex: 0 0 282px !important;
  width: 282px !important;
  margin-bottom: 0 !important;
}

@media (max-width: 1366px) and (min-width: 769px) {
  .horizontal-scroll-grid .pin {
    flex: 0 0 250px !important;
    width: 250px !important;
  }
}

@media (max-width: 768px) {
  .horizontal-scroll-grid .pin {
    flex: 0 0 calc((100vw - 46px) / 2) !important;
    width: calc((100vw - 46px) / 2) !important;
  }
}

/* Screen Reader Only Utility for Semantic Headings */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}