/* General */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

:root {
  --accent-color: #8234db;
  --dark-color: #1a1a1a;
  --light-color: #f2f2f2;
}

body {
  background-color: var(--dark-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100vh;
  background-image: url("public/background.jpeg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
#logo {
  position: absolute;
  top: -60px;
  left: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0px;
}
#logo h1 {
  color: var(--light-color);
  font-size: 32px;
  background-color: var(--accent-color);
  border-radius: 8px;
  padding: 12px;
  padding-left: 24px;
  box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}
#logo img {
  width: 100px;
  position: relative;
  left: 40px;
  animation: moveUpDown 2s infinite ease-in-out;
}

@keyframes moveUpDown {
  0%,
  100% {
    transform: translateY(0) scaleX(-1);
  }
  50% {
    transform: translateY(-10px) scaleX(-1);
  }
}

/* Transfer box */
#transfer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  position: relative;
  width: 500px;
  height: 400px;
  border-radius: 8px;
  margin: 16px;
  background-color: var(--light-color);
  border: 4px solid var(--light-color);
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px,
    rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px,
    rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}

.glowing-red-border {
  animation: red-glow 2s infinite ease-in-out;
}

.glowing-border {
  animation: glow 2s infinite ease-in-out;
}

@keyframes glow {
  0%,
  100% {
    border-color: var(--accent-color);
  }
  50% {
    border-color: var(--light-color);
  }
}

@keyframes red-glow {
  0%,
  100% {
    border-color: red;
  }
  50% {
    border-color: var(--light-color);
  }
}

.transfer-box-body {
  height: 90%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#upload-box {
  display: none;
}

#default-box {
  gap: 64px;
}
#download-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Files */
#selectedFiles {
  height: 70%;
  max-width: 90%;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: start;
  gap: 8px;
  opacity: 0;
}
#transfer-code {
  margin-top: 16px;
  font-size: 16px;
  font-weight: bold;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: none;
}
.file-container {
  display: flex;
  align-items: top;
  justify-content: left;
  word-break: break-all;
  gap: 8px;
  width: max-content;
  max-width: 100%;
}
.close-icon {
  cursor: pointer;
  color: red;
}
.file-size,
#total-size {
  font-style: italic;
  color: #777;
  font-size: 12px;
  height: 14px;
  padding-bottom: 16px;
}
.red-text {
  color: red !important;
}
.file-size {
  margin-left: 8px;
}

/* Inputs & Buttons */
input[type="file"]::-webkit-file-upload-button {
  cursor: pointer;
}

#fileInputContainer {
  position: relative;
  overflow: hidden;
  display: inline-block;
  min-height: 34px;
  border-radius: 4px;
  box-shadow: rgba(130, 52, 219, 0.4) -5px 5px,
    rgba(130, 52, 219, 0.3) -10px 10px;
  margin-bottom: 16px;
}
.custom-file-input-label,
.purple-button {
  display: inline-block;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
}
.custom-file-input-label {
  background: transparent;
  color: var(--accent-color);
}
#code-input {
  border: 2px solid var(--accent-color);
  width: 50%;
  height: 30px;
  padding: 0px 16px;
  color: var(--dark-color);
}
#fileInput {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 100px;
  cursor: pointer;
  opacity: 0;
}
#error-message {
  color: red;
  font-size: 12px;
  height: 8px;
  font-style: italic;
}
.purple-button {
  background-color: var(--accent-color);
  border: 2px solid var(--accent-color);
  color: var(--light-color);
  border-radius: 4px;
  margin-bottom: 8px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
}
.purple-button:disabled {
  background-color: #ccc;
  border: 2px solid #ccc;
  color: #666;
  cursor: not-allowed;
}

@media screen and (max-width: 451px) {
  #logo h1 {
    font-size: 24px;
  }
}
@media screen and (max-width: 392px) {
  #logo h1 {
    font-size: 16px;
  }
}
