/* ============================================================
   Prezent dla Taty — design system
   Mobile-first, Liquid Glass inspired, dark mode
   ============================================================ */

:root {
  --bg-0: #0a0c12;
  --bg-1: #11141c;
  --bg-2: #1a1f2b;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --edge: rgba(255, 255, 255, 0.08);
  --edge-bright: rgba(255, 255, 255, 0.18);

  --text: #f5f5f7;
  --text-dim: rgba(245, 245, 247, 0.62);
  --text-fade: rgba(245, 245, 247, 0.32);

  --gold: #f5c563;
  --gold-soft: rgba(245, 197, 99, 0.18);
  --pink: #ff6b9d;
  --cyan: #6ec1ff;
  --green: #6fe8a3;
  --red: #ff5b6e;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 36px;

  --shadow-1: 0 6px 22px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, 0.55);
  --shadow-glow-gold: 0 0 36px rgba(245, 197, 99, 0.35);
  --shadow-glow-green: 0 0 28px rgba(111, 232, 163, 0.45);

  --container: 720px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  /* gradient tła */
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(245, 197, 99, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 40% at 100% 30%, rgba(255, 107, 157, 0.08), transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(110, 193, 255, 0.06), transparent 60%),
    var(--bg-0);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ============================================================
   INTRO MODAL
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fade-in 300ms ease-out;
}
.intro-card {
  background: linear-gradient(135deg, rgba(245, 197, 99, 0.08), rgba(255, 107, 157, 0.04));
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  padding: 36px 26px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-2);
}
.intro-emoji { font-size: 64px; line-height: 1; margin-bottom: 12px; }
.intro-card h1 { margin: 0 0 8px; font-size: 28px; font-weight: 800; }
.intro-card p { margin: 0 0 22px; color: var(--text-dim); font-size: 15px; }
.who-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.who-btn {
  background: var(--surface);
  border: 1px solid var(--edge);
  color: var(--text);
  padding: 14px 12px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms;
  min-height: 50px;
}
.who-btn:active { transform: scale(0.97); }
.who-btn:hover { background: var(--surface-strong); border-color: var(--edge-bright); }
.hint {
  font-size: 12px !important;
  margin-top: 16px !important;
  color: var(--text-fade) !important;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 48px 0 36px;
  overflow: hidden;
}
.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(245, 197, 99, 0.3);
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.hero-title {
  font-size: 44px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #fff 0%, #f5c563 50%, #ff6b9d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.05;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 16px;
  margin: 0 0 28px;
  max-width: 480px;
}

.vote-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  flex-wrap: wrap;
}
.vote-counter {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.vote-counter-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  font-feature-settings: 'tnum';
}
.vote-counter-of {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}
.vote-dots {
  display: flex;
  gap: 6px;
  flex: 1;
}
.vote-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: all 250ms;
}
.vote-dot.filled {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(245, 197, 99, 0.5);
}
.who-am-i {
  background: var(--surface-strong);
  border: 1px solid var(--edge);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 120ms;
}
.who-am-i:hover { background: rgba(245, 197, 99, 0.18); }

/* ============================================================
   OPTIONS
   ============================================================ */
.options {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 8px;
  padding-bottom: 40px;
}

.option-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.option-card.voted {
  border-color: var(--green);
  box-shadow: var(--shadow-glow-green);
  background: linear-gradient(135deg, rgba(111, 232, 163, 0.08), var(--surface));
}
.option-card.voted::before {
  content: '✓';
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #002419;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  z-index: 3;
  box-shadow: 0 4px 16px rgba(111, 232, 163, 0.4);
}

/* Cover gradient z dużą ikoną — działa też bez obrazka */
.option-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Subtelny radial pattern żeby gradient nie był 'pusty' */
.option-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.12) 0%, transparent 35%),
    radial-gradient(circle at 70% 60%, rgba(0, 0, 0, 0.25) 0%, transparent 40%);
  z-index: 1;
  pointer-events: none;
}
.option-cover-emoji {
  font-size: 96px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
  z-index: 2;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.option-card:hover .option-cover-emoji {
  transform: scale(1.05) rotate(-2deg);
}
.option-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.95;
}
.option-cover-img + .option-cover-emoji {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-size: 52px;
  z-index: 3;
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(8px);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.option-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 12, 18, 0.7) 100%);
  z-index: 2;
  pointer-events: none;
}

.option-body {
  padding: 22px 24px 24px;
}

.option-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.option-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.option-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 16px;
}

