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

body {
  overflow-x: hidden;
}

button {
  width: 100%;
}

.usdc-ruji-max,
.tcy-max,
.ruji-rune-max,
.usdc-max,
.usdc-ruji-max {
  background-color: transparent !important;
  border: 2px solid rgb(130, 135, 130) !important;
  color: black !important;
}

.container {
  max-width: 1880px;
  margin: 20px auto;
  padding: 1rem;
  font-family: "Inter", Arial, sans-serif;
  width: 100%;
  background-color: #f8fafc;
  border-radius: 12px;
}

.controls-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 10px;
}

.ruji-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #1e293b;
  cursor: pointer;
}

.ruji-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2563eb;
}

.test-notification-btn {
  padding: 12px 24px;
  margin: 10px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.test-notification-btn:hover {
  background-color: #1e40af;
}

.header-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.metrics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 2rem;
  justify-content: center;
}

.card {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 100%;
  gap: 0.5rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
}

.is-cheaper {
  background-color: #a2d9b5 !important;
}

.net-effect {
  font-size: 1.3em;
  font-weight: 600;
  color: #1e293b;
  background-color: #f1f5f9;
  padding: 12px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

.net-effect.positive {
  color: #34d399;
  background-color: #ecfdf5;
}

.net-effect.negative {
  color: #ef4444;
  background-color: #fef2f2;
}

.red-bg {
  color: #ef4444;
  background-color: #fef2f2;
}

.flex-card {
  display: flex;
  flex-direction: row;
  justify-content: center;
  text-align: center;
  gap: 5rem;
}

.table-container {
  overflow-x: auto;
  width: 100%;
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #fff;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

thead th {
  background-color: #f1f5f9;
  color: #1e293b;
  font-weight: 600;
  padding: 12px;
  border-bottom: 2px solid #e2e8f0;
}

tbody td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

tbody tr:hover {
  background-color: #f8fafc;
}

.streaming-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.chart-container {
  display: flex;
  justify-content: center;
  position: relative;
  margin: 20px 0;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  width: 100%;
  height: 250px;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header-container,
  .metrics-container,
  .memos-container,
  .balance-grid-container {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 0.5rem;
  }
  .card-title {
    font-size: 1.1rem;
  }
  .controls-container {
    flex-direction: column;
    align-items: flex-start;
  }
  table {
    font-size: 0.9rem;
  }
  thead th,
  tbody td {
    padding: 8px;
  }
}

@media (max-width: 450px) {
  .container {
    padding: 0.5rem;
    width: 100%;
    margin: 0;
  }

  .balance {
    margin: 0.5rem 0;
    font-size: 1.25rem;
    font-weight: bold;
  }

  button {
    padding: 1.25rem !important;
  }
  .rewards-card {
    display: none;
  }

  input {
    width: 100% !important;
    padding: 1rem !important;
  }
  .column-title {
    font-size: 1.5rem !important;
  }

  .header-container,
  .metrics-container {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem;
  }

  .balance-grid-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card {
    width: 100%;
  }
  .table-container {
    overflow-x: auto;
    width: 100%;
  }
  table {
    min-width: auto;
    width: 100%;
  }
  .chart-container {
    display: none;
  }
  .tcy-actions-container {
    gap: 1rem;
    width: 100%;
    flex-direction: column;
  }
  .flex-card {
    flex-direction: column;
    gap: 1rem;
  }
  .login-container {
    width: 100%;
  }
  /* Ajustes para los grupos de entrada */
  .input-group {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    width: 100%;
    align-items: stretch;
  }
  .input-group input[type="number"] {
    width: 100%;
    text-align: left;
  }
  .input-group button {
    width: 100%;
  }
}

.copy-add {
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.copy-add:hover {
  background-color: #f1f5f9;
}

.tcy-actions-container {
  display: flex;
  width: 100%;
  justify-content: space-around;
  max-height: 10rem;
  gap: 1.5rem;
}
.tcy-actions {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 100%;
  gap: 1rem;
  overflow-y: scroll;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

li {
  list-style: none;
  line-height: 1.75;
  font-size: 1rem;
  color: #1e293b;
}

.red {
  color: #ff0000 !important;
}

.green {
  color: #4caf50;
}
.input-actions-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem;
  background-color: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  width: 100%;
  margin: 0.25rem;
}

.input-group input[type="number"] {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-size: 1rem;
  width: 100%;
  text-align: center;
}

.input-group button {
  padding: 10px 20px;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

#button1,
#button4,
#button7,
#button10,
#button20 {
  background-color: green;
  font-weight: bold;
}

#button2,
#button8,
#button3,
#button9,
#button5,
#button21 {
  background-color: rgb(230, 22, 22);
  font-weight: bold;
}

.input-group button:hover {
  background-color: #1e40af;
}

.balance-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.balance-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: #f1f5f9;
  padding: 0.5rem;
  border-radius: 5px;
}

.column-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .balance-grid-container {
    grid-template-columns: 1fr;
  }
}

.login-container {
  background-color: #fff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 300px;
}
h2 {
  text-align: center;
  color: #333;
}
.form-group {
  margin-bottom: 1em;
}
label {
  display: block;
  margin-bottom: 0.5em;
  color: #555;
}
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.8em;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.submit-btn {
  width: 100%;
  padding: 1em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}
.submit-btn:hover {
  background-color: #0056b3;
}

/* Nuevos estilos para un layout más limpio */
.currency-card-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.currency-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 49%;
  gap: 0.5rem;
}

.balance-btn {
  background-color: transparent;
  border: 1px solid rgb(186, 186, 186);
  color: black;
  font-size: 1.25rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
}

.balance-btn:hover {
  background-color: rgba(130, 135, 130, 0.1);
  border-color: #2563eb;
  color: #2563eb;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.action-buttons button {
  flex: 1;
}

.input-group {
  flex-direction: column;
  align-items: stretch;
}

@media (max-width: 450px) {
  .currency-card-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .balance-grid-container {
    display: flex;
    flex-wrap: nowrap; /* Evita que los elementos se envuelvan */
    overflow-x: scroll; /* Permite el desplazamiento horizontal */
    scroll-snap-type: x mandatory; /* Alinea el contenido al deslizar */
    -webkit-overflow-scrolling: touch; /* Mejora el rendimiento en iOS */
  }

  .balance-column {
    flex: 0 0 100%; /* Cada columna ocupa el 100% del ancho del contenedor */
    scroll-snap-align: start; /* Alinea cada columna al inicio del contenedor al deslizar */
    box-sizing: border-box;
    min-width: 100%;
  }

  /* Ocultar la barra de desplazamiento para un diseño más limpio */
  .balance-grid-container::-webkit-scrollbar {
    display: none;
  }
  .balance-grid-container {
    -ms-overflow-style: none; /* Para IE y Edge */
    scrollbar-width: none; /* Para Firefox */
  }
}
