body {
  background-color: #141414;
  color: white;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.documents-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.documents-column {
  flex: 1;
}

@media (max-width: 1000px) {
  .documents-container {
    flex-direction: column;
    align-items: center;
  }

  .documents-column {
    width: 100%;
  }
}

#documents {
  padding: 20px;
}

#documents h2 {
  color: #faca2a;
  text-transform: uppercase;
}

#documents-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: start;
  width: 100%;
}

#recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: start;
  width: 100%;
}

.document-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #000;
  padding: 15px 20px;
  margin: 21px auto;
  min-height: 70px;
  border-radius: 16px;
  border: 1px solid #222;
  color: #fff;
  width: 70%;
  transition: background-color 0.3s, color 0.3s;
  cursor: pointer;
  gap: 10px;
  height: 100%;
}

.document-card div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 21px;
  flex: 1;
}

.document-date {
  white-space: nowrap;
}

.document-title {
  font-size: 1.8em;
  font-weight: bold;
  color: #ffbb00;
}

.document-description {
  flex: 1;
}

.document-actions {
  display: flex !important;
  gap: 10px !important;
  justify-content: flex-start !important;
  flex-wrap: wrap;
  width: auto;
  min-width: max-content;
  flex: 0 0 auto !important;
  margin-top: auto !important;
}

button {
  padding: 8px 12px;
  border: 1px solid black;
  cursor: pointer;
  border-radius: 7px;
  font-size: 0.9em;
  transition: 0.2s;
}

button.delete-button {
  background-color: #f44336;
  color: #fff;
}

button.delete-button:hover {
  background-color: #440a09;
  border: 1px solid #f44336;
}

button.quiz-button {
  background-image: url("/common/galaxy.webp");
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 2px solid #8a15ff;
  color: white;
}

button.quiz-button:hover {
  background-color: #440a09;
  border: 2px solid #9d4bf0;
}

button.cancelButton {
  background-color: #f44336;
  color: #fff;
}

button.cancelButton:hover {
  background-color: #440a09;
  border: 1px solid #f44336;
}

.edit-file-input {
  max-width: 100%;
  flex: 1 1 100%;
}

button.submitButton,
button.cancelButton {
  flex: 1 1 45%;
  max-width: 100px;
  white-space: nowrap;
}

button.edit-button {
  background-color: #000d53;
  color: #fff;
}

button.edit-button:hover {
  background-color: #2d47da;
  border: 1px solid #000d53;
}

.popularity {
  font-size: 17px;
  margin-left: 6px;
  color: #ffbb00;
  opacity: 0.9;
}

.flame-icon {
  width: 27px;
  height: 27px;
  vertical-align: middle;
}

button.submitButton {
  background-color: #13731a;
  color: rgb(255, 255, 255);
  border: none;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease;
  position: relative;
}

button.submitButton:hover {
  background-color: #4bc910;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: black;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 2px solid #ffbb00;
}

.modal-content label {
  display: block;
  margin-top: 10px;
  color: #ffbb00;
  font-weight: bold;
}

.modal-content button {
  margin: 10px;
  padding: 8px 15px;
  border: 2px solid #ffbb00;
  border-radius: 4px;
  cursor: pointer;
  background: black;
  color: #ffbb00;
  font-weight: bold;
  transition: background 0.3s ease, color 0.3s ease;
}

.modal-content button:hover {
  background-color: #ffbb00;
  color: black;
}

.modal-content h2 {
  color: #ffbb00;
  font-weight: bold;
}

.modal-content select,
.modal-content input {
  width: 30%;

  padding: 8px;
  margin-top: 5px;
  border: 2px solid #ffbb00;
  border-radius: 4px;
  text-align: center;
  background-color: black;
  color: #ffbb00;
  font-weight: bold;
  outline: none;
  transition: border 0.3s ease;
}

.modal-content select:hover,
.modal-content input:hover,
.modal-content select:focus,
.modal-content input:focus {
  border-color: white;
}

:root {
  --logo-size: clamp(100px, 20vw, 250px);
  --circle-size: calc(var(--logo-size) + 40px);
  --spin-speed: 1.2s;
}

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.preloader__logo {
  width: var(--logo-size);
  height: var(--logo-size);
  position: relative;
  background: url("/common/background.png") no-repeat center;
  background-size: contain;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preloader__circle {
  position: absolute;
  width: var(--circle-size);
  height: var(--circle-size);
  border-radius: 50%;
  border-top: 3px solid #ffbb00;
  animation: preloader-spin var(--spin-speed) linear infinite;
}

.alert-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  pointer-events: none;
}

.alert {
  padding: 20px;
  color: white;
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
  margin-bottom: 10px;
  border-radius: 5px;
  font-size: 16px;
  max-width: 400px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  text-align: center;
  position: relative;
}

.alert.success {
  background-color: #04aa6d;
}
.alert.info {
  background-color: #2196f3;
}
.alert.warning {
  background-color: #ff9800;
}
.alert.danger {
  background-color: #f44336;
}

.closebtn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  border: none;
  background: transparent;
}

.closebtn:hover {
  color: black;
}

.submitButton:hover ~ .document-card {
  background-color: #000 !important;
  color: #fff !important;
}

@keyframes preloader-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1500px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(255, 223, 0, 0.2);
}

.carousel {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  transition: 0.5s;
}

.slide img {
  width: 100%;
  border-radius: 10px;
}

button.prev,
button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: yellow;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 24px;
  border-radius: 5px;
  transition: 0.3s;
}

button.prev:hover,
button.next:hover {
  background: rgba(255, 223, 0, 0.8);
  color: black;
}

button.prev {
  left: 10px;
}

button.next {
  right: 10px;
}

@media (max-width: 800px) {
  button.prev,
  button.next {
    font-size: 18px;
    padding: 8px 12px;
  }
}
