:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-hero: #0f1729;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f97316;
  --gradient: linear-gradient(135deg, #2563eb, #7c3aed);
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 50px -10px rgba(15,23,42,.18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.logo-mark {
  color: var(--accent);
  font-size: 1.4rem;
}
.logo-accent { color: var(--primary); }
.nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
  transition: color .15s;
}
.nav a:hover { color: var(--text); }
.btn-cta {
  background: var(--text);
  color: #fff;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  transition: background .15s;
}
.btn-cta:hover { background: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(ellipse at top, #1e293b 0%, #0f172a 50%);
  color: #fff;
  padding: 5rem 1.5rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(124,58,237,.25), transparent 40%),
              radial-gradient(circle at 80% 60%, rgba(37,99,235,.25), transparent 40%);
  pointer-events: none;
}
.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #cdd5e5;
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.gradient-text {
  background: linear-gradient(90deg, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: #cdd5e5;
  max-width: 540px;
  margin: 0 auto 2.5rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.hero-stats div {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  padding: .8rem 1.4rem;
  border-radius: 10px;
  color: #cdd5e5;
  font-size: .9rem;
}
.hero-stats strong {
  display: block;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: .9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: background .15s, transform .15s;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  padding: .9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: background .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-large {
  padding: 1.1rem 2.4rem;
  font-size: 1.1rem;
}

/* ---------- Container ---------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}
.section-alt {
  background: var(--bg-alt);
  margin: 0 -1000px;
  padding: 5rem 1000px;
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}
.section-eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .8rem;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--bg-alt);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.95) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  color: #fff;
  opacity: 0;
  transition: opacity .25s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay .num {
  font-size: .8rem;
  font-weight: 600;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.gallery-overlay .name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: .2rem 0;
}
.gallery-overlay .author {
  font-size: .9rem;
  color: #cbd5e1;
}
.vote-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: #fff;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .2s, transform .2s;
}
.gallery-item:hover .vote-badge { opacity: 1; transform: translateY(0); }

.vote-hint {
  text-align: center;
  color: var(--muted);
  margin-top: 2rem;
  font-size: .95rem;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: -.04em;
}
.step h3 {
  font-size: 1.2rem;
  margin-bottom: .6rem;
  font-weight: 700;
}
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Rules ---------- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.rule {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  background: #fff;
}
.rule h3 {
  font-size: 1.1rem;
  margin-bottom: .6rem;
  color: var(--text);
}
.rule p { color: var(--muted); font-size: .95rem; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.7);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 2.5rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pop .25s ease;
}
@keyframes pop {
  from { transform: scale(.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--bg-alt);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
}
.modal-eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .8rem;
}
.modal-content h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}
.modal-preview {
  margin: 1.5rem 0;
}
.modal-preview img {
  width: 200px;
  height: 240px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}
.modal-meta {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.modal-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.modal-author {
  color: var(--muted);
  font-size: .9rem;
}
.modal-actions {
  display: flex;
  gap: .8rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.modal-actions .btn-ghost {
  color: var(--text);
  border-color: var(--border);
}
.modal-actions .btn-ghost:hover {
  background: var(--bg-alt);
}

/* ---------- Captcha overlay ---------- */
.captcha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.captcha-card,
.result-card {
  background: #fff;
  border-radius: 18px;
  padding: 2.5rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pop .25s ease;
}
.captcha-eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .8rem;
}
.captcha-card h2,
.result-card h2 {
  font-size: 1.4rem;
  margin-bottom: .8rem;
  font-weight: 700;
}
.captcha-card p,
.result-card p {
  color: var(--muted);
  margin-bottom: 1.8rem;
}
.captcha-card .cf-turnstile {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}
.status {
  margin-top: 1rem;
  color: var(--muted);
  font-size: .9rem;
}
.captcha-cancel {
  margin-top: 1rem;
  color: var(--text);
  border-color: var(--border);
}
.captcha-cancel:hover { background: var(--bg-alt); }

/* ---------- Result ---------- */
.result-check {
  width: 64px; height: 64px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1.2rem;
}
.result-note {
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--muted);
}

.error {
  color: #dc2626;
  text-align: center;
  padding: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 5rem;
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}
.footer-brand p {
  margin-top: 1rem;
  color: #94a3b8;
  font-size: .9rem;
  max-width: 280px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-cols h4 {
  color: #fff;
  font-size: .9rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.footer-cols a {
  display: block;
  color: #94a3b8;
  font-size: .9rem;
  margin-bottom: .6rem;
  transition: color .15s;
}
.footer-cols a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.5rem 1.5rem 0;
  text-align: center;
  max-width: 1140px;
  margin: 0 auto;
}
.footer-bottom p {
  color: #64748b;
  font-size: .8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .nav { display: none; }
  .hero { padding: 4rem 1.5rem 5rem; }
  .hero-stats { gap: .8rem; }
  .hero-stats div { padding: .6rem 1rem; }
}
@media (max-width: 540px) {
  .gallery { grid-template-columns: 1fr; }
  .header-inner { gap: 1rem; }
  .btn-cta { display: none; }
}

.hidden { display: none !important; }

/*modalclose*/
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 120ms ease, color 120ms ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.result-card {
  position: relative; /* wymagane, aby .modal-close był pozycjonowany względem karty */
}
