*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #c9a227;
  --gold-light: #e8c547;
  --gold-dark: #8b6914;
  --bg-dark: #0a0a0f;
  --bg-card: rgba(18, 16, 24, 0.92);
  --bg-card-hover: rgba(28, 24, 36, 0.95);
  --border: rgba(201, 162, 39, 0.25);
  --border-active: rgba(201, 162, 39, 0.7);
  --text: #e8e4dc;
  --text-muted: #9a958a;
  --red: #8b2020;
  --red-glow: rgba(139, 32, 32, 0.4);
  --success: #2d6a3e;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(139, 32, 32, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
    url('../images/logo com fundo quadrado.png') center/cover no-repeat;
  opacity: 0.12;
  z-index: -2;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.7) 0%, rgba(10, 10, 15, 0.95) 100%);
  z-index: -1;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  height: 56px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.btn-oficial {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  border: 1px solid var(--border-active);
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(139, 105, 20, 0.05));
  transition: all 0.25s ease;
}

.btn-oficial:hover {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.25), rgba(139, 105, 20, 0.15));
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.2);
  color: var(--gold-light);
}

.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 2px 20px rgba(201, 162, 39, 0.3);
  margin-bottom: 0.75rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 1rem;
}

.aviso-mortal {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 6px;
  background: rgba(201, 162, 39, 0.08);
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: left;
}

.aviso-mortal strong {
  color: var(--gold-light);
}

.voter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.06);
}

.voter-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.voter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-group label,
.field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-group input[type="text"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.field-group input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
}

.field-group input[type="text"]::placeholder {
  color: rgba(154, 149, 138, 0.6);
}

.reino-options {
  display: flex;
  gap: 0.75rem;
  flex: 1;
}

.reino-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.reino-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.reino-option span {
  display: block;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.2);
}

.reino-blue input:checked + span {
  border-color: #3b6fc0;
  background: rgba(59, 111, 192, 0.25);
  color: #7eb0ff;
  box-shadow: 0 0 12px rgba(59, 111, 192, 0.2);
}

.reino-red input:checked + span {
  border-color: #b03030;
  background: rgba(176, 48, 48, 0.25);
  color: #ff8080;
  box-shadow: 0 0 12px rgba(176, 48, 48, 0.2);
}

.reino-option:hover span {
  border-color: var(--border-active);
}

#confrontosContainer {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.progress-bar {
  width: 100%;
  max-width: 400px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin: 0 auto 0.5rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.enquete-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.matchup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.matchup-card.answered {
  border-color: var(--border-active);
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.08);
}

.matchup-number {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

.matchup-question {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.matchup-vs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vs-divider {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--red);
  text-shadow: 0 0 10px var(--red-glow);
  flex-shrink: 0;
  padding: 0 0.25rem;
}

.fighter-option {
  flex: 1;
  position: relative;
}

.fighter-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.fighter-label {
  display: block;
  text-align: center;
  padding: 0.85rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.2);
}

.fighter-label:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.fighter-option input:checked + .fighter-label {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.2), rgba(139, 105, 20, 0.1));
  color: var(--gold-light);
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.15);
}

.fighter-class {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 400;
}

.fighter-option input:checked + .fighter-label .fighter-class {
  color: var(--gold-dark);
}

.submit-area {
  text-align: center;
  margin-top: 2.5rem;
}

.btn-submit {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-dark));
  background-size: 200% 200%;
  border: none;
  padding: 1rem 3rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.25);
}

.btn-submit:hover:not(:disabled) {
  background-position: 100% 0;
  box-shadow: 0 6px 30px rgba(201, 162, 39, 0.4);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.form-msg {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.form-msg.success {
  color: #6ecf8a;
}

.form-msg.error {
  color: #e07070;
}

.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.success-screen {
  text-align: center;
  padding: 3rem 1rem;
}

.success-screen h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.success-screen p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.success-screen .btn-oficial {
  display: inline-block;
}

@media (max-width: 600px) {
  .voter-fields {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 0.75rem 1rem;
  }

  .logo {
    height: 40px;
  }

  .btn-oficial {
    font-size: 0.7rem;
    padding: 0.5rem 0.75rem;
  }

  .matchup-vs {
    flex-direction: column;
  }

  .vs-divider {
    padding: 0.25rem 0;
  }

  .fighter-option {
    width: 100%;
  }
}
