/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-start: #000000;
  --bg-mid: #0a0a0a;
  --bg-end: #050505;
  --gold: #d4af37;
  --gold-light: #f5d561;
  --gold-dark: #b8942e;
  --champagne: #f5e6c8;
  --surface: rgba(212,175,55,0.04);
  --surface-hover: rgba(212,175,55,0.08);
  --border: rgba(212,175,55,0.12);
  --text: #f5f0e8;
  --text-muted: rgba(245,240,232,0.45);
  --success: #6ecf8e;
  --error: #e05555;
  --radius: 16px;
  --radius-sm: 10px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 500px 350px at 15% 10%, rgba(212,175,55,0.07), transparent),
    radial-gradient(ellipse 400px 400px at 85% 80%, rgba(212,175,55,0.05), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Glitter overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(212,175,55,0.5), transparent),
    radial-gradient(1px 1px at 25% 35%, rgba(245,213,97,0.4), transparent),
    radial-gradient(1px 1px at 40% 8%, rgba(212,175,55,0.3), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(245,230,200,0.35), transparent),
    radial-gradient(1px 1px at 70% 20%, rgba(212,175,55,0.5), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(245,213,97,0.3), transparent),
    radial-gradient(1px 1px at 15% 60%, rgba(212,175,55,0.4), transparent),
    radial-gradient(1px 1px at 50% 75%, rgba(245,230,200,0.3), transparent),
    radial-gradient(1px 1px at 90% 40%, rgba(212,175,55,0.45), transparent),
    radial-gradient(1px 1px at 35% 90%, rgba(245,213,97,0.35), transparent),
    radial-gradient(1.5px 1.5px at 5% 85%, rgba(212,175,55,0.5), transparent),
    radial-gradient(1px 1px at 60% 5%, rgba(245,230,200,0.4), transparent),
    radial-gradient(1.5px 1.5px at 78% 65%, rgba(212,175,55,0.35), transparent),
    radial-gradient(1px 1px at 45% 50%, rgba(245,213,97,0.3), transparent),
    radial-gradient(1px 1px at 20% 95%, rgba(212,175,55,0.4), transparent),
    radial-gradient(1.5px 1.5px at 65% 30%, rgba(245,230,200,0.45), transparent),
    radial-gradient(1px 1px at 95% 10%, rgba(212,175,55,0.3), transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(245,213,97,0.35), transparent);
  animation: glitter-drift 12s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes glitter-drift {
  0%   { opacity: .5; }
  50%  { opacity: .9; }
  100% { opacity: .6; }
}

/* ===== Confetti Canvas ===== */
#confetti-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ===== Countdown Page ===== */
.countdown-page {
  position: fixed; inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
.countdown-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 500px 400px at 30% 25%, rgba(212,175,55,.08), transparent),
    radial-gradient(ellipse 400px 350px at 70% 75%, rgba(212,175,55,.06), transparent);
  pointer-events: none;
}
.countdown-inner {
  position: relative;
  text-align: center;
  padding: 40px 24px;
  animation: fadeIn 1s ease;
}
.countdown-deco {
  font-size: 2.5rem;
  animation: sparkle 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.4));
}
.countdown-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 10vw, 5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--champagne), var(--gold), var(--champagne), var(--gold-light));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
  line-height: 1.1;
  margin: 12px 0 4px;
}
.countdown-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: .75;
}
.countdown-date {
  margin-top: 20px;
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: .05em;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  margin: 36px 0 30px;
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.countdown-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 20px rgba(212,175,55,.25);
}
.countdown-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 6px;
}
.countdown-sep {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 6vw, 3rem);
  color: rgba(212,175,55,.3);
  line-height: 1;
  padding-top: 2px;
}
.countdown-tease {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-style: italic;
}

.countdown-qr-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.8rem;
  padding: 10px 20px;
  border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 50px;
  color: var(--gold);
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: 1px;
  transition: all .3s ease;
  background: rgba(212, 175, 55, .06);
}

.countdown-qr-link:hover {
  background: rgba(212, 175, 55, .15);
  border-color: var(--gold);
  transform: scale(1.05);
}

/* ===== Pseudo Modal ===== */
.pseudo-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

.pseudo-card {
  background: rgba(212, 175, 55, .06);
  border: 2px solid rgba(212, 175, 55, .3);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  animation: fadeInUp .5s ease;
}

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

.pseudo-deco { font-size: 3rem; margin-bottom: .8rem; }
.pseudo-title {
  font-family: 'Georgia', serif;
  color: var(--gold);
  font-size: 1.5rem;
  letter-spacing: 2px;
  margin-bottom: .4rem;
}
.pseudo-text {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 1.5rem;
}

