body {
  margin: 0;
  padding: 0;
  background-color: #FAFAFA;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #2E2E2E;
}

/* Prevent pinch/double-tap zoom on mobile - iOS ignores viewport meta for accessibility */
@media screen and (max-width: 499px) {
  html, body {
    touch-action: pan-x pan-y;
  }
}

@keyframes fadeinall {
  0% {
    opacity: 1;
  }
  97% {
    opacity: 0;
  }
  98% {
    opacity: 0;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-100%);
    z-index: -1;
  }
}

#fadein {
  opacity: 1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateY(0);
  background-color: #FAFAFA;
  z-index: 999;
  animation-fill-mode: forwards;
  animation: fadeinall 1s normal both;
  animation-delay: 0.3s;
}

main {
  padding: 120px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

body:has(.category-pill) main,
body:has(.cameras-grid) main {
  padding-top: 120px;
}

@media screen and (max-width: 720px) {
  body:has(.category-pill) main,
  body:has(.cameras-grid) main {
    padding-top: 0;
    margin-top: 16px;
  }
}

/* Floating Navigation */
.floating-menu {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(244, 244, 244, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0;
  margin: 0;
  height: 46px;
  border-radius: 46px;
  box-shadow: 0 6px 36px rgba(0,0,0,0.16);
  border: 1px solid rgba(255, 255, 255, 0.7);
  text-wrap-mode: nowrap;
  display: inline-flex;
  box-sizing: border-box;
}

@media screen and (max-width: 720px) {
  main {
    margin: 16px 16px 96px 16px;
    padding: 0;
  }
  
  .floating-menu {
    bottom: 16px;
  }
  
  .floating-menu.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  .floating-menu:not(.hidden) {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
}

.floating-menu-indicator {
  position: absolute;
  top: -1px;
  height: 46px;
  background: #ffffff;
  border-radius: 46px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  pointer-events: none;
}

.floating-menu a {
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  height: 46px;
  line-height: 43px;
  color: #434343;
  padding: 0px 20px;
  margin: 0;
  border-radius: 46px;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.floating-menu a:first-child {
  margin-left: 0px;
  padding-left: 18px;
}

@media screen and (max-width: 720px) {
  .floating-menu a {
    padding: 0px 16px;
    font-size: 14px;
  }
  
  .floating-menu a:first-child {
    padding-left: 16px;
  }
  
  .mobile-menu-content > a {
    padding: 16px 16px;
  }
  
  .mobile-menu-close {
    padding: 16px 16px;
  }
}

/* Mobile Menu Button and Modal (below 500px) */
@media screen and (max-width: 499px) {
  .floating-menu a:not(.menu-button) {
    display: none;
  }
  
  .floating-menu-indicator {
    display: none;
  }
  
  .menu-button {
    display: inline-block !important;
    padding: 0px 20px;
    color: #000;
  }
}

.menu-button {
  display: none;
}

.mobile-menu-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  pointer-events: none;
}

.mobile-menu-modal.open {
  display: block;
  pointer-events: auto;
}


.mobile-menu-content {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: center bottom;
  background: rgba(30, 30, 30, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 46px;
  padding: 0;
  min-width: auto;
  max-width: 90%;
  width: auto;
  box-shadow: 0 6px 36px rgba(0,0,0,0.16);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1;
  opacity: 0;
  max-height: 46px;
  overflow: hidden;
  transition: opacity 0.3s ease, border-radius 0.3s ease, padding 0.3s ease, min-width 0.3s ease, max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

.mobile-menu-modal.open .mobile-menu-content {
  opacity: 1;
  border-radius: 20px;
  padding: 8px 0 0 0;
  min-width: 280px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  align-items: center;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mobile-menu-modal.open .mobile-menu-content::-webkit-scrollbar {
  display: none;
}

.mobile-menu-content > a {
  display: block;
  padding: 16px 24px;
  color: #7a7a7a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: center;
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease 0.1s, max-height 0.3s ease, padding 0.3s ease;
  box-sizing: border-box;
  margin: 0;
}

.mobile-menu-modal.open .mobile-menu-content > a {
  opacity: 1;
  max-height: 100px;
}

.mobile-menu-content > a:hover {
  color: #DFDFDF;
}

.mobile-menu-content > a.active {
  color: #DFDFDF;
}

.mobile-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0 0 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease 0.1s, max-height 0.3s ease, margin 0.3s ease;
  flex-shrink: 0;
  width: 100%;
}

.mobile-menu-modal.open .mobile-menu-divider {
  opacity: 1;
  max-height: 10px;
}

.mobile-menu-close {
  display: block;
  padding: 16px 24px;
  color: rgba(0, 0, 0, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: center;
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease 0.1s, max-height 0.3s ease, padding 0.3s ease;
  box-sizing: border-box;
  margin: 0;
}

.mobile-menu-modal.open .mobile-menu-close {
  opacity: 1;
  max-height: 100px;
}

.mobile-menu-close:hover {
  color: #DFDFDF;
}

@media (prefers-color-scheme: light) {
  .mobile-menu-content {
    background: rgba(244, 244, 244, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.7);
  }
  
  .mobile-menu-content a {
    color: #00000052;
  }
  
  .mobile-menu-content a:hover {
    color: #2E2E2E;
  }
  
  .mobile-menu-content a.active {
    color: #000;
  }
  
  .mobile-menu-divider {
    background: rgba(0, 0, 0, 0.1);
  }
  
  .mobile-menu-close {
    color: rgba(0, 0, 0, 0.85);
    background: none;
    border: none;
  }
  
  .mobile-menu-close:hover {
    color: rgba(0, 0, 0, 0.85);
  }
}

.floating-menu a:hover {
  color: #2E2E2E;
}

.floating-menu a.active {
  color: #000;
}

/* Category Pill */
.category-pill {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(244, 244, 244, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0px 22px;
  height: 46px;
  line-height: 46px;
  border-radius: 46px;
  box-shadow: 0 6px 36px rgba(0,0,0,0.16);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-weight: 400;
  font-size: 15px;
  color: #434343;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s, background 0.2s;
}

.category-pill:hover {
  color: #2E2E2E;
  background: rgba(244, 244, 244, 0.7);
}

@media screen and (max-width: 720px) {
  .category-pill {
    top: 16px;
  }
  
  .camera-back-button {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  .category-pill {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(180, 180, 180, 0.1);
    color: #DFDFDF;
  }

  .category-pill:hover {
    color: #DFDFDF;
    background: rgba(30, 30, 30, 0.85);
  }
}

/* Image Feed */
.image-feed {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

@media screen and (max-width: 720px) {
  .image-feed {
    gap: 16px;
  }
}

.image-item {
  width: 100%;
  max-width: 1200px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.image-item img {
  width: 100%;
  height: auto;
  display: block;
}

.image-item img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.image-item img[loading="lazy"].loaded {
  opacity: 1;
}

/* Categories List */
.categories-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

@media screen and (max-width: 720px) {
  .categories-list {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

.category-item {
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  text-decoration: none;
  color: #2E2E2E;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-item:hover {
  background: #f5f5f5;
}

.category-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  background: #f5f5f5;
}

.category-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.category-item h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: #111;
}

/* About Page */
.about-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}

.about-image {
  width: 100%;
  max-width: 680px;
  border-radius: 16px;
  margin-bottom: 40px;
}

.about-text {
  font-size: 24px;
  line-height: 37px;
  color: #2E2E2E;
}

.about-text p {
  margin-bottom: 37px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text a.highlight {
  font-weight: 600;
  text-decoration: none;
  color: #111;
}

.about-text a.highlight:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 3px;
  text-decoration-color: #2E2E2E;
  text-decoration-skip-ink: none;
}

/* Upload Page */
.upload-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.upload-form input[type="file"] {
  padding: 20px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  cursor: pointer;
}

.upload-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.upload-form label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  margin-bottom: 8px;
  display: block;
}

.upload-form input[type="text"],
.upload-form input[type="file"],
.upload-form select,
.upload-form textarea {
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #111;
}

.upload-form input[type="text"]:focus,
.upload-form select:focus,
.upload-form textarea:focus {
  outline: none;
  border-color: #111;
}

.upload-form textarea {
  resize: vertical;
  min-height: 120px;
}

.upload-form button {
  padding: 15px 30px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
}

.upload-form button:hover {
  background: #2E2E2E;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #171717;
    color: #A1A1A1;
  }

  #fadein {
    background-color: #171717;
  }

  main {
    color: #A1A1A1;
  }

  .floating-menu {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(180, 180, 180, 0.1);
  }

  .floating-menu-indicator {
    background: rgba(161, 161, 161, 0.15);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
  }

  .floating-menu a {
    color: #7a7a7a;
  }

  .floating-menu a:hover {
    color: #DFDFDF;
  }

  .floating-menu a.active {
    color: #DFDFDF;
  }
  
  @media screen and (max-width: 499px) {
    .menu-button {
      color: #DFDFDF;
    }
  }
  
  .menu-button {
    color: rgba(223, 223, 223, 0.85);
  }
  
  .mobile-menu-close {
    color: rgba(223, 223, 223, 0.85);
  }
  
  .mobile-menu-close:hover {
    color: rgba(223, 223, 223, 0.85);
  }
  
  .mobile-menu-modal.open .mobile-menu-content {
    background: rgba(30, 30, 30, 0.85);
  }

  .image-item {
    background: #222;
  }

  .category-item {
    background: #222;
    color: #A1A1A1;
  }

  .category-item:hover {
    background: #2a2a2a;
  }

  .category-thumbnail {
    background: #2a2a2a;
  }

  .category-item h2 {
    color: #DFDFDF;
  }

  .about-text {
    color: #A1A1A1;
  }

  .about-text p {
    color: #A1A1A1;
  }
  
  .about-text h2 {
    color: #DFDFDF;
  }
  
  .about-text ul li a {
    color: #A1A1A1;
  }
  
  .about-text ul li a:hover {
    border-bottom-color: #DFDFDF !important;
  }
  
  .about-text a.highlight {
    color: #DFDFDF;
  }
  
  .about-text a.highlight:hover {
    text-decoration-color: #444;
  }

  .upload-container {
    background: #222;
  }

  .upload-form label {
    color: #666;
  }

  .upload-form input[type="text"],
  .upload-form input[type="date"],
  .upload-form input[type="file"],
  .upload-form select,
  .upload-form textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #DFDFDF;
  }

  .upload-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
  }

  .upload-form input[type="text"]:focus,
  .upload-form input[type="date"]:focus,
  .upload-form select:focus,
  .upload-form textarea:focus {
    border-color: #DFDFDF;
  }

  .upload-form input[type="file"] {
    border-color: #444;
    background: #2a2a2a;
  }

  .upload-form input[type="file"]::file-selector-button {
    background: #444;
    color: #DFDFDF;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
  }

  .upload-form input[type="file"]::file-selector-button:hover {
    background: #555;
  }

  .manage-container h1 {
    color: #DFDFDF;
  }

  .manage-actions {
    padding-bottom: 30px;
  }

  .manage-container .instructions {
    color: #A1A1A1;
  }

  .image-item-manage {
    background: #222;
  }

  .image-item-manage.selected {
    outline-color: #DFDFDF;
  }

  .image-checkbox,
  .drag-handle {
    background: rgba(0, 0, 0, 0.7);
    border-color: #DFDFDF;
  }

  .image-checkbox.checked {
    background: #DFDFDF;
  }

  .image-checkbox.checked::after {
    color: #111;
  }

  .drag-handle::after {
    color: #DFDFDF;
  }

  .manage-button {
    background: #2a2a2a;
    color: #DFDFDF;
  }

  .manage-button:hover {
    background: #3a3a3a;
  }

  .manage-button.delete-button {
    background: #d00;
  }

  .manage-button.delete-button:hover {
    background: #b00;
  }

  .manage-button.delete-button:disabled {
    background: #444;
    color: #666;
  }

  .manage-button.select-all-button {
    background: rgba(255, 255, 255, 0.1);
    color: #DFDFDF;
  }

  .manage-button.select-all-button:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .manage-button.save-order-button {
    background: #0066cc;
  }

  .manage-button.save-order-button:hover {
    background: #0052a3;
  }

  .success-message {
    background: rgba(212, 237, 218, 0.2);
    color: #90d4a0;
    border: 1px solid rgba(212, 237, 218, 0.3);
  }

  .error-message {
    background: rgba(248, 215, 218, 0.2);
    color: #f5a5ab;
    border: 1px solid rgba(248, 215, 218, 0.3);
  }

  .empty-state {
    color: #A1A1A1;
  }

  .cameras-grid {
    gap: 16px;
  }

  .camera-card {
    background: #222;
  }

  .camera-card h3 {
    color: #DFDFDF;
  }

  .camera-details {
    color: #A1A1A1;
  }

  .camera-details h1 {
    color: #DFDFDF;
  }

  .camera-spec-label {
    color: #666;
  }

  .camera-spec-value {
    color: #DFDFDF;
  }

  .camera-notes-content {
    color: #A1A1A1;
  }
}

/* Cameras Grid */
.cameras-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

@media screen and (max-width: 960px) {
  .cameras-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 720px) {
  .cameras-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.camera-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #2E2E2E;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.05);
}

.camera-card:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
}

.camera-card-image {
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
  position: relative;
}

.camera-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-image-container {
  position: relative;
}

.camera-image-light,
.camera-image-dark {
  width: 100%;
  height: auto;
  display: block;
}

/* Show light image by default, hide dark */
.camera-image-dark {
  display: none !important;
}

/* In dark mode, hide light image and show dark image */
@media (prefers-color-scheme: dark) {
  .camera-image-light {
    display: none !important;
  }
  
  .camera-image-dark {
    display: block !important;
  }
}

/* For camera card images, position them absolutely to overlap */
.camera-card-image .camera-image-light,
.camera-card-image .camera-image-dark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* If only one image exists, it should still display */
.camera-card-image .camera-image-light:only-child,
.camera-card-image .camera-image-dark:only-child {
  position: static;
}

.camera-card-info {
  padding: 20px;
}

.camera-card h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 400;
  color: #111;
}

.camera-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.camera-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  font-size: 13px;
  color: #434343;
}

/* Camera Details Page */
.camera-details {
  max-width: 680px;
  margin: 0 auto;
}

.camera-details:has(.recipe-properties) {
  max-width: 620px;
}

.camera-details h1 {
  font-size: 32px;
  font-weight: 700;
  color: #111;
  margin-bottom: 32px;
}

.camera-specs {
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px 40px;
}

@media screen and (min-width: 721px) {
  .camera-specs {
    grid-template-columns: 1fr 1fr;
  }
}

.camera-spec {
  margin-bottom: 0;
}

.camera-spec-label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  margin-bottom: 6px;
}

