:root {
  --bg: #f5f3ef;
  --bg-elevated: #fdfbf7;
  --text: #161616;
  --muted: #6c6c6c;
  --border-subtle: #ded7cc;
  --accent-color: #f0574f;      /* Will be dynamically overridden by JS to item's main color */
  --accent-soft: rgba(240, 87, 79, 0.16);
  --accent-color-soft: rgba(240, 87, 79, 0.16);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 999px;
  --shadow-soft: 0 12px 30px rgba(0,0,0,0.08);
  --shadow-subtle: 0 6px 18px rgba(0,0,0,0.045);
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  background: #f5f3ef;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Full-screen dynamic background gradient - based on selected card color */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    conic-gradient(
      from 0deg at 50% 50%,
      var(--bg-color-1, rgba(255, 0, 150, 0.15)) 0deg,
      var(--bg-color-2, rgba(255, 127, 0, 0.15)) 60deg,
      var(--bg-color-3, rgba(255, 255, 0, 0.15)) 120deg,
      var(--bg-color-4, rgba(0, 255, 0, 0.15)) 180deg,
      var(--bg-color-5, rgba(0, 0, 255, 0.15)) 240deg,
      var(--bg-color-6, rgba(75, 0, 130, 0.15)) 300deg,
      var(--bg-color-7, rgba(148, 0, 211, 0.15)) 360deg
    );
  pointer-events: none;
  z-index: -1;
  animation: backgroundRotate 30s linear infinite;
  opacity: 0.8;
  transition: opacity 0.6s ease;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at var(--bg-x1, 30%) var(--bg-y1, 40%), var(--bg-light-1, rgba(255, 0, 150, 0.25)) 0%, transparent 60%),
    radial-gradient(ellipse at var(--bg-x2, 70%) var(--bg-y2, 60%), var(--bg-light-2, rgba(0, 150, 255, 0.25)) 0%, transparent 60%),
    radial-gradient(ellipse at var(--bg-x3, 50%) var(--bg-y3, 20%), var(--bg-light-3, rgba(150, 255, 0, 0.2)) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: backgroundPulse 15s ease-in-out infinite;
  opacity: 0.7;
  transition: opacity 0.6s ease;
}

@keyframes backgroundRotate {
  from {
    transform: rotate(0deg) translate(0, 0);
  }
  to {
    transform: rotate(360deg) translate(0, 0);
  }
}

@keyframes backgroundPulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

body.no-scroll {
  overflow: hidden;
}

.page {
  max-width: 1120px;
  margin: 32px auto 40px;
  padding: 0 20px;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.site-title-block {
  max-width: 520px;
}

.site-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 32px;
  letter-spacing: -0.03em;
  text-transform: none;
  font-weight: 700;
  margin: 0 0 6px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: background 0.3s ease;
}

.site-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.site-meta {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.meta-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.meta-stats {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

.stat-item {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.ghost-link {
  border: 0;
  background: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.ghost-link:hover {
  background: var(--accent-soft);
  color: var(--accent-color);
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 12px 0 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.controls-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 6px;
}

.filters {
  flex: 1;
}

.filter-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.9);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  font-family: 'Inter', inherit;
}

.filter-btn.is-active,
.filter-btn:hover {
  border-color: var(--accent-color);
  background: var(--accent-soft);
  color: var(--accent-color);
}

.views {
  flex-shrink: 0;
  text-align: right;
}

.view-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

#favorites-toggle {
  min-width: 60px;
}

#favorites-toggle.active {
  background: var(--accent-soft);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

#favorites-count {
  font-size: 10px;
  margin-left: 2px;
}

.view-toggle-btn {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.9);
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
  font-family: 'Inter', inherit;
}

.view-toggle-btn:hover {
  border-color: var(--accent-color);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.collection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  position: relative;
}

/* Magnetic attraction effect on hover */
.collection:hover .item-card:not(:hover) {
  transition: transform 0.3s ease;
}

.collection .item-card:hover ~ .item-card {
  transform: translateX(5px) scale(0.98);
}

.collection.spectrum-view {
  /* Spectrum view maintains grid but sorted by color */
}

