/* ========== Reset & Base Styles ========== */
* {
  margin: 0;
  padding: 0;
  font-family: inherit;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  margin: 0;
  background-color: #1e1e1e;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100vh;
  padding: 40px;
  text-align: left;
  font-family: inherit;
}

main {
  width: 100%;
  margin: 60px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

form {
  display: flex;
  align-items: flex-start;
  gap: 0px;
  margin-bottom: 40px;
  padding-left: 0px;
}

/* ========== Header & Logo ========== */
.site-header {
  width: 100%;
  padding-bottom: 10px;
  display: flex;
  justify-content: flex-start;
  gap: 16px;
}

.logo {
  width: 40px;
  height: auto;
  display: block;
}

.site-header h1 {
  font-size: 2rem;
  margin: 0;
  color: #ffffff;
  font-weight: bold;
}

/* ========== Main Content ========== */
.message {
  color: #a0a0a0;
  font-size: 1.2rem;
  margin-bottom: 20px;
  max-width: 100%;
  width: auto;
  min-height: 0px;
}

.fake-error {
  color: #8c8c8c;
  background: none;
  font-family: "Fira Mono", "Consolas", monospace;
  font-size: 1rem;
  opacity: .6;
  letter-spacing: 1px;
  border-left: 3px solid #facc15;
  padding-left: 12px;
  margin-bottom: 0px;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

/* ========== Button Styles ========== */
.contact-button {
  margin-top: 30px;
  margin-bottom: 40px;
  padding: 8px 24px;
  background-color: transparent;
  color: #64748b;
  border: 1px solid #5f6368;
  border-radius: 9999px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s ease;
  align-self: flex-start;
  text-decoration: none;
}
.contact-button:hover {
  background-color: transparent;
  color: #afafaf;
  border: 1px solid #afafaf;
}

.upload-button {
  background: none;
  border: none;
  padding-left: 10px;
  margin-top: 20px;
  color: #64748b;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}
.upload-button:hover {
  color: #afafaf;
}

.upload-main-button {
  display: block;
  margin: 40px auto 0 auto;
  padding: 14px 48px;
  background: none;
  color: #ffffff;
  border: 1px solid #64748b;
  border-radius: 9999px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 12px 0 #0002;
  transition: background 0.2s, color 0.2s;
}
.upload-main-button:hover {
  background: linear-gradient(90deg, #ffffff 0%, #bfbfbf 100%);
  color: #1e1e1e;
}

/* ========== Mystery Text ========== */
.mystery {
  color: #8c8c8c;
  font-family: "Fira Mono", "Consolas", monospace;
  font-size: 0.9rem;
  opacity: .6;
  letter-spacing: 1px;
  margin-top: 4px;
  margin-bottom: 20px;
  width: 100%;
  padding-left: 15px;
}

/* ========== Footer ========== */
.footer {
  font-size: 1.2rem;
  color: #a0a0a0;
}

/* ========== Hidden Link ========== */
.hidden-links {
  position: fixed;
  top: 10px;
  right: 20px;
  display: flex;
  gap: 10px;
}
.hidden-link {
  opacity: 0.01;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
  display: block;
  position: static;
}
.hidden-link:hover {
  opacity: 1;
  cursor: pointer;
}

/* ========== Typewriter Effect ========== */
.typewriter {
  overflow: hidden;
  border-right: .15em solid #facc15;
  letter-spacing: .05em;
  animation: typing 5s steps(80, end), blink-caret .75s step-end infinite;
  width: 0;
}
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #a3a3a3; }
}

/* ========== Responsive Design ========== */
@media (max-width: 600px) {
  .mystery,
  .footer,
  .fake-error,
  .message {
    font-size: 1rem;
    padding: 0 10px;
  }
}

/* Hide native file input */
input[type="file"] {
  display: none;
}
.file-name-display {
  padding-left: 20px;
  list-style: disc;
  color: #a0a0a0;
  font-size: 0.8rem;
}

/* ========== File & Folder Lists ========== */
#fileList, #folderTree ul {
  list-style: none;
  padding-left: 0;
  margin: 10px 0 20px 0;
}
#fileList li, #folderTree li {
  background: #23272f;
  color: #bdbdd1;
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
  transition: background 0.2s;
}
#fileList li:hover, #folderTree li:hover {
  background: #2d323c;
}
#folderTree div {
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: bold;
  color: #ffffff;
  font-size: 1rem;
}

/* Remove Button */
#fileList button, #folderTree button {
  background: #f87171;
  color: #fff;
  border: none;
  border-radius: 4px;
  margin-left: 12px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.2s;
}
#fileList button:hover, #folderTree button:hover {
  background: #dc2626;
}

/* ========== Upload Flex Layout ========== */
.upload-flex {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.upload-col {
  flex: 1 1 350px;
  min-width: 300px;
  max-width: 500px;
}

/* Centered Upload Button */
.upload-main-button {
  margin: 40px auto 0 auto;
  display: block;
}

/* Choose Button (Files/Folders) */
.choose-button {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 50px;
  margin-bottom: 20px;
  color: #ffffff;
  border: 1px solid #5f6368;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease;
}
.choose-button:hover {
  background: linear-gradient(90deg, #ffffff 0%, #bfbfbf 100%);
  color: #1e1e1e;
}