/* ===================================================
   JO CRAFT — Compiled CSS
   =================================================== */

/* cyrillic-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/montserrat-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/montserrat-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: -468px 0; }
  100% { background-position:  468px 0; }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #1A0A3E 0%, #0D0D1A 50%, #0A1A2E 100%);
  min-height: 100vh;
  color: #FFFFFF;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* Bootstrap .container override — wider layout, 40px gutters */
.container {
  max-width: 1440px;
  padding-left: 40px;
  padding-right: 40px;
}

@media (max-width: 900px) {
  .container { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
  .container { padding-left: 16px; padding-right: 16px; }
}

/* Navbar */
.navbar {
  position: relative; z-index: 10; padding: 12px 0;
}
.navbar .container {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.navbar-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.navbar-logo-img { height: 120px; width: auto; display: block; object-fit: contain; }
.navbar-tagline {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.navbar-tagline-main {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.navbar-tagline-sub {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}
.navbar-tagline-sub a {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.navbar-tagline-sub a:hover { color: #fff; }
.navbar-right { display: flex; align-items: center; gap: 16px; }
.navbar-partners { display: flex; align-items: center; gap: 24px; }
.server-select-wrap { display: flex; align-items: center; }
.server-select {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 7px 32px 7px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23fff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: background 0.2s, border-color 0.2s;
}
.server-select:hover { background-color: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); }
.server-select option { background: #1a1a2e; color: #fff; }
.navbar-partner-link { display: flex; align-items: center; opacity: 0.85; transition: opacity 0.2s; }
.navbar-partner-link:hover { opacity: 1; }
.navbar-partner-img { height: 36px; width: auto; display: block; object-fit: contain; }

/* No Data Banner */
.no-data-banner {
  display: flex; align-items: center; gap: 12px; margin: 0 0 20px;
  padding: 14px 20px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px; font-size: 14px; color: #FCA5A5;
}
.no-data-banner a { color: #F87171; text-decoration: underline; font-weight: 600; }
.no-data-banner a:hover { color: #EF4444; }

/* Search */
.search-container { max-width: 800px; margin: 32px auto; padding: 0; text-align: center; }
.search-input-wrap { position: relative; }
.search-input-wrap .search-icon {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  color: #6B7280; pointer-events: none; display: flex;
}
input.search-input {
  width: 100%; padding: 15px 48px 15px 52px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 50px; color: white;
  font-size: 15px; font-family: inherit; transition: all 0.3s; outline: none;
}
input.search-input::placeholder { color: #6B7280; }
input.search-input:focus { border-color: #8B5CF6; box-shadow: 0 0 20px rgba(139,92,246,0.2); background: rgba(255,255,255,0.08); }
.search-clear {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #6B7280;
  display: flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 50%; transition: color 0.2s, background 0.2s;
}
.search-clear:hover { color: #fff; background: rgba(255,255,255,0.1); }
.search-hint { margin-top: 12px; font-size: 13px; color: #6B7280; line-height: 1.6; }
.search-hint strong, .search-hint b { color: #9CA3AF; font-weight: 600; }
.search-hint-update { color: #4B5563; font-size: 12px; margin-top: 4px; display: inline-block; }
.search-hint-version { color: #4B5563; font-size: 12px; font-weight: 500; text-decoration: none; margin-left: 2px; }
.search-hint-version:hover { color: #06B6D4; text-decoration: none; }
.mode-switcher {
  display: inline-flex; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px; padding: 4px; margin-top: 20px; gap: 2px;
}
.mode-btn {
  padding: 10px 22px; border-radius: 50px; border: none; cursor: pointer; color: #9CA3AF;
  font-size: 14px; font-weight: 500; transition: all 0.25s; background: transparent;
  font-family: inherit; white-space: nowrap;
}
.mode-btn.active { background: linear-gradient(135deg, #8B5CF6, #22D3EE); color: white; font-weight: 600; }
.item-detail-tabs { max-width: 100%; overflow-x: auto; }
@media (max-width: 480px) {
  .item-detail-tabs .mode-btn { padding: 8px 14px; font-size: 13px; }
}
.mode-btn:hover:not(.active) { color: white; background: rgba(255,255,255,0.06); }

/* Recipe Cards Grid */
.recipes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0 0 40px; }

.recipe-card {
  display: block; background: #16161F; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; transition: all 0.3s ease; cursor: pointer; overflow: hidden;
  animation: fadeInUp 0.4s ease forwards; text-decoration: none; color: inherit;
}
.recipe-card:hover { border-color: rgba(139,92,246,0.4); box-shadow: 0 0 20px rgba(139,92,246,0.2); transform: translateY(-4px); }
.recipe-card .card-image { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #1E1E2A; }
.recipe-card .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.recipe-card:hover .card-image img { transform: scale(1.04); }
.recipe-card .card-image .card-tags { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.recipe-card .card-image .tag { position: static; }
.recipe-card .card-image .img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 48px; color: rgba(255,255,255,0.15); }
.recipe-card .card-content { padding: 14px; }
.recipe-card .card-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; line-height: 1.4; color: #FFFFFF; }
.recipe-card .ingredient-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.recipe-card .ingredient-row .ingredient-icon { position: relative; flex-shrink: 0; width: 36px; height: 36px; }
.recipe-card .ingredient-row .ingredient-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.recipe-card .ingredient-row .ingredient-icon .img-placeholder-sm { width: 100%; height: 100%; background: rgba(255,255,255,0.06); border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.recipe-card .ingredient-row .ingredient-info { flex: 1; overflow: hidden; }
.recipe-card .ingredient-row .ingredient-info .ingredient-name { font-size: 12px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe-card .ingredient-row .ingredient-info .ingredient-desc { font-size: 11px; color: #6B7280; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe-card .ingredient-row .ingredient-info .ingredient-fill,
.ingredient-card .ingredient-info .ingredient-fill {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  font-weight: 500;
  color: #4B5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recipe-card .ingredient-row .ingredient-qty { font-size: 13px; font-weight: 700; color: white; flex-shrink: 0; }
.recipe-card .ingredients-more { display: flex; align-items: center; gap: 8px; padding: 8px 0 2px; }
.recipe-card .ingredients-more .more-icons { display: flex; gap: 4px; }
.recipe-card .ingredients-more .more-icons img { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; }
.recipe-card .ingredients-more .more-icons .more-icon-placeholder { width: 26px; height: 26px; border-radius: 4px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; font-size: 10px; }
.recipe-card .ingredients-more .more-text { font-size: 11px; color: #6B7280; }

/* Tags */
.tag { background: #0891B2; color: white; padding: 8px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-flex; }
.tag-craft { background: linear-gradient(135deg, #0891B2, #06B6D4); }
.tag-item { background: #7C3AED; }
.tag-variants { background: linear-gradient(135deg, #D97706, #F59E0B); }

/* Items Table */
.table-wrapper { padding: 0 0 40px; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.items-table { width: 100%; border-collapse: collapse; background: #16161F; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.items-table thead tr { border-bottom: 1px solid rgba(255,255,255,0.06); }
.items-table th { padding: 14px 18px; text-align: left; font-size: 12px; font-weight: 500; color: #6B7280; text-transform: uppercase; letter-spacing: 0.5px; }
.items-table td { padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 13px; vertical-align: middle; }
.items-table tr:last-child td { border-bottom: none; }
.items-table tr:hover td { background: rgba(255,255,255,0.02); }
.items-table .item-cell { display: flex; align-items: center; gap: 12px; }
.items-table .item-cell-link { text-decoration: none; color: inherit; border-radius: 8px; padding: 4px; margin: -4px; transition: background 0.15s; }
.items-table .item-cell-link:hover { background: rgba(255,255,255,0.05); }
.items-table .item-cell-link:hover .item-name { color: #A78BFA; }
.items-table .item-cell .item-icon-wrap { position: relative; flex-shrink: 0; width: 44px; height: 44px; background: #1E1E2A; border-radius: 8px; overflow: hidden; }
.items-table .item-cell .item-icon-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.items-table .item-cell .item-icon-wrap .img-placeholder-sm { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.items-table .item-cell .item-name-wrap .item-name { font-size: 13px; font-weight: 600; display: block; }
.items-table .item-cell .item-name-wrap .item-desc { font-size: 11px; color: #6B7280; display: block; margin-top: 2px; }
.items-table .recipe-cell { display: flex; align-items: center; gap: 10px; }
.items-table .recipe-cell .recipe-img-wrap { width: 32px; height: 32px; border-radius: 5px; overflow: hidden; flex-shrink: 0; background: #1E1E2A; }
.items-table .recipe-cell .recipe-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.items-table .recipe-cell .recipe-img-wrap .img-placeholder-xs { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.items-table .recipe-cell .recipe-link { font-size: 13px; font-weight: 500; color: #FFFFFF; text-decoration: none; transition: color 0.2s; }
.items-table .recipe-cell .recipe-link:hover { color: #A78BFA; }
.items-table .workbench-cell { font-size: 12px; color: #9CA3AF; }
.items-table .qty-cell { text-align: right; font-weight: 700; font-size: 14px; color: white; }

/* Recipe Detail Page */
.page-content { padding-bottom: 60px; }
.breadcrumbs { padding: 16px 0 0; font-size: 13px; color: #6B7280; display: flex; align-items: center; gap: 4px; }
.breadcrumbs a { color: #6B7280; text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: white; }
.breadcrumbs .sep { margin: 0 6px; opacity: 0.4; }
.breadcrumbs .current { color: #9CA3AF; }

.recipe-header { display: flex; gap: 32px; padding: 24px 0 32px; align-items: flex-start; }
.recipe-preview-image { flex-shrink: 0; position: relative; width: 260px; height: 260px; background: #1E1E2A; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.recipe-preview-image img { width: 100%; height: 100%; object-fit: cover; }
.recipe-preview-image .info-btn { position: absolute; bottom: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.88); color: #2d2d2d; border: none; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: all 0.2s; }
.recipe-preview-image .info-btn:hover { background: white; transform: scale(1.1); }
.recipe-preview-image .img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 72px; color: rgba(255,255,255,0.1); }
.recipe-meta { padding-top: 6px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 100%; }
.recipe-meta h1 { font-size: 28px; font-weight: 700; line-height: 1.25; margin: 0; }

/* Unified meta rows (recipe + item detail) */
.recipe-meta .meta-row,
.item-meta .meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
  width: 100%;
  font-size: 14px;
  line-height: 1.45;
}
.recipe-meta .meta-label,
.item-meta .meta-label { color: #6B7280; flex-shrink: 0; }
.recipe-meta .meta-value,
.item-meta .meta-value { color: #9CA3AF; font-weight: 600; word-break: break-word; }

.section-title { font-size: 17px; font-weight: 700; padding: 0 0 16px; color: #FFFFFF; }

.ingredients-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 0 40px; }

.ingredient-card {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: #16161F; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; transition: all 0.3s ease;
  text-decoration: none; color: inherit; cursor: pointer;
}
.ingredient-card.highlighted { border-color: rgba(139,92,246,0.5); background: rgba(139,92,246,0.06); }
.ingredient-card:hover { border-color: rgba(139,92,246,0.4); background: #1C1C28; }
.ingredient-card .ingredient-img-wrap { position: relative; flex-shrink: 0; width: 56px; height: 56px; background: #1E1E2A; border-radius: 8px; overflow: visible; }
.ingredient-card .ingredient-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.ingredient-card .ingredient-img-wrap .img-placeholder-md { width: 100%; height: 100%; background: rgba(255,255,255,0.05); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ingredient-card .ingredient-info { flex: 1; overflow: hidden; }
.ingredient-card .ingredient-info .name { font-size: 14px; font-weight: 600; display: block; margin-bottom: 3px; }
.ingredient-card .ingredient-info .desc { font-size: 12px; color: #6B7280; display: block; }
.ingredient-card .qty { font-size: 18px; font-weight: 800; color: white; flex-shrink: 0; }
.ingredient-card .qty .qty-fill,
.ingredient-qty .qty-fill,
.qty-cell .qty-fill {
  margin-left: 6px;
  font-size: 0.72em;
  font-weight: 500;
  color: #6B7280;
}

/* Item Detail */
.item-header { display: flex; gap: 32px; padding: 24px 0 32px; align-items: flex-start; }
.item-image { flex-shrink: 0; position: relative; width: 260px; height: 260px; background: #1E1E2A; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.item-image img { width: 100%; height: 100%; object-fit: cover; }
.item-image .info-btn { position: absolute; bottom: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.88); color: #2d2d2d; border: none; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: all 0.2s; }
.item-image .info-btn:hover { background: white; transform: scale(1.1); }
.item-image .img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 72px; color: rgba(255,255,255,0.1); }
.item-meta { padding-top: 6px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 100%; }
.item-meta h1 { font-size: 28px; font-weight: 700; margin: 0; }
.item-meta .item-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* Copy URL button (detail pages) */
.btn-copy-url {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 50px;
  background: rgba(139, 92, 246, 0.12);
  color: #C4B5FD;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-copy-url-icon {
  flex-shrink: 0;
  display: block;
}
.btn-copy-url:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(167, 139, 250, 0.65);
  color: #EDE9FE;
}
.btn-copy-url.is-pressing {
  transform: scale(0.96);
}
.btn-copy-url.copied {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.18);
  color: #6EE7B7;
  animation: copyUrlPulse 0.35s ease;
}
@keyframes copyUrlPulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Actions row on detail pages (Поделиться + Скопировать) */
.detail-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.detail-actions .btn-copy-url {
  margin-top: 0;
}

/* Copy-as-table button (recipe page) */
.btn-copy-table {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 50px;
  background: rgba(34, 211, 238, 0.12);
  color: #67E8F9;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-copy-table-icon {
  flex-shrink: 0;
  display: block;
}
.btn-copy-table:hover {
  background: rgba(34, 211, 238, 0.22);
  border-color: rgba(103, 232, 249, 0.65);
  color: #CFFAFE;
}
.btn-copy-table.is-pressing {
  transform: scale(0.96);
}
.btn-copy-table.copied {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.18);
  color: #6EE7B7;
  animation: copyUrlPulse 0.35s ease;
}
.item-detail-tabs { margin-bottom: 24px; }

/* Empty State */
.empty-state { text-align: center; padding: 80px 40px; color: #6B7280; animation: fadeInUp 0.4s ease; }
.empty-state .empty-icon { font-size: 64px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 16px; margin-bottom: 24px; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: linear-gradient(135deg, #8B5CF6, #22D3EE); color: white; border: none; border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; transition: opacity 0.2s; }
.btn-primary:hover { opacity: 0.85; }
.btn-sm { padding: 8px 20px; font-size: 13px; }
.cross-tab-hint { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 20px; background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.25); border-radius: 12px; font-size: 14px; color: #C4B5FD; }

/* 404 */
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: 40px; }
.error-page .error-code { font-size: 96px; font-weight: 800; background: linear-gradient(135deg, #A78BFA, #67E8F9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
.error-page .error-title { font-size: 24px; font-weight: 600; margin: 16px 0 8px; }
.error-page .error-text { font-size: 15px; color: #6B7280; margin-bottom: 32px; }

/* Changelog */
.changelog-page { padding: 24px 0 48px; max-width: 720px; }
.changelog-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.changelog-subtitle { font-size: 14px; color: #6B7280; margin-bottom: 32px; }
.changelog-subtitle strong { color: #9CA3AF; font-weight: 600; }
.changelog-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.changelog-entry {
  background: #16161F;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px 22px;
}
.changelog-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.changelog-entry-meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.changelog-version { font-size: 18px; font-weight: 700; color: #E5E7EB; }
.changelog-date { font-size: 13px; color: #6B7280; white-space: nowrap; }

/* Copy-update icon button (changelog) */
.btn-copy-changelog {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(139, 92, 246, 0.40);
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.10);
  color: #C4B5FD;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-copy-changelog:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(167, 139, 250, 0.65);
  color: #EDE9FE;
}
.btn-copy-changelog.is-pressing { transform: scale(0.92); }
.btn-copy-changelog .ic-copy { display: block; }
.btn-copy-changelog .ic-check { display: none; }
.btn-copy-changelog.copied {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.18);
  color: #6EE7B7;
  animation: copyUrlPulse 0.35s ease;
}
.btn-copy-changelog.copied .ic-copy { display: none; }
.btn-copy-changelog.copied .ic-check { display: block; }
.btn-copy-changelog.copy-error {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
}
.changelog-items { margin: 0; padding-left: 18px; color: #9CA3AF; font-size: 14px; line-height: 1.7; }
.changelog-items li { margin-bottom: 4px; }
.changelog-items li:last-child { margin-bottom: 0; }
.changelog-back { display: inline-flex; margin-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 20px 0; margin-top: auto; }
.site-footer .footer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 16px; }
.site-footer .footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer .footer-copy { font-size: 14px; font-weight: 600; color: #9CA3AF; }
.site-footer .footer-dev { font-size: 13px; color: #6B7280; }
.site-footer .footer-version {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.12);
  color: #4B5563;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.site-footer .footer-version:hover { color: #06B6D4; text-decoration: none; }
.site-footer .footer-bug { font-size: 13px; color: #6B7280; white-space: nowrap; }
.site-footer .footer-disclaimer { font-size: 12px; color: #4B5563; }
.site-footer a { color: #06B6D4; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .site-footer .footer-top, .site-footer .footer-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Skeleton */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }

/* Responsive */
@media (max-width: 1200px) {
  .recipes-grid { grid-template-columns: repeat(3, 1fr); }
  .ingredients-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .recipes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .recipes-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .recipe-header, .item-header { flex-direction: column; padding: 20px; }
  .recipe-preview-image, .item-image { width: 100%; height: 220px; }
  .recipe-meta h1, .item-meta h1 { font-size: 22px; }
  .recipe-meta .meta-row,
  .item-meta .meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .ingredients-grid { grid-template-columns: 1fr; }
  .mode-btn { padding: 8px 14px; font-size: 13px; }
}
@media (max-width: 480px) {
  .recipes-grid { grid-template-columns: 1fr; }
  .navbar { padding: 8px 0; }
  .navbar-logo-img { height: 80px; }
  .navbar-tagline { display: none; }
}

/* Tab stats bar */
.tab-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  padding: 10px 16px;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 13px;
}
.tab-stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.tab-stat-label { color: rgba(255,255,255,0.45); }
.tab-stat-value { color: rgba(255,255,255,0.85); font-weight: 600; }
.tab-stat-total .tab-stat-label { color: rgba(255,255,255,0.6); }
.tab-stat-total .tab-stat-value { color: #fff; }
.tab-stat-total { margin-left: auto; }
@media (max-width: 600px) {
  .tab-stats { gap: 4px 12px; font-size: 12px; padding: 8px 12px; }
  .tab-stat-total { margin-left: 0; }
}

/* Variant tabs */
.variant-tabs { margin-bottom: 20px; }
.variant-tabs .mode-btn { flex-direction: column; align-items: center; gap: 2px; }
.variant-ing-count { font-size: 11px; font-weight: 400; opacity: 0.75; }
