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

body {
  background: linear-gradient(145deg, #0d0d0d 0%, #1a1a1a 50%, #0f0f0f 100%);
  min-height: 100vh;
  font-family: "IBM Plex Mono", monospace, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  color: #e0e0e0;
}

/* ─── HEADER ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0d0d0d;
  border-bottom: 2px solid #fff;
  will-change: transform;
}

.site-header .header-inner {
  padding: 16px 14px 12px;
  transition: padding 0.35s ease;
}

.site-header h1 {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  transition: font-size 0.35s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header .tagline {
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 400;
  color: #888;
  letter-spacing: 0.01em;
  line-height: 1.3;
  max-height: 50px;
  opacity: 1;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    margin-top 0.35s ease;
}

/* Collapsed state */
.site-header.collapsed .header-inner {
  padding: 8px 14px;
}

.site-header.collapsed h1 {
  font-size: 0.8rem;
}

.site-header.collapsed .tagline {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

/* Header buttons */
.header-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  max-height: 40px;
  opacity: 1;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    margin-top 0.35s ease;
}

.header-buttons button {
  background: none;
  border: 1px solid #555;
  color: #888;
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.header-buttons button:hover {
  color: #fff;
  border-color: #fff;
}

.site-header.collapsed .header-buttons {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

@media (min-width: 480px) {
  .site-header .header-inner {
    padding: 20px 18px 14px;
  }
  .site-header h1 {
    font-size: 1.6rem;
  }
  .site-header .tagline {
    font-size: 0.78rem;
  }
  .site-header.collapsed .header-inner {
    padding: 9px 18px;
  }
  .site-header.collapsed h1 {
    font-size: 0.85rem;
  }
}

@media (min-width: 768px) {
  .site-header .header-inner {
    padding: 28px 28px 20px;
  }
  .site-header h1 {
    font-size: 2.4rem;
  }
  .site-header .tagline {
    font-size: 0.82rem;
    margin-top: 8px;
  }
  .site-header.collapsed .header-inner {
    padding: 10px 28px;
  }
  .site-header.collapsed h1 {
    font-size: 0.95rem;
  }
}

@media (min-width: 1024px) {
  .site-header h1 {
    font-size: 3rem;
  }
}

/* ─── GALLERY ─── */
.gallery-wrap {
  padding: 12px;
}

.gallery {
  column-count: 2;
  column-gap: 12px;
}

@media (min-width: 480px) {
  .gallery {
    column-count: 3;
    column-gap: 14px;
  }
  .gallery-wrap {
    padding: 16px;
  }
}

@media (min-width: 768px) {
  .gallery {
    column-count: 4;
    column-gap: 16px;
  }
  .gallery-wrap {
    padding: 20px;
  }
}

@media (min-width: 1024px) {
  .gallery {
    column-count: 5;
    column-gap: 18px;
  }
  .gallery-wrap {
    padding: 24px;
  }
}

@media (min-width: 1400px) {
  .gallery {
    column-count: 6;
    column-gap: 20px;
  }
  .gallery-wrap {
    padding: 32px;
  }
}

/* ─── STICKER CARD ─── */
.sticker-card {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #1e1e1e;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

@media (min-width: 480px) {
  .sticker-card {
    margin-bottom: 14px;
    border-radius: 18px;
  }
}

@media (min-width: 768px) {
  .sticker-card {
    margin-bottom: 16px;
    border-radius: 20px;
  }
}

.sticker-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.08);
}

.sticker-card:active {
  transform: scale(0.98);
}

/* ─── STARRED SECTION ─── */
.starred-section {
  padding: 0 12px;
  display: none;
}

.starred-section.has-stars {
  display: block;
}

.starred-section .section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #f5c518;
  padding: 12px 0 8px;
  border-bottom: 1px solid #333;
  margin-bottom: 12px;
}

.starred-gallery {
  column-count: 2;
  column-gap: 12px;
}

@media (min-width: 480px) {
  .starred-section { padding: 0 16px; }
  .starred-gallery { column-count: 3; column-gap: 14px; }
}
@media (min-width: 768px) {
  .starred-section { padding: 0 20px; }
  .starred-gallery { column-count: 4; column-gap: 16px; }
}
@media (min-width: 1024px) {
  .starred-section { padding: 0 24px; }
  .starred-gallery { column-count: 5; column-gap: 18px; }
}
@media (min-width: 1400px) {
  .starred-section { padding: 0 32px; }
  .starred-gallery { column-count: 6; column-gap: 20px; }
}

/* Loading skeleton */
.sticker-card .loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  background-size: 200% 200%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sticker-card.loaded .loader {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Sticker image */
.sticker-img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.sticker-card.loaded .sticker-img {
  opacity: 1;
}

/* Aspect ratio placeholder */
.sticker-card::before {
  content: "";
  display: block;
  padding-top: var(--aspect-ratio, 100%);
}

.sticker-card .sticker-img,
.sticker-card .loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticker-card.loaded::before {
  display: none;
}

.sticker-card.loaded {
  position: relative;
}

.sticker-card.loaded .sticker-img {
  position: relative;
}

/* ─── FULLSCREEN MODAL ─── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ─── MODAL ACTION BAR ─── */
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

.modal-actions button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #999;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.modal-actions button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.modal-actions button:active {
  transform: scale(0.95);
}

.modal-actions .btn-star-modal.starred {
  color: #f5c518;
  border-color: rgba(245, 197, 24, 0.3);
}

.modal-actions .btn-hide-modal:hover {
  color: #e25555;
  border-color: rgba(226, 85, 85, 0.3);
}

.modal-actions .btn-download:hover {
  color: #5ecf8a;
  border-color: rgba(94, 207, 138, 0.3);
}

.close-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  z-index: 1001;
}

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

.close-btn:active {
  transform: scale(0.95);
}

.close-btn::before,
.close-btn::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

.close-btn::before {
  transform: rotate(45deg);
}

.close-btn::after {
  transform: rotate(-45deg);
}

/* ─── FOOTER ─── */
.site-footer {
  border-top: 2px solid #fff;
  padding: 20px;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #555;
}

.site-footer .heart {
  color: #e25555;
  display: inline-block;
  animation: heartbeat 1.2s ease-in-out infinite;
}

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

/* ─── BOTTOM ACTION BAR ─── */
.bottom-actions {
  text-align: center;
  padding: 8px 12px 4px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.bottom-actions:empty {
  display: none;
}

.bottom-actions button {
  background: none;
  border: 1px solid #333;
  color: #555;
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.bottom-actions button:hover {
  color: #aaa;
  border-color: #666;
}

/* ─── INFO MODAL ─── */
.info-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.info-modal.active {
  opacity: 1;
  visibility: visible;
}

.info-modal-content {
  max-width: 520px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px 28px;
  border: 2px solid #fff;
  background: #0d0d0d;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.info-modal.active .info-modal-content {
  transform: scale(1);
}

.info-modal-content h2 {
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

.info-modal-body ul {
  list-style: none;
  padding: 0;
}

.info-modal-body li {
  font-size: 0.78rem;
  color: #aaa;
  line-height: 1.5;
  padding: 6px 0;
  border-bottom: 1px solid #1a1a1a;
}

.info-modal-body li:last-child {
  border-bottom: none;
}

.info-modal-body li::before {
  content: "— ";
  color: #555;
}

.info-modal-body strong {
  color: #fff;
  font-weight: 700;
}

.info-modal-body em {
  color: #666;
  font-style: normal;
}

/* Subtle scroll hint gradient at bottom */
body::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(13, 13, 13, 0.9), transparent);
  pointer-events: none;
  z-index: 10;
}
