/* --- Reset i font --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff8f0; /* jasny krem */
  color: #5a3a0c;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 2em 1em;
}

/* Kontenery */
.container {
  background: #fff; /* biały na kontrast */
  padding: 2em;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.2);
  max-width: 600px;
  width: 100%;
}

/* Nagłówki */
h1 {
  text-align: center;
  color: #f97316;
  font-weight: 800;
  margin-bottom: 1.5em;
}

/* Formularze i inputy */
input[type="text"],
textarea {
  width: 100%;
  padding: 0.6em 0.8em;
  border: 2px solid #f97316;
  border-radius: 12px;
  font-size: 1em;
  margin-bottom: 1em;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
textarea:focus {
  border-color: #d45e00;
  outline: none;
}

/* Przyciski */
button {
  background-color: #f97316;
  color: #fff;
  border: none;
  padding: 0.7em 1.8em;
  font-size: 1.1em;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
}

button:hover:not(:disabled) {
  background-color: #d45e00;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

button:disabled {
  background-color: #fbbf24aa;
  cursor: default;
}

/* Quiz - pytania */
.question-block {
  background-color: #fff4e5;
  border: 1px solid #fbbf24;
  border-radius: 14px;
  padding: 1em 1.2em;
  margin-bottom: 1.5em;
  box-shadow: inset 0 0 5px rgba(249, 115, 22, 0.1);
}

/* Opcje quizu */
.options {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}

.options li {
  margin-bottom: 0.7em;
}

.option-btn {
  width: 100%;
  padding: 0.8em;
  font-size: 1.05em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background-color: #f5f5f5;
  transition: background-color 0.3s, box-shadow 0.3s;
  font-weight: 600;
  color: #5a3a0c;
}

.option-btn:hover {
  background-color: #fcd89b;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.5);
}

.option-btn.correct {
  background-color: #a6d785;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
  color: #2a6e1f;
}

.option-btn.incorrect {
  background-color: #f08080;
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.5);
  color: #8b0000;
}

/* Wyniki */
.result {
  font-size: 1.3em;
  font-weight: 700;
  text-align: center;
  margin-top: 1.5em;
  color: #f97316;
}

/* Lista wyników innych */
#results-list {
  margin-top: 2em;
}

#results-list h2 {
  text-align: center;
  color: #f97316;
  margin-bottom: 0.6em;
}

#results-list ul {
  list-style: none;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1.5px solid #fbbf24;
  border-radius: 12px;
  background: #fff4e5;
}

#results-list li {
  padding: 0.5em 1em;
  border-bottom: 1px solid #f9731680;
  font-weight: 600;
  color: #5a3a0c;
}

#results-list li:last-child {
  border-bottom: none;
}

/* Pole na nick */
#nick-input-container {
  text-align: center;
  margin-bottom: 2em;
}

#nick-input {
  padding: 0.6em 1em;
  font-size: 1.2em;
  border: 2px solid #f97316;
  border-radius: 12px;
  width: 60%;
  max-width: 300px;
  transition: border-color 0.3s;
}

#nick-input:focus {
  border-color: #d45e00;
  outline: none;
}

#start-quiz-btn {
  margin-left: 1em;
}

#start-quiz-btn:hover:enabled {
  background-color: #d45e00;
}

/* Responsywność */
@media (max-width: 480px) {
  body {
    padding: 1em 0.5em;
  }

  .container {
    padding: 1.2em 1.5em;
  }

  #nick-input {
    width: 100%;
    max-width: none;
  }

  button {
    font-size: 1em;
  }
}