.collection.is-spectrum .item-card {
  opacity: 0;
  transform: translateY(10px);
  animation: spectrumIn 0.4s ease forwards;
}

@keyframes spectrumIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.item-card {
  position: relative;
  background: transparent;
  border-radius: var(--radius-lg);
  border: none;
  overflow: visible;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
  transform: translateY(0) rotateX(0) rotateY(0) scale(1) rotateZ(0deg);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: cardWave 8s ease-in-out infinite;
  animation-delay: calc(var(--card-index, 0) * 0.1s);
  will-change: transform;
}

@keyframes cardWave {
  0%, 100% {
    transform: translateY(0) rotateZ(0deg) scale(1);
  }
  25% {
    transform: translateY(-8px) rotateZ(1deg) scale(1.01);
  }
  50% {
    transform: translateY(0) rotateZ(0deg) scale(1);
  }
  75% {
    transform: translateY(8px) rotateZ(-1deg) scale(1.01);
  }
}

.item-card.hidden {
  display: none;
}

/* Color glow effect */
.item-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(circle at center, var(--card-color, #f0574f) 0%, transparent 70%);
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  z-index: -1;
  filter: blur(12px);
}

.item-card:hover {
  transform: translateY(-8px) scale(1.05) rotateX(5deg) rotateY(-3deg) rotateZ(2deg) !important;
  box-shadow: var(--shadow-soft), 0 0 40px rgba(0, 0, 0, 0.15);
  animation-play-state: paused;
  z-index: 10;
}

.item-card:hover::before {
  opacity: 0.25;
  transform: scale(1.1);
}

.item-card figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: transparent;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.item-card figcaption {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-top: 6px;
}

.item-card .meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 2px 1px;
}

.item-card .meta p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.item-card .meta p:first-child {
  color: var(--muted);
}

.item-card .meta p:last-child {
  color: var(--text);
}

.color-chip {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.site-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--muted);
}

.site-footer .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-color);
  vertical-align: middle;
}

.about-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.about-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.about-panel {
  max-width: 520px;
  width: 100%;
  background: #fdfbf7;
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.about-panel h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.about-panel p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.about-panel .about-credit {
  margin-top: 10px;
  font-size: 12px;
}

/* Double-click hint */
.double-click-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9997;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%) translateY(20px);
}

.double-click-hint.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.hint-icon {
  font-size: 18px;
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.hint-text {
  flex: 1;
}

.hint-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: background 0.2s ease;
  padding: 0;
}

.hint-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Card hint indicator */
.item-card::after {
  content: "Double-click to view";
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  z-index: 5;
  backdrop-filter: blur(4px);
}

.item-card:hover::after {
  opacity: 1;
}

/* Favorite Button */
.favorite-btn {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  z-index: 10;
  opacity: 0;
  padding: 0;
}

.item-card:hover .favorite-btn {
  opacity: 1;
}

.favorite-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.favorite-btn.active {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: white;
  opacity: 1;
}

.favorite-btn.active::before {
  content: "♥";
}

.favorite-btn:not(.active)::before {
  content: "♡";
}

/* Heart particle effect */
.heart-particle {
  position: absolute;
  font-size: 20px;
  pointer-events: none;
  animation: heartFloat 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  z-index: 10000;
  font-weight: bold;
  text-shadow: 0 0 10px currentColor;
  filter: drop-shadow(0 0 4px currentColor);
  will-change: transform, opacity;
  transform-origin: center center;
}

@keyframes heartFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.5) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate(0, -10px) scale(1.2) rotate(60deg);
  }
  50% {
    opacity: 1;
    transform: translate(calc(var(--heart-tx, 0) * 0.6), calc(var(--heart-ty, -40px) * 0.6)) scale(1.5) rotate(180deg);
  }
  80% {
    opacity: 0.4;
    transform: translate(var(--heart-tx, 0), var(--heart-ty, -40px)) scale(1.1) rotate(300deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--heart-tx, 0) * 1.2), calc(var(--heart-ty, -40px) * 1.2)) scale(0.3) rotate(360deg);
  }
}

