/* === PODSTAWA === */
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: radial-gradient(circle at top center, #2c3e50 0%, #000814 80%),
              url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
  background-size: cover;
  color: #333;
  text-align: center;
  min-height: 100vh;
}

.overlay {
  background: transparent;
  min-height: 100vh;
  padding: 40px 20px 120px 20px;
}
/* === HEADER === */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.left-header {
  display: flex;
  align-items: center;  /* super ważne! wyrównuje logo + linki */
  gap: 40px; /* odstęp logo <-> linki */
}

.logo {
  max-width: 300px;
  height: auto;
}

.nav-primary {
  margin: 0; /* nie ma już marginesu! */
}

.right-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.lang-select {
  margin-bottom: 20px;
}

.nav-secondary {
  border-top: 2px solid rgba(255,255,255,0.1);
  padding-top: 20px;
}

.nav-secondary a {
  display: block;
  margin: 10px 0;
}

.main-nav a {
  display: inline-block;
  margin: 0 15px;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: bold;
  background: #27ae60;
  color: white;
  border-radius: 40px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
}

.main-nav a:hover {
  background: #219150;
  transform: translateY(-2px);
}

/* === PANELS === */
.flex-panels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.panel {
  background: rgba(255,255,255,0.95);
  color: #333;
  padding: 40px;
  border-radius: 12px;
  max-width: 500px;
  flex: 1 1 320px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  text-align: left;
}

.panel h2 {
  margin-top: 0;
  font-size: 26px;
}

.panel form input,
.panel form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

.panel form button {
  display: inline-block;
  padding: 14px 28px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
}

.panel form button:hover {
  background: #219150;
  transform: translateY(-2px);
}

.panel a {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 28px;
  background: #27ae60;
  color: #fff;
  border-radius: 40px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
}

.panel a:hover {
  background: #219150;
  transform: translateY(-2px);
}

/* === FOOTER === */
.footer {
  margin-top: 100px;
  font-size: 14px;
  color: #ccc;
}
/* === NEWS === */
.news-container {
  max-width: 1200px;
  margin: 40px auto;
  text-align: center;
}

.news-container h2 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #fff;
}

.news-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.news-item {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 30px 25px;
  border-radius: 12px;
  max-width: 320px;
  flex: 1 1 280px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  text-align: left;
  transition: transform 0.2s ease;
}

.news-item:hover {
  transform: translateY(-5px);
}

.news-date {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: #555;
  background: #eee;
  padding: 4px 8px;
  border-radius: 4px;
}
/* === BETA FORM === */
.beta-section {
  max-width: 720px;
  margin: 40px auto;
  text-align: left;
}

.beta-form, .beta-faq {
  background: rgba(255,255,255,0.95);
  color: #333;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.beta-section h1 {
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
}

.beta-section p[data-key="beta_desc_closed"] {
  color: #eee;
  text-align: center;
  margin-bottom: 20px;
}

.beta-form .input {
  width: 100%;
  padding: 14px;
  margin: 8px 0 14px;
  border-radius: 6px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

.beta-form .btn {
  padding: 12px 22px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 40px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  transition: background .3s, transform .2s;
}

.beta-form .btn:hover {
  background: #219150;
  transform: translateY(-2px);
}

.beta-form .label { display:block; margin-top: 8px; font-weight: 700; }
.beta-form .checkbox { display:flex; gap:.6rem; align-items:flex-start; margin:.5rem 0 1rem; }
.form-msg { margin-top: .75rem; font-weight: 700; }
.form-msg.success { color: #1e7e34; }
.form-msg.error { color: #b50000; }

.beta-faq { margin-top: 18px; }
.beta-faq h3 { margin-top: 0; }
.beta-faq ol { margin: 0 0 0 20px; }
/* === MOBILE: przyciski pod logiem === */
@media (max-width: 768px) {
  /* cały header w kolumnę, na środku */
  .header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* lewy blok: logo nad nawigacją */
  .left-header {
    width: 100%;
    display: flex;
    flex-direction: column;   /* <-- to ustawia nav pod logo */
    align-items: center;
    gap: 10px;
  }

  .logo {
    max-width: 180px;         /* mniejsze logo na telefonie */
    height: auto;
  }

  /* główne przyciski pod logo: wycentrowane, mogą się zawijać */
  .nav-primary {
    width: 100%;
    display: flex;
    flex-wrap: wrap;          /* zawijaj do kolejnych rzędów */
    justify-content: center;  /* wyśrodkuj */
    gap: 10px;
    margin: 4px 0 0;
  }

  .nav-primary a {
    margin: 0;                /* nadpisanie starego marginesu */
    padding: 10px 16px;
    font-size: 15px;
    flex: 0 1 auto;           /* szerokość wg treści, może się łamać do nowego rzędu */
    white-space: nowrap;      /* nie łam słowa w środku */
  }

  /* prawy blok (flagi + boczne linki) też pod spodem i na środku */
  .right-header {
    width: 100%;
    align-items: center;      /* nadpisuje flex-end */
  }

  .lang-select {
    margin: 8px 0;
  }

  .nav-secondary {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border-top: none;         /* opcjonalnie usuń kreskę na mobile */
    padding-top: 0;
  }

  .nav-secondary a {
    margin: 0;
    padding: 10px 16px;
    font-size: 15px;
  }

  /* ogólne zagęszczenia */
  .overlay { padding: 24px 14px 80px; }
  .panel { padding: 24px; }
}
/* ==== Closed Beta: checkbox + tekst zgody (fix iOS/Safari) ==== */
.beta-form label.checkbox {
  display: grid;
  grid-template-columns: 22px 1fr; /* checkbox | tekst */
  align-items: start;
  gap: 10px;
  width: 100%;
}

.beta-form label.checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 3px;      /* ładne wyrównanie do 1. linii */
  flex: none;
}

.beta-form label.checkbox span {
  display: block;
  white-space: normal !important;     /* zwykłe łamanie w poziomie */
  overflow-wrap: break-word;          /* łam długie słowa jeśli trzeba */
  word-break: normal;
  writing-mode: horizontal-tb !important; /* na wszelki wypadek wymuś poziomo */
  min-width: 0;                       /* klucz przy grid/flex na iOS */
}

#betaForm { max-width: 100%; }

/* mobile: przycisk na pełną szerokość */
@media (max-width: 768px) {
  #betaForm .btn { width: 100%; text-align: center; }
}
/* === Closed Beta: CTA pulse === */
@keyframes betaPulse {
  0%, 100% {
    transform: translateZ(0) scale(1);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.25);
  }
  50% {
    transform: translateZ(0) scale(1.05);
    box-shadow: 0 12px 28px rgba(46, 204, 113, 0.45);
  }
}

.main-nav a.nav-cta {
  /* subtelnie wyróżnij tło */
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  animation: betaPulse 2.4s ease-in-out infinite;
  will-change: transform, box-shadow;
}

/* nie męcz oka przy interakcji */
.main-nav a.nav-cta:hover,
.main-nav a.nav-cta:focus {
  animation-play-state: paused;
  transform: none;
}

/* dostępność: jeśli user ogranicza animacje — wyłącz puls */
@media (prefers-reduced-motion: reduce) {
  .main-nav a.nav-cta { animation: none !important; }
}
