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

/* BODY */
body {
  background: black;
  color: white;
  font-family: Arial, sans-serif;
}

/* OCULTAR RADIOS */
input[type="radio"] {
  display: none;
}

/* CONTENEDOR */
.container {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 40px;
  flex-wrap: wrap;
}

/* TARJETAS */
.card {
  width: 320px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ESTILOS DIFERENTES */
.buy-card {
  border: 2px solid #4caf50;
}

.sell-card {
  border: 2px solid red;
}

/* TITULO */
h2 {
  text-align: center;
  margin-bottom: 10px;
}

/* BOTONES */
.option {
  padding: 8px;
  border: none;
  background: #777;
  color: white;
  cursor: pointer;
}

.option.active {
  background: #4caf50;
}

.small {
  padding: 6px 10px;
  border: none;
  background: #555;
  color: white;
  cursor: pointer;
}

.small.active {
  background: #4caf50;
}

.row {
  display: flex;
  gap: 10px;
}

/* INPUTS */
input[type="text"] {
  padding: 6px;
  border: none;
  outline: none;
}

/* BOTONES PRINCIPALES */
.main-btn {
  margin-top: 10px;
  padding: 12px;
  border: none;
  background: gray;
  color: white;
  cursor: pointer;
  font-size: 16px;
}

.main-btn.sell {
  background: #3b6edc;
}

/* TOGGLE */
.toggle-container {
  display: none;
  justify-content: center;
  margin-top: 20px;
}

.toggle {
  position: relative;
  display: flex;
  background: #333;
  border-radius: 20px;
  overflow: hidden;
}

.toggle label {
  padding: 10px 20px;
  cursor: pointer;
  z-index: 2;
}

.slider {
  position: absolute;
  width: 50%;
  height: 100%;
  background: #4caf50;
  left: 0;
  transition: 0.3s;
  z-index: 1;
}

/* CAMBIO A VENDER */
#sell:checked ~ .toggle-container .slider {
  left: 50%;
  background: #3b6edc;
}


  /* FOOTER */
.footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.footer p {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: 0.3s;
}

.footer__links a:hover {
  color: #00c853; /* verde tipo tech */
}


/* MOBILE */
@media (max-width: 768px) {

  .toggle-container {
    display: flex;
  }

  .container {
    flex-direction: column;
    align-items: center;
  }

  /* Oculta ambos por defecto */
  .buy-card,
  .sell-card {
    display: none;
  }

  /* Muestra según toggle */
  #buy:checked ~ .container .buy-card {
    display: flex;
  }

  #sell:checked ~ .container .sell-card {
    display: flex;
  }
}