/* Reset básico e box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base */
body {
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.5;
}

/* Container fluido */
.wrap {
  width: 100%;
  max-width: 900px;
  margin: auto;
  padding: clamp(12px, 2vw, 24px);
}

/* Header */
.top {
  background: #111827;
  padding: clamp(10px, 2vw, 20px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand__title {
  font-weight: bold;
  color: #38bdf8;
  font-size: clamp(18px, 2.5vw, 24px);
}

/* Navegação flexível */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav__link {
  color: #94a3b8;
  text-decoration: none;
  font-size: clamp(14px, 2vw, 16px);
}

.nav__link--active {
  color: #38bdf8;
}

/* Card */
.card {
  background: #1e293b;
  padding: clamp(15px, 2vw, 25px);
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Inputs responsivos */
input,
select,
button {
  width: 100%;
  padding: clamp(8px, 1.5vw, 12px);
  margin-top: 8px;
  margin-bottom: 12px;
  border-radius: 4px;
  border: none;
  font-size: 16px;
}

/* Botão */
button {
  background: #38bdf8;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

button:hover {
  opacity: 0.85;
}

/* Código */
pre {
  background: #0b1220;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: clamp(12px, 1.5vw, 14px);
}

/* Layout em telas maiores */
@media (min-width: 768px) {
  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

/* Telas grandes */
@media (min-width: 1200px) {
  .wrap {
    max-width: 1100px;
  }
}

/* Telas muito pequenas */
@media (max-width: 400px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }
}