body {
  color: white;
  font-family: sans-serif;

  min-height: 100vh;

  background-image: url("assets/background.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

h1 {
  font-size: clamp(2rem, 20vw, 8rem);
  text-align: center;
  margin-left: 0;
  margin-right: 0;
}

h2 {
  font-size: 2rem;
}

p {
  font-size: 1rem;
}

.modal {
  color: white;

  outline: none;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.5);

  width: 20rem;
  align-items: center;
  align-content: center;

  background-color: transparent;
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);

  max-height: 70vh;
  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

dialog::backdrop {
  backdrop-filter: blur(0.5rem);
}

#balance-display {
  padding: 0.5rem;
  border-radius: 1rem;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
}

:root {
  --green-base: 84, 223, 96;
  --red-base: 255, 130, 112;
}

.green {
  background-color: rgba(var(--green-base), 0.2);
  color: rgb(var(--green-base));
}

.button.green:hover {
  background-color: rgba(var(--green-base), 0.4);
}

.red {
  background-color: rgba(var(--red-base), 0.2);
  color: rgb(var(--red-base));
}

.button.red:hover {
  background-color: rgba(var(--red-base), 0.4);
}

#transaction-icon {
  max-height: 32px;
}

#main-container {
  margin-left: 1.2rem;
  margin-right: 1.2rem;
}

.flexbox {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.container {
  display: flex;
  flex-grow: 1;
  justify-content: space-evenly;
  align-items: stretch;

  padding: 1.2rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(0.5rem);
  -webkit-backdrop-filter: blur(0.5rem);
}

.search-container {
  width: 100%;
  margin-bottom: 1.5rem;
}

.search-container input[type="text"] {
  color: white;
  width: 100%;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;

  height: 4rem;
  border: none;
  outline: none;
  border-radius: 1.2rem;
  background-color: rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
}

.search-container input[type="text"]:focus {
  background-color: rgba(255, 255, 255, 0.4);
}

user-table {
  width: 100%;
  display: block;
  max-height: 70vh;
  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

user-table::-webkit-scrollbar {
  width: 8px;
}

user-table::-webkit-scrollbar-track {
  background: transparent;
}

user-table::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

user-table::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

#user-table {
  width: 100%;
  border-spacing: 0 0.5rem;
  border-collapse: separate;
}

th {
  font-size: 1.2rem;
  width: auto;
}

.user-row td {
  background-color: rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-top: none;
  border-bottom: none;
}

.user-row td:first-child {
  border-radius: 1.2rem 0 0 1.2rem;
  padding-left: 1rem;
}

.user-row td:last-child {
  border-radius: 0 1.2rem 1.2rem 0;
  padding-right: 1rem;
}

.user-row {
  padding: 0;
}

td {
  width: auto;
  text-align: center;
}

.transaction-container {
  margin: 2rem auto;
  text-align: center;
}

#tx-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.input-group {
  position: relative;
  width: 100%;
}

.input-group label {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);

  font-size: 1.5rem;
  font-weight: bold;
  opacity: 0.7;
  pointer-events: none;
}

input[name="amount"] {
  color: white;
  width: 100%;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;

  height: 4rem;
  border: none;
  outline: none;
  border-radius: 1.2rem;
  background-color: rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
}

input[name="amount"]:focus {
  background-color: rgba(255, 255, 255, 0.4);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.action-buttons {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.button {
  flex: 1;
  height: 4rem;
  border-radius: 1.2rem;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

transaction-table {
  width: 100%;
}

#transaction-table {
  border-collapse: separate;
  border-spacing: 1rem 0.5rem;
  width: 100%;
}

#transaction-table th {
  padding: 1rem 0.5rem 1rem 0.5rem;
  border-radius: 1rem;
  background-color: rgba(255, 255, 255, 0.15);
}

@keyframes flash-green {
  0% {
    background-color: rgba(var(--green-base), 0.4);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes flash-red {
  0% {
    background-color: rgba(var(--red-base), 0.4);
  }
  100% {
    background-color: transparent;
  }
}

.new-deposit {
  animation: flash-green 3s ease-out;
}

.new-withdraw {
  animation: flash-red 3s ease-out;
}

.gsi-material-button {
  background-color: white;
  border: 1px solid #dadce0;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0.75rem;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.gsi-material-button:hover {
  background-color: #f5f5f5;
}

.gsi-material-button:active {
  background-color: #e0e0e0;
}

.gsi-material-button-state {
  display: none;
}

.gsi-material-button-content-wrapper {
  display: inline-flex;
  align-items: center;
}

.gsi-material-button-icon {
  margin-right: 0.5rem;
}

.gsi-material-button svg {
  width: 24px;
  height: 24px;
}

.gsi-material-button-contents {
  font-weight: 600;
  color: #5f6368;
}

/* Hide the duplicate text */
.gsi-material-button-content-wrapper span[style="display: none;"] {
  display: none;
}
