/* =========================================================
   Logic Challenge Mérito — style.css
   Portrait-oriented quiz web app
   ========================================================= */

/* ---------------------------------------------------------
   Reset & Base
   --------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

/* ---------------------------------------------------------
   Screen System
   --------------------------------------------------------- */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  min-height: 100vh;
}

.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* Background variants */
.screen-black {
  background: #0A0A0A;
  color: #FFFFFF;
}

.screen-red {
  background: #C8003A;
  color: #FFFFFF;
}

.screen-white {
  background: #FFFFFF;
  color: #0A0A0A;
}

/* ---------------------------------------------------------
   Logos
   --------------------------------------------------------- */
.logo-main {
  max-width: 240px;
  width: 100%;
  margin-bottom: 32px;
}

.mini-logo {
  height: 32px;
  width: auto;
}

.logo-merito {
  height: 32px;
  width: auto;
}

.logo-20anos {
  height: 32px;
  width: auto;
}

.cover-logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn-start {
  font-family: 'Press Start 2P', cursive;
  background: #C8003A;
  color: #FFFFFF;
  padding: 16px 40px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-top: 32px;
}

.btn-start:hover {
  background: #A60031;
}

.btn-start:active {
  transform: scale(0.97);
}

.btn-arrow-red,
.btn-arrow-black {
  background: none;
  border: none;
  cursor: pointer;
  width: 64px;
  padding: 0;
  margin-top: auto;
  flex-shrink: 0;
}

.btn-arrow-red img,
.btn-arrow-black img {
  width: 100%;
  display: block;
}

/* ---------------------------------------------------------
   Form Inputs (cadastro screen)
   --------------------------------------------------------- */
.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #FFFFFF;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.input-field:focus {
  border-color: #FFFFFF;
}

/* ---------------------------------------------------------
   Course Selection
   --------------------------------------------------------- */
.curso-label {
  font-size: 14px;
  margin-bottom: 16px;
  opacity: 0.8;
  width: 100%;
}

.curso-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.curso-btn {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #FFFFFF;
  padding: 16px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.curso-btn.selected {
  background: #FFFFFF;
  color: #C8003A;
  border-color: #FFFFFF;
}

.curso-btn:hover {
  border-color: #FFFFFF;
}

/* ---------------------------------------------------------
   Screen Icons
   --------------------------------------------------------- */
.screen-icon {
  width: 80px;
  margin-bottom: 24px;
}

/* ---------------------------------------------------------
   Text Elements
   --------------------------------------------------------- */
.welcome-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}

.welcome-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  text-align: center;
  line-height: 1.6;
  opacity: 0.9;
}

.section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  margin-bottom: 20px;
}

.timer-info,
.prize-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  text-align: center;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   Rules List
   --------------------------------------------------------- */
.rules-list {
  list-style: none;
  width: 100%;
}

.rules-list li {
  padding: 12px 0;
  padding-left: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
  line-height: 1.5;
  position: relative;
}

.rules-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #C8003A;
}

/* ---------------------------------------------------------
   Question Screen (screen-white)
   --------------------------------------------------------- */
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #0A0A0A;
}

.timer-display {
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  color: #C8003A;
}

.q-number {
  font-size: 12px;
  color: #888888;
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.q-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 500;
}

.q-code-wrap {
  background: #0A0A0A;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  width: 100%;
}

.q-code-wrap.hidden {
  display: none;
}

.q-code {
  font-family: monospace;
  font-size: 13px;
  color: #E0E0E0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------------------------------------------------
   Answer Options
   --------------------------------------------------------- */
.options-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  background: #FFFFFF;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s ease;
  width: 100%;
}

.option:hover {
  border-color: #C8003A;
  background: #FFF0F3;
}

.opt-letter {
  font-weight: 700;
  color: #C8003A;
  min-width: 20px;
  flex-shrink: 0;
}

.opt-text {
  line-height: 1.4;
}

.option.correct {
  background: #D4EDDA;
  border-color: #28A745;
  color: #155724;
}

.option.correct .opt-letter {
  color: #155724;
}

.option.wrong {
  background: #F8D7DA;
  border-color: #DC3545;
  color: #721C24;
}

.option.wrong .opt-letter {
  color: #721C24;
}

.option:disabled {
  cursor: default;
}

/* ---------------------------------------------------------
   Final / Results Screen
   --------------------------------------------------------- */
.final-name {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  margin-top: 16px;
  text-align: center;
}

.final-score {
  font-size: 48px;
  font-weight: 700;
  color: #C8003A;
  margin: 16px 0;
  text-align: center;
}

.final-msg {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  text-align: center;
  opacity: 0.9;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   Error Messages
   --------------------------------------------------------- */
.error-msg {
  font-size: 13px;
  color: #FFD0D0;
  margin-top: 8px;
  min-height: 20px;
}

/* ---------------------------------------------------------
   Utility
   --------------------------------------------------------- */
.hidden {
  display: none !important;
}
