:root {
  color-scheme: dark;
  --bg: #070c17;
  --bg-2: #0f172a;
  --card: rgba(20, 30, 48, 0.8);
  --card-solid: #162136;
  --border: rgba(148, 163, 184, 0.15);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --gold: #f59e0b;
  --green: #10b981;
  --danger: #ef4444;
  --radius: 20px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(129, 140, 248, 0.14) 0%, transparent 42%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* Scrollbars */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.72);
}
*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
  }
}

/* Layout */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 18px 46px;
}

.shell-narrow {
  max-width: 700px;
  margin: 0 auto;
  padding: 28px 18px 46px;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 410px;
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #060b16;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.brand h1 {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.storage-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

.storage-bar-mini {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.storage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.main-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card-title {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mode Tabs */
.tabs {
  display: flex;
  gap: 6px;
  background: rgba(10, 16, 30, 0.72);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.22));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.38);
  border-radius: 16px;
  background: rgba(10, 16, 30, 0.56);
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
  margin-bottom: 14px;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  transform: scale(1.005);
}

.dropzone-icon {
  font-size: 2.3rem;
  margin-bottom: 8px;
}

.dropzone-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.selected-files {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 4px;
}

.file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(10, 16, 30, 0.72);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.file-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.file-chip-size {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Form Elements */
.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 5px;
}

.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 30, 0.85);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.code-textarea {
  min-height: 185px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 520px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.burn-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.28);
  margin-bottom: 14px;
  cursor: pointer;
}

.burn-toggle-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fde68a;
}

.burn-toggle-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.burn-toggle input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #f59e0b;
  cursor: pointer;
}

/* Progress Bar */
.progress-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(10, 16, 30, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  transition: width 0.15s linear;
}

/* Result Banner */
.result-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(16, 185, 129, 0.42);
}

.result-link-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.result-url {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  color: #7dd3fc;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:hover {
  background: #23324d;
  border-color: var(--border-strong);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border-color: transparent;
  color: #060b16;
  font-weight: 800;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7dd3fc, #818cf8);
}

.btn-warn {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-color: transparent;
  color: #060b16;
  font-weight: 800;
}

.btn-ghost {
  background: rgba(20, 30, 48, 0.55);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.34);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: 9px;
}

.inline-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Active Shares List */
.shares-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}

.share-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(10, 16, 30, 0.62);
  border: 1px solid var(--border);
}

.share-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.share-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  word-break: break-word;
}

.share-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.badge-burn {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.badge-pw {
  background: rgba(129, 140, 248, 0.18);
  color: #c7d2fe;
}

.badge-time {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
}

/* Share Download Page */
.share-hero {
  text-align: center;
  margin-bottom: 18px;
}

.share-hero-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 10px;
}

.share-hero h2 {
  font-size: 1.55rem;
  font-weight: 900;
  margin-bottom: 6px;
  word-break: break-word;
}

.share-meta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.message-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(10, 16, 30, 0.65);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: #e2e8f0;
  white-space: pre-wrap;
  margin-bottom: 16px;
}

.burn-warning {
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fde68a;
  font-size: 0.88rem;
  margin-bottom: 16px;
  text-align: center;
}

.paste-box {
  background: rgba(7, 12, 23, 0.88);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 55vh;
  overflow: auto;
  margin-bottom: 14px;
}

.download-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(10, 16, 30, 0.65);
  border: 1px solid var(--border);
  margin-bottom: 9px;
}

.preview-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid var(--border);
  display: block;
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 18, 0.74);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 200;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background: #111c30;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 22px;
  text-align: center;
}

.qr-wrap {
  background: #ffffff;
  padding: 12px;
  border-radius: 14px;
  width: 210px;
  height: 210px;
  margin: 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(130%);
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.88rem;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  z-index: 300;
  transition: transform 0.25s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.empty-msg {
  font-size: 0.86rem;
  color: var(--muted);
  text-align: center;
  padding: 22px 10px;
}
