/* Globalne ustawienia box-sizing */
* {
  box-sizing: border-box;
}

/* Globalne tło */
body {
  background: #0f1117;
  color: #ffffff;
  font-family: "Inter", Arial, sans-serif;
  margin: 0;
  padding: 0;
  font-size: 20px; /* +25% względem standardowych 16px */
  text-align: center;
  overflow-x: hidden; /* Zablokowanie poziomego przewijania */
}

html, body {
  width: 100%;
  height: 100%; /* Upewnienie się, że body i html zajmują pełną wysokość */
  overflow-x: hidden !important; /* Zablokowanie poziomego przewijania */
  position: relative;
  margin: 0; /* Usunięcie marginesów */
  padding: 0; /* Usunięcie paddingów */
}

/* Kontener główny */
.container {
  width: 100%; /* Ustawienie szerokości na 100% */
  max-width: 100%; /* Maksymalna szerokość kontenera */
  margin: 40px auto;
  padding: 40px;
  background: #1a1d25;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

/* Nagłówki */
h1, h2 {
  margin-bottom: 24px;
  font-weight: 700;
}

/* Tekst */
p {
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Przyciski */
button, .btn {
  background: #3a78ff;
  border: none;
  color: #fff;
  padding: 16px 30px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  margin-top: 20px;
  transition: 0.2s;
}

button:hover {
  background: #1f5fee;
}

/* Formularze */
label {
  display: block;
  margin-top: 20px;
  font-weight: 600;
}

input, select {
  width: 100%; /* Szerokość na 100% */
  padding: 14px;
  margin-top: 10px;
  font-size: 18px;
  border-radius: 10px;
  border: none;
}

.hint {
  font-size: 18px;
  opacity: 0.75;
}

/* Duże odliczanie */
.countdown {
  font-size: 120px;
  font-weight: 800;
  margin-top: 20px;
}

/* Eleganckie przyciski wyboru koloru */
.color-btn {
  width: 70px;
  height: 70px;
  margin: 10px;
  font-size: 26px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  transition: 0.2s;
}

.color-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
}

/* Siatka */
.btn-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Słowa */
.word {
  font-size: 64px;
  font-weight: 700;
  margin: 40px 0;
}

/* Fiksacja */
#demo-fixation,
#test-fixation {
  display: block;
}

/* Feedback */
.feedback.good { color: #3cff6a; }
.feedback.bad { color: #ff415f; }

.small {
  font-size: 16px;
  opacity: 0.7;
}

/* Ukrywanie sekcji */
.hidden { display: none !important; }

/* MOBILE — SIATKA 2x2 + większe przyciski */
@media (max-width: 600px) {
  body {
    font-size: 18px;
  }

  .container {
    width: 90%; /* Ustalamy szerokość na 90% ekranu */
    margin: 20px auto;
    padding: 25px;
  }

  .word {
    font-size: 46px;
  }

  /* 🔥 JEDYNA ZMIANA — zawijanie legendy */
  .legend {
    white-space: normal;
  }

  .btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    justify-items: center;
    margin-top: 20px;
  }

  .color-btn {
    width: 95px;
    height: 95px;
    font-size: 32px;
  }
}

/* PC – ukryj przyciski kolorów */
@media (min-width: 601px) {
  .btn-grid {
    display: none;
  }
}
