:root {
  color-scheme: light dark;
  
  /* Definiujemy kolory gradientu dla obu trybów */
  --grad-start: light-dark(#ffffff, #27272a);
  --grad-end: light-dark(#a1a1aa, #000000);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centrowanie w pionie */
  align-items: center;     /* Centrowanie w poziomie */
  font-family: sans-serif;
  
  /* Magia tła: używamy zmiennych z :root */
  background-image: radial-gradient(circle at center, var(--grad-start) 0%, var(--grad-end) 100%);
  background-size: 200% 200%;
  animation: gradientMove 10s ease infinite alternate;
  
  /* Twoje ukrycie treści przed JS */
  visibility: hidden; 
  overflow: hidden;
}

/* EFEKT MOTYLI - bez zmian, bo jest super */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 0%, transparent 10%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 12%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 15%);
  z-index: 1;
  pointer-events: none;
  animation: butterflyFloat 8s ease-in-out infinite alternate;
}

/* Usuwamy position: fixed z tych elementów! Flexbox w body je ustawi */
header, main, footer {
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 10;
  margin: 10px 0; /* Delikatny odstęp między nimi */
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes butterflyFloat {
  from { transform: translateY(0) scale(1); opacity: 0.5; }
  to { transform: translateY(-20px) scale(1.1); opacity: 1; }
}