:root {
  --bg-0: #000;
  --bg-1: #000;
  --tile: #0d0d0d;
  --tile-2: #141414;
  --line: #3d3d3d;
  --text: #f5f5f5;
  --muted: #b5b5b5;
  --accent: #ff6a00;
  --accent-2: #ff6a00;
  --accent-soft: #1a1a1a;
  --danger: #ff9a4a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Bahnschrift', 'Segoe UI', 'Arial Narrow', sans-serif;
  color: var(--text);
  background: var(--bg-0);
  min-height: 100vh;
  letter-spacing: 0.02em;
}

body.modal-open {
  overflow: hidden;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.2rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  grid-column: span 6;
  background: var(--tile);
  border: 1px solid var(--line);
  padding: 1rem;
}

.panel h2 {
  margin: 0 0 0.95rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type='text'],
input[type='number'] {
  width: 100%;
  padding: 0.62rem 0.64rem;
  border: 1px solid #4a4a4a;
  border-radius: 0;
  margin-bottom: 0.8rem;
  background: #050505;
  color: var(--text);
  font-family: inherit;
}

input[type='text']::placeholder {
  color: #7c7c7c;
}

input[type='text']:focus,
input[type='number']:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.hidden-input {
  display: none;
}

.source-box {
  border: 1px dashed #676767;
  border-radius: 0;
  padding: 0.85rem;
  margin-bottom: 0.95rem;
  background: #090909;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.source-box.dragover {
  border-color: var(--accent);
  background: #1a1006;
}

.source-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.source-actions button,
.post-upload-right button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
}

.selection-info {
  margin: 0.72rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.warning-note {
  margin: -0.4rem 0 0.9rem;
  color: #ffbc7d;
  font-size: 0.82rem;
}

.expire-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.small-label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.inline {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0.2rem 0 0.95rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.inline input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0.05rem 0 0;
  border: 1px solid #6a6a6a;
  border-radius: 0;
  background: #050505;
  display: grid;
  place-content: center;
  flex: 0 0 18px;
  cursor: pointer;
}

.inline input[type='checkbox']::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.12s ease;
}

.inline input[type='checkbox']:checked {
  border-color: var(--accent);
}

.inline input[type='checkbox']:checked::before {
  transform: scale(1);
}

.inline input[type='checkbox']:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--accent);
}

.upload-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

button {
  border: 1px solid #6f6f6f;
  background: #101010;
  color: #fff;
  border-radius: 0;
  padding: 0.62rem 1rem;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: filter 0.15s ease, transform 0.12s ease;
}

button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  filter: none;
}

button:active {
  transform: translateY(1px);
}

button.secondary {
  background: #0a0a0a;
  border-color: #5b5b5b;
  color: #fff;
}

.status {
  min-height: 1.2rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.status-row {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.status-row .status {
  margin: 0;
}

.upload-speed {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.status.error {
  color: var(--danger);
}

.progress-wrap {
  margin-top: 0.85rem;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.progress-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 0;
  background: #030303;
  overflow: hidden;
  border: 1px solid #4a4a4a;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.18s ease;
}

.progress-track.indeterminate .progress-bar {
  width: 40%;
  animation: progress-indeterminate 1.1s linear infinite;
}

@keyframes progress-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(260%);
  }
}

.result {
  margin-top: 0.85rem;
  padding: 0.75rem;
  background: #0a0a0a;
  border: 1px solid #555;
  border-radius: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.result code {
  font-size: 1.15rem;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: #ffbf85;
}

.copy-link-btn {
  margin-left: 0.3rem;
  margin-right: 0.55rem;
  padding: 0.35rem 0.58rem;
  border-radius: 0;
  font-size: 0.72rem;
  background: #0f0f0f;
  border-color: #707070;
  color: #fff;
}

.copy-link-btn:hover {
  filter: none;
}

.cancel-btn {
  background: #1a1208;
  border-color: #7a5736;
  color: #fff;
}

.cancel-row {
  margin-top: 0.7rem;
  display: flex;
  justify-content: flex-end;
}

#uploadOtherBtn {
  margin-top: 0;
}

.post-upload-actions {
  margin-top: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.post-upload-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

#uploadOtherBtn,
.post-upload-right button {
  min-width: 148px;
}

.material-symbols-outlined {
  font-size: 1.15rem;
  line-height: 1;
}

.material-symbols-outlined.icon-filled {
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

.otp-wrap {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.85rem;
}

.otp-char {
  height: 56px;
  border: 1px solid #666;
  background: #050505;
  color: #fff;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 0;
  outline: none;
}

.otp-char:focus {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

#downloadBtn {
  display: block;
  margin-left: auto;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0, 0, 0, 0.88);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.qr-modal-card {
  width: min(92vw, 620px);
  background: #0a0a0a;
  border: 1px solid #7a4a1f;
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  padding: 0.95rem;
}

.qr-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.qr-modal-head h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.96rem;
  color: #ffbe85;
}

.qr-close-btn {
  margin: 0;
}

.qr-modal-image {
  width: min(100%, 520px);
  height: auto;
  display: block;
  margin: 0.9rem auto 0.55rem;
  image-rendering: pixelated;
  background: #fff;
  padding: 0.35rem;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .panel {
    grid-column: 1 / -1;
  }
}

@media (min-width: 901px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .container {
    width: min(1140px, 100%);
  }
}

@media (max-width: 640px) {
  .container {
    margin: 0.5rem auto;
    padding: 0.8rem;
    gap: 10px;
  }

  .source-actions {
    grid-template-columns: 1fr;
  }

  .post-upload-actions {
    justify-content: flex-start;
  }

  .expire-grid {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .otp-wrap {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .otp-char {
    height: 52px;
    font-size: 1.35rem;
  }

  .qr-modal-card {
    padding: 0.75rem;
  }
}