/* Particle effects */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  will-change: transform, opacity;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 0), var(--ty, -100px)) scale(0);
  }
}

/* Fullscreen Image Viewer */
.fullscreen-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fullscreen-viewer.active {
  opacity: 1;
  pointer-events: auto;
}

.viewer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 32px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10001;
}

.viewer-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

#viewer-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.viewer-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 48px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10001;
}

.viewer-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.viewer-prev {
  left: 20px;
}

.viewer-next {
  right: 20px;
}

.about-close {
  position: absolute;
  top: 9px;
  right: 9px;
  border: none;
  background: none;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--muted);
}

@media (max-width: 768px) {
  .page {
    margin-top: 20px;
    padding: 0 14px;
    max-width: 100%;
  }

  .site-header {
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }

  .site-title-block {
    max-width: 100%;
  }

  .site-title {
    font-size: 24px;
    margin-bottom: 4px;
  }

  .site-subtitle {
    font-size: 12px;
  }

  .site-meta {
    text-align: left;
    align-items: flex-start;
    width: 100%;
  }

  .meta-stats {
    margin-bottom: 8px;
  }

  .meta-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .controls {
    flex-direction: column;
    gap: 12px;
    padding: 12px 0 14px;
    margin-bottom: 20px;
  }

  .filter-scroll {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .filter-btn {
    white-space: nowrap;
    font-size: 10px;
    padding: 3px 8px;
  }

  .collection {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
  }

  .item-card {
    transform: translateY(0) scale(1) !important;
    border-radius: var(--radius-md);
  }

  .item-card:hover {
    transform: translateY(-2px) scale(1.01) !important;
  }

  .item-card::before {
    display: none;
  }

  /* Disable wave animations on mobile */
  .item-card {
    animation: none !important;
  }

  .item-card figure {
    border-radius: var(--radius-md);
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    min-height: 120px;
    aspect-ratio: 4 / 3;
  }

  .item-card img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .item-card figcaption {
    font-size: 10px;
    padding-top: 4px;
  }

  .item-card .meta p {
    font-size: 10px;
  }

  body::before,
  body::after {
    animation: none;
    opacity: 0.3;
  }

  .double-click-hint {
    font-size: 12px;
    padding: 8px 12px;
    bottom: 16px;
    left: 14px;
    right: 14px;
    max-width: calc(100% - 28px);
  }

  .hint-text {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 0 12px;
    margin-top: 16px;
  }

  .site-title {
    font-size: 20px;
  }

  .site-subtitle {
    font-size: 11px;
  }

  .collection {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
  }

  .item-card figure {
    min-height: 100px;
  }

  .item-card img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .item-card figcaption {
    font-size: 9px;
  }

  .item-card .meta p {
    font-size: 9px;
  }

  .stat-item {
    font-size: 20px;
  }

  .stat-label {
    font-size: 10px;
  }

  .ghost-link {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* Loading skeleton */
.loading-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.loading-skeleton.hidden {
    display: none;
  }

.skeleton-card {
  aspect-ratio: 4 / 3;
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    var(--bg-elevated) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--radius-lg);
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Keyboard shortcuts hint */
.keyboard-hint {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.keyboard-hint[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.keyboard-hint-content {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
}

.keyboard-hint-content h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.shortcut-item kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: 'Inter', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

  .shortcut-item span {
    color: var(--muted);
  }

/* Share modal */
.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.share-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.share-modal-content {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.share-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.share-close:hover {
  background: var(--bg);
}

.share-modal-content h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.share-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', inherit;
}

.share-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.share-btn span:first-child {
  font-size: 18px;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 13px;
  z-index: 10002;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 9996;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.scroll-to-top:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Loading progress bar */
.loading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 10003;
  pointer-events: none;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-color));
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--accent-color);
}

/* Card hover enhancements */
.item-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.3s ease;
}

.item-card:hover {
  filter: brightness(1.02);
}

/* Loading state for images */
.item-card img {
  transition: opacity 0.4s ease, transform 0.3s ease;
}

.item-card img:not([src=""]) {
  will-change: opacity;
}