.pseudo-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, .05);
  border: 1.5px solid rgba(212, 175, 55, .3);
  border-radius: 14px;
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
  outline: none;
  transition: border-color .3s;
  font-family: inherit;
}

.pseudo-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, .2);
}

.pseudo-input::placeholder { color: rgba(255, 255, 255, .25); }

.pseudo-btn {
  margin-top: 1.2rem;
  width: 100%;
}

.pseudo-error {
  color: #ff6b6b;
  font-size: .85rem;
  margin-top: .8rem;
  margin-bottom: -.4rem;
}

/* ===== Container ===== */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 14px 60px;
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
.header {
  text-align: center;
  padding: 36px 16px 20px;
}

.header-deco {
  font-size: 1.6rem;
  animation: sparkle 3s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(212,175,55,0.4));
}
@keyframes sparkle {
  0%,100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50%     { opacity: .5; transform: scale(1.15) rotate(8deg); }
}

.title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.6rem, 10vw, 4.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--champagne), var(--gold), var(--champagne), var(--gold-light));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
  line-height: 1.1;
  margin: 8px 0;
  letter-spacing: 0.02em;
  filter: drop-shadow(0 2px 12px rgba(212,175,55,0.15));
}
@keyframes shimmer {
  to { background-position: 300% center; }
}

.subtitle-accent {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: .8;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.stat {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .85rem;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}
.stat b { color: var(--gold); }

/* ===== Upload Section ===== */
.upload-section {
  margin: 28px 0;
  animation: slideUp .6s ease .15s both;
}

.upload-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 22px 12px;
  border: none; border-radius: var(--radius);
  cursor: pointer;
  font-size: .95rem; font-weight: 600;
  transition: all .25s ease;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn-icon { font-size: 2rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  box-shadow: 0 4px 24px rgba(212,175,55,.25);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 45%, rgba(255,255,255,0.35) 50%, transparent 55%);
  background-size: 250% 100%;
  animation: btn-shine 3s ease-in-out infinite;
}
@keyframes btn-shine {
  0%   { background-position: 200% center; }
  100% { background-position: -50% center; }
}
.btn-primary:hover,
.btn-primary:active {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,175,55,.35);
}

.btn-secondary {
  background: var(--surface);
  color: var(--gold);
  border: 1px solid rgba(212,175,55,.30);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover,
.btn-secondary:active {
  background: rgba(212,175,55,.08);
  border-color: rgba(212,175,55,.50);
  transform: translateY(-2px);
}

/* ===== Like Button ===== */
.like-btn {
  position: absolute;
  bottom: 5px; right: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 12px;
  padding: 4px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
  z-index: 2;
  transition: transform .15s ease;
}
.like-btn:active { transform: scale(.88); }
.like-heart {
  width: 18px; height: 18px;
  fill: rgba(255,255,255,.4);
  transition: fill .25s ease, filter .25s ease;
  flex-shrink: 0;
}
.like-btn.liked .like-heart {
  fill: var(--gold);
  filter: drop-shadow(0 0 5px rgba(212,175,55,.45));
}
.like-count {
  font-size: .6rem;
  color: rgba(255,255,255,.7);
  font-weight: 700;
  line-height: 1;
}
@keyframes heartPop {
  0%  { transform: scale(1); }
  40% { transform: scale(1.35); }
  100%{ transform: scale(1); }
}
.like-btn.pop .like-heart {
  animation: heartPop .35s ease;
}

/* Like in modal — moved to modal section below */

/* Like on small timeline thumbs */
.timeline-thumb .like-btn { padding: 2px 5px; bottom: 3px; right: 3px; }
.timeline-thumb .like-heart { width: 13px; height: 13px; }
.timeline-thumb .like-count { font-size: .5rem; }

/* ===== Ranking ===== */
.ranking-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  animation: fadeIn .4s ease both;
  transition: background .2s ease;
}
.ranking-item:active { background: var(--surface-hover); }
@media (hover:hover) { .ranking-item:hover { background: var(--surface-hover); } }

.ranking-pos {
  font-size: 1.4rem;
  font-weight: 800;
  min-width: 36px;
  text-align: center;
  color: var(--gold);
}
.ranking-pos.num {
  font-size: 1rem;
  color: var(--text-muted);
}
.ranking-thumb {
  width: 70px; height: 70px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.ranking-thumb img,
.ranking-thumb video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ranking-thumb .video-badge {
  width: 26px; height: 26px; font-size: .65rem;
}
.ranking-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.ranking-likes {
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 700;
}
.ranking-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-style: italic;
}

