* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,body {
    height: 100%;
    width: 100%;
    margin: 0;
    color: white;

}

body{
    
    background-color:black;
    background-image: linear-gradient(rgba(0,0,0,1.2), 
        rgba(0,0,0,0.6)), url("./img/Linha.svg");
        font-family: 'Inter', sans-serif;

}

.page{
  padding: 24px; /* evita colar nas bordas em telas pequenas */


}

header {
  
  padding: 40px 20px 0 20px;
}

header img {
  width: 172px; /* tamanho do Figma */
  height: auto;
  display: block;
}


.sectiondesign {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 40px 20px;
  
}


.content {
  display: flex;
  flex-direction: column;
  max-width: 508px;


}

.contentform {
  max-width: 482px;
  width: 100%;
  position: relative;
}

.contentform p {
  margin-top: 2px;
}

h1{
  font-size: 72px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
}

.content span {
  font-size: 14px;
  letter-spacing: 2px;
  color: #A1A1AA;
  display: inline-block;
  margin-bottom: 16px;
}

.content h2 {
  font-size: 16px;
  font-weight: 600;
  color: #C084FC;
  margin-top: 32px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-question {
  width: 20px;
  height: 20px;
}

.content p {
  font-size: 14px;
  color: #C7C9CC;
  line-height: 1.6;
  max-width: 386px;
  margin-left: 28px;
}

button, input {
  border: none;
  outline: none;
  font-family: inherit;
}

.inputs {
  display: flex;
  gap: 16px;
  margin-top: 40px;
}

.inputs div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input {
  width: 80px;
  padding: 8px;
  border-radius: 4px;
  border: none;
}

.toggle-contentform {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin-top: 20px;
}

.switch {
  position: relative;
  width: 40px;
  height: 20px;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #444;
  border-radius: 20px;
  width: 100%;
  height: 100%;
  transition: 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked + .slider {
  background-color: #8b5cf6; /* roxo */
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.btn-sortear {
  width: 100%;
  height: 56px;
  border-radius: 8px;
  background-color: #24222E;
  color: aliceblue;
  cursor: pointer;
  border: none;
  padding: 20px 0;
  font-weight: 600;
  display: flex;
  align-items:center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  margin-bottom: 10px;
}

.arrow {
  transition: transform 0.3s ease;
  align-items: center;
}

.arrow-left {
  display: inline-block;
  transform: rotate(180deg);
  margin-right: 6px;
}

.icon-voltar {
  font-size: 16px;
  margin-right: 2px;
  position: relative;
  top: -1.5px;

}

.btn-sortear:hover .arrow {
  transform: translateX(3px);
}

.btn-voltar {
  align-self: flex-end;
  background: transparent;
  color: #8b5cf6;
  border: none;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  border: 3px solid #8b5cf6;
  border-radius: 8px;
  padding: 4px 8px;

}

.btn-voltar:hover {
  text-decoration: none;
}

.btn-voltar:hover .texto-voltar {
  text-decoration: underline;
}

.btn-voltar:focus-visible {
  outline: 2px dashed #8b5cf6;
  outline-offset: 4px;
  border-radius: 6px;
  align-self: flex-end;
  
}

.resultado-section {
  position: absolute;
  top: 0;
  left: 0;

  width: 482px; /* mesma largura do form */

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: white;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.resultado-section.ativo {
  opacity: 1;
  pointer-events: auto;
}

.resultado-section:focus {
  outline: none;
}

.btn-sortear:focus-visible,
.btn-novamente:focus-visible,
.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.6);
}

.resultado-sub {
  font-size: 14px;
  letter-spacing: 2px;
  color: aliceblue;
}

.resultado-ordem {
  font-size: 12px;
  color: #C7C9CC;
}

.numeros-sorteados {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
  max-width: 482px;
}

.numero {
  font-size: 48px;
  font-weight: 700;
  color: #a855f7;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.1s ease;
}

.numero.aparecer {
  opacity: 1;
  transform: translateY(0);
  transition: 1s;
  
}

.oculto {
  display: none;
}

.status-sorteio {
  top: 0;
  left: 1;

  color: #22c55e; /* verde sucesso */
  font-weight: 600;
  font-size: 14px;

  border: 1px solid #22c55e;
  border-radius: 8px;
  padding: 4px 10px;

}

.btn-novamente {
  width: 100%;
  height: 56px;
  border-radius: 8px;
  background-color: #24222E;
  color: aliceblue;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  font-weight: 600;

}

.btn-novamente:hover {
  background-color: #2f2b3d;
}

.refresh {
  transition: transform 0.4s ease;
}

.btn-novamente:hover .refresh {
  transform: rotate(180deg);
}

.btn-sortear,
.btn-novamente {
  position: relative;
  z-index: 1;
  border-radius: 10px;
  background: #0b0b0f; /* fundo interno do botão */
}

/* camada da borda colorida */
.btn-sortear::before,
.btn-novamente::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px; /* espessura da borda */
  border-radius: 10px;

  background: linear-gradient(
    90deg,
    #00f0ff,
    #8b5cf6,
    #ff00c8,
    #00f0ff
  );

  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  z-index: -1;
}

.btn-sortear::before,
.btn-novamente::before {
  background-size: 300% 300%;
  animation: borderMove 4s linear infinite;
}

@keyframes borderMove {
  0% { background-position: 0% 25% 50%; }
  50% { background-position: 50% 25%; }
}

.erro {
  display: flex;
  color: aliceblue;
  margin:  auto;
  padding: 8px 18px;
  border-radius: 12px;
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.4);
  font-size: 16px;
  font-weight: 500;
  display: none; /* começa escondido */
  transition: 0.3s ease;
  justify-content: center;
  max-width: 400px;

}


@media (min-width: 1024px) {

   .page {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 108px;           /* espaço exato do Figma */
    padding: 0 134px;

  }

   .sectiondesign {
    flex: 1;
    width: 616px;         /* largura exata do Figma */
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 80px 134px 80px 134px;
    gap: 108px;
    max-width: 1440px;
    margin: 0 auto;

  }


  .resultado-section {
    width: 482px;         /* largura exata do Figma */
  }


    header {
    max-width: 1440px;
    margin: 0 auto;
    padding: 76px 134px 0 134px;
  }


  .contentform {
    margin-top: 40px; /* ajusta até bater visualmente */
  }

      h1 {
    font-size: 72px;
    }

}

@media (min-width: 768px) {

  .sectiondesign {
    gap: 64px;
  }

}