:root {
  color-scheme: dark;
  --font-display: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gold-50: #fbf6e9;
  --gold-100: #f5ebc9;
  --gold-200: #eddaa0;
  --gold-300: #e3c26a;
  --gold-400: #d8ac47;
  --gold-600: #b8860b;
  --gold-900: #4a3410;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background-color: #050403;
}

body {
  font-family: var(--font-sans);
  color: var(--gold-50);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-party {
  background-color: #050403;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(216, 172, 71, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(216, 172, 71, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(184, 134, 11, 0.10) 0%, transparent 55%);
}

.font-display { font-family: var(--font-display); }

.text-gold-gradient {
  background-image: linear-gradient(135deg, var(--gold-100) 0%, var(--gold-400) 45%, var(--gold-900) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-gold {
  display: block;
  width: 100%;
  border: none;
  cursor: pointer;
  background-image: linear-gradient(135deg, var(--gold-100) 0%, var(--gold-400) 50%, var(--gold-600) 100%);
  color: #1a1206;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  border-radius: 1rem;
  padding: 1.15rem 1.5rem;
  box-shadow: 0 10px 30px rgba(184, 134, 11, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  text-align: center;
  text-decoration: none;
}
.btn-gold:active { transform: scale(0.98); filter: brightness(0.96); }

.btn-outline {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 1rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid rgba(216, 172, 71, 0.4);
  color: var(--gold-200);
  background: transparent;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
}

.card-glass {
  background: rgba(20, 16, 9, 0.6);
  border: 1px solid rgba(216, 172, 71, 0.18);
  backdrop-filter: blur(6px);
  border-radius: 1.5rem;
}

.wrap {
  position: relative;
  z-index: 10;
  max-width: 28rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.watermark {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.watermark span {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1;
  font-size: 42vw;
  color: rgba(216, 172, 71, 0.08);
  user-select: none;
}

.hero { text-align: center; margin-bottom: 2rem; }
.hero .kicker {
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: rgba(227, 194, 106, 0.8);
}
.hero .big-18 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 4.5rem;
  line-height: 1;
  margin: 0.25rem 0;
}
.hero .event-date {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(245, 235, 201, 0.6);
  margin-top: 0.25rem;
}

.panel {
  padding: 2rem 1.5rem;
  box-shadow: 0 0 0 1px rgba(216, 172, 71, 0.35), 0 8px 30px rgba(0, 0, 0, 0.55);
  animation: fade-in 0.4s ease-out;
}

.panel h1 {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  margin: 0;
}

.panel .lead {
  margin-top: 1rem;
  text-align: center;
  color: rgba(245, 235, 201, 0.85);
  line-height: 1.5;
}

.upload-area { margin-top: 2rem; }
.upload-hint {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(245, 235, 201, 0.7);
  line-height: 1.4;
}

.file-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.file-item { border-radius: 0.85rem; padding: 0.7rem 1rem; font-size: 0.85rem; }
.file-item .row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.file-item .name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(251, 246, 233, 0.9); }
.file-item .meta { white-space: nowrap; font-size: 0.75rem; color: var(--gold-300); font-variant-numeric: tabular-nums; }
.progress-track { margin-top: 0.5rem; height: 0.35rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background-image: linear-gradient(135deg, var(--gold-100), var(--gold-400), var(--gold-600)); transition: width 0.2s ease-out; }
.file-item .error-row { margin-top: 0.5rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.file-item .error-msg { font-size: 0.75rem; color: #fca5a5; }
.retry-btn { border-radius: 999px; border: 1px solid rgba(216, 172, 71, 0.4); background: none; color: var(--gold-200); font-size: 0.75rem; padding: 0.25rem 0.75rem; cursor: pointer; }

.global-error {
  margin-top: 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(60, 10, 10, 0.4);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: #fecaca;
}

.done-state { text-align: center; margin-top: 2rem; animation: fade-in 0.4s ease-out; }
.done-state .thanks { font-family: var(--font-display); font-size: 1.6rem; }
.done-state .thanks-sub { margin-top: 0.5rem; color: rgba(245, 235, 201, 0.85); }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------------
   Efekty "wow": smuga za kursorem + latajace baloniki.
   Oba wylaczane automatycznie przy prefers-reduced-motion.
   ------------------------------------------------------------------- */

#cursor-trail-canvas {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

#balloons {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.balloon {
  position: absolute;
  bottom: -20vh;
  width: 46px;
  height: 58px;
  border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
  opacity: 0.55;
  animation-name: balloon-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 1px;
  height: 16px;
  background: rgba(216, 172, 71, 0.35);
  transform: translateX(-50%);
}
.balloon.gold {
  background: radial-gradient(circle at 32% 28%, #fdf3d6, #d8ac47 55%, #96690a 100%);
  box-shadow: 0 0 18px rgba(216, 172, 71, 0.25);
}
.balloon.dark {
  background: radial-gradient(circle at 32% 28%, #3a3226, #17130c 60%, #060402 100%);
  box-shadow: 0 0 14px rgba(216, 172, 71, 0.12);
}

@keyframes balloon-rise {
  0%   { transform: translateY(0) translateX(0) rotate(-4deg); }
  50%  { transform: translateY(-60vh) translateX(20px) rotate(4deg); }
  100% { transform: translateY(-125vh) translateX(-10px) rotate(-4deg); }
}