/* ===== Paparazzi ===== */
.paparazzi-title {
  text-align: center;
  color: var(--gold);
  font-size: 1.3rem;
  font-family: 'Georgia', serif;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.paparazzi-row {
  cursor: default;
}

.paparazzi-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.paparazzi-pseudo {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.paparazzi-stats {
  font-size: .85rem;
  color: var(--text-muted);
}

/* Paparazzi animations */
.pap-me {
  border-left: 3px solid var(--gold) !important;
}

.pap-arrow {
  color: #4caf50;
  font-size: .75rem;
  font-weight: 700;
  margin-left: auto;
  flex-shrink: 0;
}

.pap-up {
  animation: papSlideUp .6s ease;
}

.pap-down {
  animation: papFadeIn .5s ease;
}

.pap-podium {
  animation: papPodium 1s ease;
}

.pap-crown {
  animation: papCrown 1.2s ease;
}

@keyframes papSlideUp {
  0%   { transform: translateY(20px); opacity: 0; }
  40%  { transform: translateY(-4px); opacity: 1; }
  100% { transform: translateY(0); }
}

@keyframes papFadeIn {
  from { opacity: .3; }
  to   { opacity: 1; }
}

@keyframes papPodium {
  0%   { transform: scale(1); background: rgba(212, 175, 55, 0); }
  30%  { transform: scale(1.04); background: rgba(212, 175, 55, .15); }
  60%  { transform: scale(1.02); }
  100% { transform: scale(1); background: rgba(212, 175, 55, 0); }
}

@keyframes papCrown {
  0%   { transform: scale(1); box-shadow: none; }
  20%  { transform: scale(1.05); box-shadow: 0 0 20px rgba(212, 175, 55, .5); }
  50%  { transform: scale(1.02); box-shadow: 0 0 40px rgba(212, 175, 55, .3); }
  100% { transform: scale(1); box-shadow: none; }
}

/* Toast notification */
.pap-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  padding: 14px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .5px;
  z-index: 10000;
  opacity: 0;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .4s ease;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

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

.toast-crown {
  background: linear-gradient(135deg, #d4af37, #f5d76e);
  color: #000;
  box-shadow: 0 4px 30px rgba(212, 175, 55, .5);
}

.toast-podium {
  background: linear-gradient(135deg, #d4af37aa, #b8860b);
  color: #fff;
  box-shadow: 0 4px 20px rgba(212, 175, 55, .4);
}

.toast-up {
  background: rgba(76, 175, 80, .9);
  color: #fff;
  box-shadow: 0 4px 16px rgba(76, 175, 80, .3);
}

/* ===== Upload Progress ===== */
.upload-progress-zone {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(10px);
  animation: fadeIn .35s ease;
}
.upload-progress-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  font-weight: 600; font-size: .95rem;
}

.upload-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.upload-item:last-child { border-bottom: none; }

.upload-item-icon { font-size: 1.25rem; flex-shrink: 0; }

.upload-item-info { flex: 1; min-width: 0; }

.upload-item-name {
  font-size: .8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
  color: var(--text-muted);
}

.upload-item-bar {
  height: 5px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  overflow: hidden;
}
.upload-item-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  background-size: 200% 100%;
  animation: fill-shimmer 1.5s linear infinite;
  border-radius: 3px;
  width: 0%;
  transition: width .25s ease;
}
@keyframes fill-shimmer {
  to { background-position: -200% center; }
}
.upload-item-fill.complete { background: var(--success); }
.upload-item-fill.error    { background: var(--error); }

.upload-item-status {
  font-size: .78rem;
  color: var(--text-muted);
  flex-shrink: 0; min-width: 38px;
  text-align: right;
}
.upload-item-status.complete { color: var(--success); }
.upload-item-status.error    { color: var(--error); }

/* ===== Gallery ===== */
.gallery-section {
  margin-top: 36px;
  animation: slideUp .6s ease .35s both;
}
.gallery-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap; gap: 10px;
}
.gallery-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
}

.gallery-tabs {
  display: flex; gap: 4px;
  background: var(--surface);
  padding: 4px; border-radius: 12px;
}
.tab {
  padding: 7px 14px; border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 9px;
  cursor: pointer;
  font-size: .82rem; font-weight: 600;
  transition: all .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.tab.active {
  background: var(--gold);
  color: #000;
}

/* Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: rgba(212,175,55,.03);
  border: 1px solid rgba(212,175,55,.08);
  animation: fadeIn .45s ease both;
}
.gallery-item img,
.gallery-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.gallery-item:active img,
.gallery-item:active video { transform: scale(1.05); }

@media (hover:hover) {
  .gallery-item:hover img,
  .gallery-item:hover video { transform: scale(1.06); }
}

/* Video badge */
.video-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 46px; height: 46px;
  background: rgba(0,0,0,.55);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* Mine badge */
.mine-badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--gold);
  color: #000;
  font-size: .6rem; font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: .06em;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(212,175,55,.3);
}

