/* Gallery Page */

body.gallery-page {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  min-height: 100vh;
}

/* Nav */
.gallery-nav {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--sage);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-link {
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}
.nav-link:hover { color: var(--fg); background: rgba(62,92,71,0.06); }
.nav-link.active { color: var(--sage); font-weight: 500; }

/* Main */
.gallery-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Header */
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
}
.gallery-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--fg);
  margin: 0;
}
.gallery-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}
.btn-new {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--sage);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
  flex-shrink: 0;
}
.btn-new:hover { background: var(--sage-light); }
.btn-new svg { width: 16px; height: 16px; }

/* Empty state */
.gallery-empty {
  text-align: center;
  padding: 4rem 2rem;
}
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: var(--border);
}
.empty-icon svg { width: 100%; height: 100%; }
.gallery-empty h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  color: var(--fg);
}
.gallery-empty p { color: var(--muted); font-size: 0.9rem; margin: 0 0 2rem; }
.btn-start {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--sage);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-start:hover { background: var(--sage-light); }

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Artwork card */
.artwork-card {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.artwork-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(62,92,71,0.1);
}

.artwork-card .card-canvas {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FDFAF6;
  padding: 1.5rem;
  position: relative;
}
.card-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Page type badge on canvas */
.page-type-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  background: rgba(62,92,71,0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 500;
}

/* Card footer */
.card-footer {
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}
.card-timestamp {
  font-size: 0.75rem;
  color: var(--muted);
}
.card-colors {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* Share to Twitter button */
.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-share:hover {
  background: rgba(29,161,242,0.08);
  color: #1DA1F2;
  border-color: rgba(29,161,242,0.3);
}
.btn-share svg {
  width: 14px;
  height: 14px;
}
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.8);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Loading skeleton */
.card-skeleton {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.skeleton-canvas {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(90deg, #f0ebe4 25%, #e8e0d6 50%, #f0ebe4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-footer {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
}
.skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #f0ebe4 25%, #e8e0d6 50%, #f0ebe4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Mobile */
@media (max-width: 600px) {
  .gallery-header { flex-direction: column; align-items: flex-start; }
  .gallery-main { padding: 2rem 1.25rem; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .top-rails { grid-template-columns: 1fr; }
  .remixed-cards { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

/* Community gallery additions */
.card-creator {
  font-size: 0.75rem;
  color: var(--fg);
}
.top-rails {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.rail-card {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
}
.rail-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--fg);
  margin: 0 0 0.8rem;
}
.rail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rail-pill {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
}
.rail-pill strong {
  color: var(--fg);
  font-weight: 500;
}
.rail-muted {
  color: var(--muted);
  font-size: 0.8rem;
}
.rail-skeleton {
  display: inline-block;
  width: 80px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f0ebe4 25%, #e8e0d6 50%, #f0ebe4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.btn-remix {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  background: var(--sage);
  color: #fff;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s;
}
.btn-remix:hover { background: var(--sage-light); }

/* Remixed colorings rail — most-saved variant per featured scene */
.remixed-rail {
  margin-bottom: 2rem;
}
.remixed-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.remixed-card {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.remixed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(62,92,71,0.1);
}
.remixed-card .card-canvas {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FDFAF6;
  padding: 1.5rem;
  position: relative;
}
.remixed-card .card-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}
.remixed-card .card-footer {
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Weekly waitlist — "Get a new scene every Sunday" */
.waitlist-row {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.waitlist-eyebrow {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
  color: var(--fg);
  margin: 0;
  letter-spacing: 0.01em;
}
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 280px;
  max-width: 440px;
}
.waitlist-input-row {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}
.waitlist-input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--fg);
  outline: none;
  min-width: 0;
}
.waitlist-input::placeholder { color: var(--muted); }
.waitlist-btn {
  padding: 0.7rem 1.2rem;
  background: var(--sage);
  color: #F6F0E6;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s;
}
.waitlist-btn:hover:not(:disabled) { background: var(--sage-light); }
.waitlist-btn:disabled { opacity: 0.6; cursor: default; }
.waitlist-confirm {
  display: none;
  font-size: 0.82rem;
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
}
.waitlist-confirm--success {
  display: block;
  color: var(--sage);
  font-weight: 500;
}
.waitlist-confirm--error {
  display: block;
  color: #B85C38;
}
@media (max-width: 600px) {
  .waitlist-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .waitlist-form {
    max-width: none;
  }
  .waitlist-input-row {
    flex-direction: column;
    border-radius: 6px;
  }
  .waitlist-input {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .waitlist-btn {
    width: 100%;
    border-radius: 0;
  }
}