.camera-spec-value {
  font-size: 18px;
  line-height: 28px;
  color: #2E2E2E;
}

.camera-notes {
  margin-bottom: 40px;
}

.camera-notes h2 {
  font-size: 24px;
  font-weight: 400;
  color: #111;
  margin-bottom: 20px;
}

.camera-notes-content {
  font-size: 18px;
  line-height: 28px;
  color: #2E2E2E;
}

.camera-examples {
  margin-top: 40px;
}

.camera-examples h2 {
  font-size: 24px;
  font-weight: 400;
  color: #111;
  margin-bottom: 20px;
}

.example-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.example-image-thumbnail {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  aspect-ratio: 1;
  position: relative;
}

.example-image-thumbnail:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.example-image-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  z-index: 10001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.lightbox-image-container {
  position: relative;
  display: inline-block;
  max-width: 90vw;
  max-height: 90vh;
  overflow: visible;
}

.lightbox-content img,
.lightbox-image-container img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  display: block;
}

.lightbox-thumbnails-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(18 18 18 / 90%);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-radius: 14px;
  padding: 8px;
  display: inline-flex;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10002;
}

.lightbox-thumbnail {
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.4);
  transform-origin: bottom;
}

.lightbox-thumbnails-grid {
  display: flex;
  gap: 8px;
  align-items: center;
}