.option-pricing {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--r-md);
  border: 1px solid var(--edge);
}
.option-pricing-total {
  font-size: 14px;
  color: var(--text-dim);
}
.option-pricing-total b {
  color: var(--text);
  font-weight: 700;
  font-feature-settings: 'tnum';
}
.option-pricing-arrow { color: var(--text-fade); }
.option-pricing-share {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 800;
  color: var(--gold);
  font-feature-settings: 'tnum';
  margin-left: auto;
}
.option-pricing-share-num { font-size: 24px; }
.option-pricing-share-unit { font-size: 12px; color: var(--text-dim); }

.option-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 20px;
}
.option-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: var(--r-sm);
  border: 1px solid var(--edge);
}
.option-item-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  width: 38px;
  text-align: center;
}
.option-item-body { flex: 1; min-width: 0; }
.option-item-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 2px;
}
.option-item-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 6px;
  line-height: 1.45;
}
.option-item-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(110, 193, 255, 0.1);
  border: 1px solid rgba(110, 193, 255, 0.25);
  border-radius: 100px;
  color: var(--cyan);
}
.option-item-link:hover {
  background: rgba(110, 193, 255, 0.2);
  text-decoration: none;
}

.option-byline {
  font-size: 12px;
  color: var(--text-fade);
  margin: 0 0 14px;
  font-style: italic;
}

.option-votes {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 16px;
  min-height: 24px;
}
.option-votes-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--gold-soft);
  color: var(--gold);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.option-votes-empty {
  font-size: 12px;
  color: var(--text-fade);
  font-style: italic;
}

.vote-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), #e6a82c);
  color: #1a0d00;
  border: none;
  padding: 16px 20px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 180ms;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  box-shadow: 0 4px 18px rgba(245, 197, 99, 0.35);
}
.vote-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(245, 197, 99, 0.45); }
.vote-btn:active { transform: scale(0.97); }
.option-card.voted .vote-btn {
  background: rgba(111, 232, 163, 0.18);
  color: var(--green);
  border: 1px solid var(--green);
  box-shadow: none;
}

/* ============================================================
   RESULTS
   ============================================================ */
.results {
  padding: 32px 0 40px;
}
.results-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.results-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.result-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--bar-width, 0%);
  background: linear-gradient(90deg, var(--gold-soft) 0%, transparent 100%);
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}
.result-row.leader::before {
  background: linear-gradient(90deg, rgba(111, 232, 163, 0.25) 0%, transparent 100%);
}
.result-row > * { position: relative; z-index: 1; }
.result-tag {
  font-weight: 700;
  font-size: 13px;
  width: 36px;
  flex-shrink: 0;
  color: var(--gold);
}
.result-row.leader .result-tag { color: var(--green); }
.result-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}
.result-count {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
  font-feature-settings: 'tnum';
}
.result-trophy {
  font-size: 18px;
}

.results-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
}
.results-stat {
  display: flex;
  flex-direction: column;
  text-align: center;
}
.results-stat-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-fade);
  font-weight: 700;
  margin-bottom: 4px;
}
.results-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 32px 20px 60px;
  color: var(--text-fade);
  font-size: 13px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.option-card { animation: slide-up 400ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.option-card:nth-child(1) { animation-delay: 80ms; }
.option-card:nth-child(2) { animation-delay: 160ms; }
.option-card:nth-child(3) { animation-delay: 240ms; }
.option-card:nth-child(4) { animation-delay: 320ms; }
.option-card:nth-child(5) { animation-delay: 400ms; }

/* ============================================================
   GRADIENT PRESETS PER OPTION
   ============================================================ */
.cover-1 { background: linear-gradient(135deg, #3d5a3d, #6b8e6b, #c8a878); }
.cover-2a { background: linear-gradient(135deg, #4a3525, #8b6b4a, #c9a978); }
.cover-2b { background: linear-gradient(135deg, #1a1f2b, #3a3f5b, #6a4a8b); }
.cover-3 { background: linear-gradient(135deg, #2d4a3d, #5b8e6b, #a8c878); }
.cover-4 { background: linear-gradient(135deg, #2a4a6a, #5e8eb8, #a8d8e8); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 640px) {
  .hero-title { font-size: 56px; }
  .option-cover-emoji { font-size: 128px; }
  .option-body { padding: 28px 32px 32px; }
}

@media (max-width: 480px) {
  .hero { padding: 32px 0 28px; }
  .hero-title { font-size: 36px; }
  .hero-sub { font-size: 15px; }
  .vote-status { padding: 12px 14px; }
  .option-cover { aspect-ratio: 5 / 3; }
  .option-cover-emoji { font-size: 72px; }
  .option-body { padding: 18px 18px 20px; }
  .option-title { font-size: 19px; }
  .results-meta { grid-template-columns: 1fr; }
}
