/* 
 * Uploader.zesium.xyz - Clean, Normal, Professional File Hosting
 * Inspired by Filebin.net: Crisp light background, clean typography, reliable layout
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #0d6efd;
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover {
  color: #0a58ca;
}

/* Header & Container */
.page-header {
  border-bottom: 1px solid #dee2e6;
  background-color: #ffffff;
  padding: 0.75rem 1.5rem;
}

.header-container {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: #212529;
  text-decoration: none;
}

.header-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.header-links a {
  color: #6c757d;
  text-decoration: none;
}
.header-links a:hover {
  color: #212529;
}

/* Main Container */
.main-container {
  max-width: 980px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

/* Top Intro with Title & QR Code */
.intro-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}

.intro-content {
  flex: 1;
}

.site-title {
  font-size: 2.75rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #212529;
  margin-bottom: 0.5rem;
}

.site-subtitle {
  font-size: 1.15rem;
  color: #6c757d;
  margin-bottom: 1.25rem;
}

.qr-box {
  width: 110px;
  text-align: center;
  flex-shrink: 0;
}

.qr-box img {
  width: 100px;
  height: 100px;
  border: 1px solid #dee2e6;
  padding: 4px;
  background: #ffffff;
}

.qr-label {
  font-size: 0.72rem;
  color: #6c757d;
  margin-top: 4px;
}

/* Steps / Notice List */
.steps-list {
  list-style: none;
  margin-bottom: 2rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #6c757d;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.notice-text {
  font-style: italic;
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Custom Link Creator Card */
.custom-link-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.custom-link-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #495057;
}

.custom-link-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.link-prefix {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  color: #6c757d;
}

.link-input-field {
  flex: 1;
  min-width: 180px;
  padding: 0.45rem 0.75rem;
  font-size: 0.95rem;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  border: 1px solid #ced4da;
  border-radius: 4px;
  outline: none;
}
.link-input-field:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  color: #ffffff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}
.btn-primary:hover {
  color: #ffffff;
  background-color: #0b5ed7;
  border-color: #0a58ca;
  text-decoration: none;
}

.btn-secondary {
  color: #212529;
  background-color: #e9ecef;
  border-color: #ced4da;
}
.btn-secondary:hover {
  background-color: #dde0e3;
  color: #212529;
  text-decoration: none;
}

.btn-danger {
  color: #ffffff;
  background-color: #dc3545;
  border-color: #dc3545;
}
.btn-danger:hover {
  background-color: #bb2d3b;
  text-decoration: none;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

/* Dropzone (Normal clean styled) */
.dropzone-area {
  border: 2px dashed #0d6efd;
  background-color: #ffffff;
  border-radius: 6px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: background-color 0.15s ease;
}
.dropzone-area:hover {
  background-color: #f1f8ff;
}
.dropzone-area.dragover {
  background-color: #e2f0ff;
  border-color: #0a58ca;
}

.dropzone-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #212529;
}

.dropzone-help {
  color: #6c757d;
  font-size: 0.95rem;
}

/* Upload Progress */
.progress-card {
  display: none;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.progress-bar-wrap {
  height: 12px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-value {
  height: 100%;
  width: 0%;
  background: #0d6efd;
  transition: width 0.15s ease;
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  color: #6c757d;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Bin Header & Toolbar */
.bin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.bin-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bin-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #212529;
}

.bin-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.badge-warning {
  background-color: #fff3cd;
  color: #664d03;
  border: 1px solid #ffe69c;
}
.badge-danger {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.bin-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Files Table */
.table-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.table-title-bar {
  padding: 0.85rem 1.25rem;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.files-table {
  width: 100%;
  border-collapse: collapse;
}

.files-table th {
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 600;
  text-align: left;
}

.files-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.95rem;
  vertical-align: middle;
}

.files-table tr:last-child td {
  border-bottom: none;
}

.files-table tr:hover td {
  background-color: #f8f9fa;
}

.file-link {
  font-weight: 600;
  color: #0d6efd;
  text-decoration: underline;
}

.table-actions-cell {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

/* cURL / API snippet box */
.api-box {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1.25rem;
  margin-top: 2rem;
}

.api-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #212529;
}

.api-snippet {
  background: #212529;
  color: #f8f9fa;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
}

.api-code {
  color: #79c0ff;
}

/* Clean Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 6px;
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
}
.modal-close:hover {
  color: #212529;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

/* Footer */
.page-footer {
  border-top: 1px solid #dee2e6;
  background: #ffffff;
  padding: 1.5rem;
  text-align: center;
  color: #6c757d;
  font-size: 0.88rem;
  margin-top: 3rem;
}

/* Toast */
.toast-shelf {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
}

.normal-toast {
  background: #212529;
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