.pseudo-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, .7);
  color: rgba(255, 255, 255, .9);
  font-size: .6rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  pointer-events: none;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.modal-pseudo {
  text-align: center;
  color: rgba(255, 255, 255, .7);
  font-size: .85rem;
  margin-top: 6px;
  letter-spacing: .5px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.shake { animation: shake .4s ease; }

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 24px;
  margin-left: 6px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 10px; bottom: 24px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), rgba(212,175,55,.08));
  border-radius: 1px;
}

.timeline-block {
  position: relative;
  margin-bottom: 28px;
  padding-left: 14px;
  animation: fadeIn .4s ease both;
}
.timeline-block::before {
  content: '';
  position: absolute;
  left: -24px; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(212,175,55,.35);
  border: 2px solid #000;
}

.timeline-block-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.timeline-hour {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.timeline-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.timeline-count {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 5px;
}

.timeline-thumb {
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(212,175,55,.06);
  transition: transform .2s ease;
}
.timeline-thumb:active { transform: scale(.95); }

@media (hover:hover) {
  .timeline-thumb:hover { transform: scale(1.05); }
}

.timeline-thumb img,
.timeline-thumb video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.timeline-thumb .video-badge {
  width: 28px; height: 28px;
  font-size: .7rem;
}
.timeline-thumb .mine-badge {
  font-size: .5rem;
  padding: 1px 5px;
  top: 4px; right: 4px;
}

/* Empty state */
.gallery-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3.5rem; margin-bottom: 12px; opacity: .25; }
.empty-hint { margin-top: 6px; font-size: .88rem; }

/* ===== Modal / Lightbox ===== */
.modal {
  position: fixed; inset: 0;
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(16px);
}
.modal-content {
  position: relative;
  max-width: 96vw; max-height: 94vh;
  z-index: 1;
  animation: zoomIn .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-close {
  position: absolute; top: -44px; right: -4px;
  background: rgba(255,255,255,.12);
  border: none; color: #fff;
  font-size: 1.6rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  z-index: 4;
}
.modal-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}
.modal-body img {
  max-width: 96vw; max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  pointer-events: none;
}
.modal-body video {
  max-width: 96vw; max-height: 78vh;
  border-radius: var(--radius-sm);
  display: block;
  background: #000;
}

/* Navigation arrows (desktop) */
.modal-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-size: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  z-index: 3;
  transition: background .2s ease;
}
.modal-arrow:hover { background: rgba(255,255,255,.18); }
.modal-arrow-prev { left: -56px; }
.modal-arrow-next { right: -56px; }

/* Invisible swipe zones (mobile) */
.modal-nav-zone {
  position: absolute;
  top: 0; bottom: 0; width: 25%;
  z-index: 2;
}
.modal-nav-zone.prev { left: 0; }
.modal-nav-zone.next { right: 0; }
.modal-nav-zone.hidden { pointer-events: none; }

/* Double-tap heart animation */
.modal-heart-anim {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
}
.modal-heart-anim.show {
  animation: heartBurst .8s ease forwards;
}
@keyframes heartBurst {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
  15%  { opacity: 1; transform: translate(-50%,-50%) scale(1.1); }
  30%  { transform: translate(-50%,-50%) scale(.95); }
  50%  { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.3); }
}

/* Modal like (below media) */
.modal-like {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.modal-like .like-btn {
  position: static;
  padding: 8px 18px;
  border-radius: 20px;
  gap: 6px;
  background: rgba(255,255,255,.1);
}
.modal-like .like-heart { width: 24px; height: 24px; }
.modal-like .like-count { font-size: .95rem; }

@media (max-width: 600px) {
  .modal-arrow { display: none; }
  .modal-body img  { max-height: 72vh; }
  .modal-body video { max-height: 72vh; }
}

/* ===== Animations ===== */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .upload-buttons { grid-template-columns: 1fr; }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .gallery-item { border-radius: 6px; }
  .video-badge { width: 36px; height: 36px; font-size: .9rem; }
  .modal-close { top: -40px; }
}

@media (min-width: 768px) {
  .container { padding: 28px 24px 70px; }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 10px;
  }
}
