@font-face {
  font-family: InterVariable;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Inter-4.0/InterVariable.woff2") format("woff2");
}

body {
  opacity: 0; /* Set to 1 when the contents are loaded. */
  font-family: InterVariable, sans-serif;
  font-size: 1.1rem;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  max-width: 60%;
  min-height: 80vh;
  margin: 50px auto;
  text-align: center;
  background-color: #fff;
  box-shadow: 0 0 10px #ebebeb;
  border-radius: 8px;
  padding: 2rem;
  overflow-x: hidden;
}

a {
  color: #0000ff;
}

h1 {
  color: #333;
  margin-top: 5px;
  margin-bottom: 40px;
  font-weight: normal;
}

.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

.button-container a {
  text-decoration: none;
}

.button-container button {
  display: flex;
  align-items: center;
  font-size: medium;
}

.button-container button svg {
  margin-right: 5px;
}

#add-bang {
  background: #e15e49;
  color: #fff;
  padding: 15px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-radius 0.5s ease,
    background 0.3s ease;
}

#add-bang:hover {
  background: #a84636;
  border-radius: 12px;
}

#settings {
  color: #454545;
  fill: #454545;
  border: none;
  background: none;
}

#settings:hover {
  color: #2a2a2a;
  fill: #2a2a2a;
  text-decoration: underline;
  cursor: pointer;
}

#yang-logo {
  width: 15%;
  margin-top: 20px;
}

.table-container {
  margin: 25px auto;
  min-width: 50%;
  width: 80%;
}

#bangs-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-radius: 8px 8px 0 0;
  font-size: 0.95rem;
  font-family: sans-serif;
  text-align: left;
  box-shadow: 0 0 20px #ebebeb;
  overflow: hidden;
}

#bangs-table thead tr {
  background: linear-gradient(to right, #7814ae, #d53);
  color: #fff;
}

#bangs-table th,
#bangs-table td {
  padding: 12px 15px;
  white-space: nowrap;
}

#bangs-table th:first-child,
#bangs-table td:first-child {
  width: 25vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

#bangs-table th:last-child,
#bangs-table td:last-child {
  text-align: end;
  padding-right: 10px;
  padding-left: 0;
  overflow: visible;
}

#bangs-table tbody tr {
  border-bottom: 1px solid #ddd;
}

#bangs-table tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

#bangs-table tbody tr:last-of-type {
  border-bottom: 2px solid #d53;
}

#bangs-table tbody tr:hover {
  color: #361149;
  background-color: #f5f0f8;
}

#bangs-table .edit-button,
#bangs-table .delete-button {
  border: none;
  background: none;
  padding: 0 8px;
  margin: 2px;
  cursor: pointer;
  color: #494949;
}

#bangs-table .edit-button:hover {
  color: #7814ae;
}

#bangs-table .delete-button:hover {
  color: #c01010;
}

.bang {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: bold;
  color: #7914ad;
  background-color: #f4f4f4;
  padding: 0.2rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#bangs-table td .bang {
  display: inline-block;
  cursor: pointer;
}

#no-bangs {
  color: #585858;
  font-size: 0.95rem;
  margin: 15px 0;
}

.footer {
  display: flex;
  width: 100%;
  margin-top: 20px;
  justify-content: space-between;
  font-size: 0.85rem;
}

#version {
  font-size: 0.8rem;
}

#version a:link,
#version a:visited {
  color: #4e4e4e;
}

.toast-container {
  position: fixed;
  width: 50%;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1a1a1a;
  font-size: 0.95rem;
  color: #fff;
  padding: 15px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-container button {
  background-color: transparent;
  color: yellow;
  border: none;
  text-decoration: underline;
  font-size: 1rem;
  cursor: pointer;
}

@media screen and (width < 1000px) {
  h1 {
    margin-bottom: 35px;
  }

  .container {
    max-width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
  }

  .footer {
    width: 95%;
    margin-bottom: 30px;
  }

  .toast-container {
    width: 90%;
  }

  #yang-logo {
    width: 25%;
    margin-top: 30px;
  }

  .table-container {
    margin: 10px auto;
    width: 95%;
  }

  .button-container {
    justify-content: space-between;
    margin-bottom: 20px;
  }

  #bangs-table th:first-child,
  #bangs-table td:first-child {
    width: 50vw;
  }

  #bangs-table th:nth-child(2),
  #bangs-table td:nth-child(2) {
    padding-right: 0;
    padding-left: 0;
  }

  #bangs-table th:last-child,
  #bangs-table td:last-child {
    padding-right: 0;
    padding-left: 0;
    float: right;
  }
}