.lightbox-thumbnail:hover {
  opacity: 0.9;
  transform: scale(1.075);
}

.lightbox-thumbnail.active {
  opacity: 1;
}

.lightbox-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

@media screen and (max-width: 720px) {
  .lightbox-thumbnails-dock {
    display: none;
  }
}

.lightbox-close {
  display: none !important;
}

.lightbox-prev,
.lightbox-next {
  display: none !important;
}

@media screen and (max-width: 720px) {
  .example-images-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (prefers-color-scheme: dark) {
  .camera-card {
    background: #222;
  }

  .camera-card:hover {
    background: #2a2a2a;
  }

  .camera-card-image {
    background: #2a2a2a;
  }
  
  .recipe-card-image-large,
  .recipe-card-image-small {
    background: transparent;
  }

  .camera-card h3 {
    color: #DFDFDF;
  }

  .camera-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #A1A1A1;
  }

  .camera-details {
    color: #A1A1A1;
  }

  .camera-details h1 {
    color: #DFDFDF;
  }

  .camera-spec-label {
    color: #666;
  }

  .camera-spec-value {
    color: #DFDFDF;
  }

  .camera-notes h2 {
    color: #DFDFDF;
  }

  .camera-notes-content {
    color: #A1A1A1;
  }

  .camera-examples h2 {
    color: #DFDFDF;
  }
  
  .example-image-thumbnail {
    background: #222;
  }
  
  .example-image-thumbnail:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  
  .recipe-thumbnail {
    background: transparent;
  }
  
  .recipe-thumbnail:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

/* Button styles for management pages */
.button {
  display: inline-block;
  padding: 12px 24px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.button:hover {
  background: #2E2E2E;
}

/* Backend Navigation */
.backend-nav {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  background: rgba(244, 244, 244, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0;
  margin: 0;
  height: 46px;
  border-radius: 46px;
  box-shadow: 0 6px 36px rgba(0,0,0,0.16);
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: inline-flex;
  box-sizing: border-box;
}

.backend-nav a {
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  height: 46px;
  line-height: 46px;
  color: #434343;
  padding: 0px 22px;
  margin: 0;
  border-radius: 46px;
  position: relative;
  transition: color 0.2s;
}

.backend-nav a:first-child {
  padding-left: 18px;
}

.backend-nav a:hover {
  color: #2E2E2E;
}

.backend-nav a.active {
  color: #000;
  font-weight: 500;
}

body:has(.backend-nav) main {
  padding-top: 100px;
}

@media screen and (max-width: 720px) {
  .backend-nav {
    top: 16px;
  }

  body:has(.backend-nav) main {
    padding-top: 80px;
  }
}

@media (prefers-color-scheme: dark) {
  .backend-nav {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(180, 180, 180, 0.1);
  }

  .backend-nav a {
    color: #7a7a7a;
  }

  .backend-nav a:hover {
    color: #DFDFDF;
  }

  .backend-nav a.active {
    color: #DFDFDF;
  }

  .button {
    background: #DFDFDF;
    color: #171717;
  }

  .button:hover {
    background: #fff;
  }
}

/* Recipes Grid - 2 columns at max width */
.recipes-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media screen and (max-width: 720px) {
  .cameras-grid {
    gap: 16px;
  }
  
  .recipes-grid {
    grid-template-columns: 1fr;
  }
}

/* Recipe Properties - styled like camera specs but with mono font */
.recipe-properties {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.recipe-property {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
  border-radius: 4px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}

.recipe-property:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.recipe-property:last-child {
  border-bottom: none;
}

.recipe-property-label {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, "Courier New", monospace;
}

.recipe-property-value {
  font-size: 14px;
  color: #2E2E2E;
  text-align: right;
  font-weight: 400;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, "Courier New", monospace;
}

.recipe-credits {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 18px;
  line-height: 28px;
  color: #2E2E2E;
}

.recipe-credits-link {
  color: #2E2E2E;
  text-decoration: underline;
  display: inline;
}

.recipe-credits-link:hover {
  text-decoration: none;
}

@media screen and (max-width: 720px) {
  .recipe-property {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 0;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
  }
  
  .recipe-property-value {
    text-align: left;
  }
}

.recipe-featured-container {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  overflow: visible;
}

@media screen and (max-width: 1179px) {
  .recipe-featured-container {
    max-width: 620px;
  }
}

@media screen and (min-width: 1180px) and (max-width: 1379px) {
  .recipe-featured-container {
    max-width: 920px;
  }
}

@media screen and (min-width: 1800px) {
  .recipe-featured-container {
    max-width: 1200px;
  }
}

.recipe-featured-image {
  cursor: pointer;
  position: relative;
}

.recipe-viewer-button {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgb(18 18 18 / 90%);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
  padding: 0;
  line-height: 1;
  outline: none;
}

.recipe-viewer-button:hover {
  opacity: 1;
  transform: scale(1.05);
  background: rgb(18 18 18 / 95%);
}

.recipe-viewer-button:focus {
  outline: none;
}

.recipe-viewer-button:active {
  outline: none;
}

.recipe-thumbnails-dock {
  display: none;
}

.recipe-thumbnails-grid {
  display: flex;
  gap: 8px;
  align-items: center;
}

.recipe-thumbnails-dock {
  cursor: default;
}

.recipe-thumbnail {
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-thumbnail.active {
  /* No special styling for active state */
}

.recipe-thumbnail img {
  transition: opacity 0.2s;
}

.recipe-thumbnail:hover img {
  opacity: 0.9;
}

.recipe-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.recipe-thumbnail img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.recipe-thumbnail img[loading="lazy"].loaded {
  opacity: 1;
}

.recipe-featured-image img {
  transition: opacity 0.3s ease-in-out;
}

/* Recipe thumbnails row - visible on all sizes for featured image mode */
.recipe-thumbnails-row {
  margin-top: 12px;
  width: 100%;
}

.recipe-thumbnails-row .recipe-thumbnails-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  gap: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  align-items: flex-start;
}

.recipe-thumbnails-row .recipe-thumbnails-grid::-webkit-scrollbar {
  display: none;
}

.recipe-thumbnails-row .recipe-thumbnail {
  flex: 0 0 auto;
  width: calc((100% - (8 * 12px)) / 9);
  aspect-ratio: 1;
  height: auto;
  position: relative;
}

.recipe-thumbnails-row .recipe-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

@media screen and (max-width: 720px) {
  .recipe-featured-container {
    margin-bottom: 20px;
  }
  
  .recipe-thumbnails-row .recipe-thumbnails-grid {
    grid-template-columns: repeat(4, 1fr);
    display: grid;
    gap: 12px;
  }
  
  .recipe-thumbnails-row .recipe-thumbnail {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
  }
  
  .recipe-thumbnails-row .recipe-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

@media screen and (max-width: 499px) {
  .recipe-thumbnails-row .recipe-thumbnails-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-color-scheme: dark) {
  .recipe-property-label {
    color: #666;
  }
  
  .recipe-property-value {
    color: #DFDFDF;
  }
  
  .recipe-property {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .recipe-property:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .recipe-credits {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: #A1A1A1;
  }
  
  .recipe-credits-link {
    color: #DFDFDF;
  }
}

/* Recipes Grid - Image Layout */
.recipe-card-images {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr;
  gap: 3px;
  width: 100%;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: transparent;
  align-items: stretch;
}

.recipe-card-image-large {
  grid-row: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  border-radius: 16px 0 0 0;
  display: flex;
  align-items: stretch;
  align-self: stretch;
}

.recipe-card-image-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-card-images-right {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  width: 100%;
  grid-row: 1;
  align-self: stretch;
  height: 100%;
}

.recipe-card-image-small {
  width: 100%;
  overflow: hidden;
  background: transparent;
  min-height: 0;
}

.recipe-card-image-small:first-child {
  border-radius: 0 16px 0 0;
}

.recipe-card-image-small:last-child {
  border-radius: 0;
}

.recipe-card-image-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Recipes List Page */
.recipes-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.recipes-list .recipe-detail {
  margin: 0;
}
