/* Desenvolvido por Lorenzo Furtile e Felipe Facione - Equipe de Desenvolvimento */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 30px 15px;
  font-family: Arial, Helvetica, sans-serif;
  color: #1e2722;
  background: linear-gradient(135deg, #071b3a, #123c73, #0e6b55);
}

button,
input,
select {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
}

button {
  min-height: 45px;
  border: none;
  border-radius: 5px;
  padding: 0 18px;
  background: #f1c232;
  color: #102417;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #e4b82f;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.app-shell {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
}

.quiz-panel,
.ranking-panel {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.quiz-panel {
  overflow: hidden;
}

.hero {
  min-height: 165px;
  padding: 28px;
  color: #ffffff;
  background: #123c73;
  border-bottom: 6px solid #f1c232;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.player-photo {
  width: 160px;
  flex-shrink: 0;
}

.player-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: #f1c232;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 3rem;
  line-height: 1;
}

.subtitle {
  max-width: 500px;
  margin-bottom: 0;
  color: #e8eef7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span {
  padding: 6px 10px;
  border: 1px solid #ffffff;
  border-radius: 20px;
  color: #ffffff;
  font-size: 0.85rem;
}

.cup-label {
  height: fit-content;
  border: 2px solid #f1c232;
  border-radius: 5px;
  padding: 8px 12px;
  color: #f1c232;
  font-weight: bold;
}

.screen {
  display: none;
  padding: 28px;
}

.screen.active {
  display: block;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.start-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
select {
  width: 100%;
  min-height: 45px;
  border: 1px solid #cfd8d2;
  border-radius: 5px;
  padding: 0 12px;
  background: #ffffff;
}

input:focus,
select:focus {
  outline: 2px solid #f1c232;
}

.difficulty-label {
  margin-top: 18px;
}

.hint,
.ranking-status,
.result-message {
  color: #66736b;
}

.hint {
  margin: 12px 0 0;
}

.class-note {
  margin: 16px 0 0;
  padding: 12px;
  border-left: 4px solid #123c73;
  background: #eef4f1;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #0b3d25;
  font-weight: bold;
}

.progress-track {
  height: 8px;
  margin-bottom: 24px;
  border-radius: 20px;
  overflow: hidden;
  background: #e4eae5;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: #116530;
}

#question-text {
  margin-bottom: 18px;
  font-size: 1.8rem;
  line-height: 1.2;
}

.answers {
  display: grid;
  gap: 10px;
}

.answer-button {
  width: 100%;
  min-height: 54px;
  padding: 13px 14px;
  text-align: left;
  color: #1e2722;
  background: #f8faf8;
  border: 1px solid #d6ded8;
  box-shadow: none;
}

.answer-button:hover:not(:disabled) {
  background: #eef4fb;
  border: 1px solid #123c73;
}

.answer-button.correct {
  color: #ffffff;
  background: #116530;
  border-color: #116530;
}

.answer-button.wrong {
  color: #ffffff;
  background: #cc3333;
  border-color: #cc3333;
}

.next-button {
  margin-top: 22px;
  min-width: 150px;
}

.result-card {
  width: 240px;
  max-width: 100%;
  margin: 20px 0;
  padding: 18px;
  border-radius: 6px;
  color: #ffffff;
  background: #123c73;
}

.result-card span {
  display: block;
  margin-bottom: 6px;
  color: #dce6f2;
  font-weight: bold;
}

.result-card strong {
  font-size: 2.7rem;
  line-height: 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions .secondary {
  background: #e5eee8;
  color: #0b3d25;
}

.ranking-panel {
  padding: 24px;
  align-self: start;
}

.ranking-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ranking-header h2 {
  margin-bottom: 0;
  font-size: 1.7rem;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px;
  border: 1px solid #d6ded8;
  border-radius: 5px;
  background: #f8faf8;
}

.ranking-list .position {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #123c73;
  font-weight: bold;
}

.ranking-list .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: bold;
}

.ranking-list .score {
  color: #0b3d25;
  font-weight: bold;
}

.ranking-list .empty-state {
  display: block;
  color: #66736b;
  text-align: center;
}

.ranking-status {
  margin: 14px 0 0;
  font-size: 0.9rem;
}

.credits {
  grid-column: 1 / -1;
  margin: 0;
  color: #ffffff;
  text-align: center;
}

@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    padding: 12px;
  }

  .hero,
  .screen,
  .ranking-panel {
    padding: 20px;
  }

  .hero {
    display: block;
  }

  .player-photo {
    width: 120px;
    margin-top: 18px;
  }

  h1 {
    font-size: 2.2rem;
  }

  #question-text {
    font-size: 1.4rem;
  }

  .start-row {
    grid-template-columns: 1fr;
  }

  .start-row button,
  .next-button {
    width: 100%;
  }
}
