/* ===== VARIÁVEIS DARK THEME ===== */
.dark-theme {
  --bg: #1f2638;
  --panel: #2d3650;
  --text: #e9edf6;
  --text-muted: #b1b7c8;
  --accent: #6ebdff;
  --card: #27334f;
}

/* ===== ELEMENTOS BASE ===== */
button {
  border-radius: 10px;
  cursor: pointer;
  padding: 12px 20px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 18px;
}

button:hover {
  background-color: #333;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

button:active {
  transform: translateY(0);
}

/* ===== ESTRUTURA PRINCIPAL ===== */
main {
  flex-shrink: 0;
  background-color: #dadfe8;
  padding: 20px;
  display: grid;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 100vh;
}

/* ===== TOPBAR E NAVEGAÇÃO ===== */
.topbar {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid #c5cee6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topnav {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}

.nav-link,
.nav-btn {
  flex: 1;
  text-align: center;
  max-width: 140px;
  border: 2px solid #000000;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  color: #1a233e;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-btn:hover {
  background: #424242;
  color: #fff;
  border-color: #424242;
}

.nav-btn {
  border: 2px solid #6a6a6a;
  background: #f2f2f2;
  color: #333;
}

/* ===== CONTAINER PRINCIPAL ===== */
.container {
  height: 100%;
  width: 100%;
  max-width: 500px;
  padding: 30px;
  background: linear-gradient(
    71deg,
    rgba(34, 193, 195, 0.5) 0%,
    rgba(101, 119, 224, 0.5) 50%,
    rgba(167, 45, 253, 0.5) 100%
  );
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-radius: 15px;
}
.container {
  height: 100%;
  width: 100%;
  max-width: 500px;
  padding: 30px;
  background: linear-gradient(
    71deg,
    rgba(34, 193, 195, 0.5) 0%,
    rgba(101, 119, 224, 0.5) 50%,
    rgba(167, 45, 253, 0.5) 100%
  );
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-radius: 15px;
}

/* ===== DARK THEME STYLES ===== */
body.dark-theme {
  background-color: var(--bg);
  color: var(--text);
}

body.dark-theme main {
  background-color: var(--bg);
}

body.dark-theme .container {
  background: linear-gradient(150deg, #243554 0%, #303a5f 60%, #222f53 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(143, 159, 189, 0.25);
}

body.dark-theme .topbar {
  background-color: rgba(28, 35, 57, 0.95);
  border-bottom-color: rgba(97, 112, 150, 0.6);
}

body.dark-theme .nav-link,
body.dark-theme .nav-btn {
  background: #1f2c47;
  color: #e8ecfa;
  border-color: #6ea1ff;
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-btn:hover {
  background: #2d4f8f;
}

body.dark-theme .input {
  background-color: #334264;
  color: #dbe8ff;
  border-color: #516a89;
}

body.dark-theme .input:focus {
  border-color: #6e9ddd;
  box-shadow: 0 0 10px rgba(102, 153, 233, 0.45);
  background-color: #2a3a58;
}

body.dark-theme .resultado.ativo {
  background: #2b7d41;
}

body.dark-theme footer {
  background-color: #1f2d4d;
  color: #c8d6eb;
  border-top-color: rgba(104, 127, 158, 0.4);
}

/* ===== TIPOGRAFIA ===== */
.title {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.texto {
  margin: 20px 0;
  line-height: 1.6;
  text-align: justify;
}

.texto p {
  margin-bottom: 10px;
}

/* ===== FORMULÁRIO E INPUTS ===== */
.combustiveis {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  color: #000;
  font-size: 16px;
}

.input {
  padding: 12px 15px;
  border-radius: 8px;
  border: 2px solid #ddd;
  font-size: 16px;
  transition: all 0.3s ease;
  background-color: #fff;
}

.input:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
  background-color: #fafafa;
}

.input::placeholder {
  color: #999;
}

/* ===== MENSAGENS DE ERRO ===== */
.erro {
  color: #d32f2f;
  font-size: 12px;
  display: none;
  font-weight: 500;
}

.erro.ativo {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESULTADO ===== */
.resultado {
  width: 100%;
  max-width: 520px;
  display: none;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease;
}

.resultado.ativo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
  padding: 18px;
  margin: 20px 0 0;
  background-color: #4caf50;
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
  font-size: 18px;
  font-weight: 600;
  animation: popIn 0.5s ease;
  gap: 8px;
  opacity: 1;
  transform: scale(1);
}

.resultado.ativo strong {
  font-size: 24px;
  display: block;
}

.resultado.ativo small {
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-top: 4px;
}

.resultado.ativo small:last-child {
  font-size: 12px;
  color: #ddf4d4;
  margin-top: 8px;
  font-style: italic;
}

@keyframes popIn {
  0% {
    transform: scale(0.8) rotateZ(-5deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1) rotateZ(0);
    opacity: 1;
  }
}

/* ===== BOTÕES ===== */
.buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.buttonCalculate {
  background-color: #4caf50;
  color: white;
  width: 100%;
  max-width: 250px;
}

.buttonCalculate:hover {
  background-color: #45a049;
}

.buttonZerar {
  background-color: #ff9800;
  color: white;
  width: 100%;
  max-width: 250px;
}

.buttonZerar:hover {
  background-color: #e68900;
}

.btn-voltar {
  display: inline-block;
  background-color: #d1cddf;
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #000000;
}

.btn-voltar:hover {
  background-color: #535353;
  border-color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(175, 175, 175, 0.3);
}

/* ===== FOOTER ===== */
footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-style: italic;
  margin-top: 40px;
  color: #555;
  font-size: 14px;
  padding: 20px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid #c5cee6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== PÁGINA ABOUT ===== */
.about-content {
  margin-top: 20px;
}

.about-content h2 {
  margin-bottom: 25px;
  text-align: center;
  color: #000;
}

.about-section {
  margin-bottom: 25px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  border-left: 4px solid #4c66af;
}

.about-section h3 {
  color: #333;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 600;
}

.about-section p {
  line-height: 1.7;
  color: #555;
  margin-bottom: 10px;
}

.about-section ul {
  margin-left: 20px;
  color: #555;
}

.about-section li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.about-section a {
  color: #5c026e;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.about-section a:hover {
  color: #e100ff;
  text-decoration: underline;
}

.about-section.cta {
  text-align: center;
  background-color: rgba(76, 175, 80, 0.1);
  border-left-color: #4dbdda;
}

.botaoVoltar-aboutPage {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    margin: 0 15px;
    padding: 20px;
  }

  main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .combustiveis {
    gap: 15px;
  }

  button {
    width: 100%;
    padding: 10px 15px;
    font-size: 16px;
  }

  .buttonCalculate,
  .buttonZerar {
    max-width: 100%;
  }

  label {
    font-size: 15px;
  }

  .input {
    font-size: 15px;
    padding: 10px 12px;
  }

  .resultado.ativo {
    font-size: 16px;
    padding: 15px;
  }
}

@media (max-width: 750px) {
  body {
    font-size: 12px;
  }

  .main {
    padding-top: 50px;
    padding-left: 100px;
    padding-right: 100px;
  }

  .container {
    width: 360px;
    height: 100%;
    padding: 10px;
  }

  .title {
    display: flex;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px;
    min-height: 500px;
  }

  h2 {
    font-size: 24px;
  }

  label {
    font-size: 14px;
  }

  .input {
    font-size: 14px;
    padding: 10px;
  }

  button {
    padding: 10px 12px;
    font-size: 14px;
  }

  .resultado.ativo {
    font-size: 14px;
    padding: 12px;
    min-height: 50px;
  }

  .texto p {
    font-size: 14px;
  }

  footer {
    font-size: 12px;
    margin-top: 30px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.995);
    border-bottom: 1px solid #c5cee6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  footer a {
    margin-left: 3px;
  }

  .about-section {
    padding: 15px;
    border-left-width: 3px;
  }

  .about-section h3 {
    font-size: 18px;
  }

  .about-section p,
  .about-section ul {
    font-size: 15px;
  }

  .btn-voltar {
    padding: 10px 25px;
    font-size: 14px;
  }
}
