

:root {
  
  --bg-root: #090a0d;
  --bg-surface: #101217;
  --bg-surface-subtle: #14171e;
  --bg-input: #0c0e12;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #ffffff;

  --text-primary: #f4f4f6;
  --text-secondary: #8b92a0;
  --text-muted: #525866;
  --text-danger: #f87171;

  --accent: #ffffff;
  --accent-inverted: #090a0d;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --transition-fast: 0.12s ease;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-root);
  color: var(--text-primary);
  min-height: 100dvh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.navbar {
  min-height: 56px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0 14px;
  margin-bottom: 28px;
}

.navbar-primary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.navbar-user-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-secondary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 28px;
  height: 28px;
  background: #ffffff;
  color: #090a0d;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 16px;
  height: 16px;
}

.brand-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: inline-flex;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-transform: uppercase;
}

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

.lang-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.quota-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.quota-meter-line {
  width: 80px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.quota-meter-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.3s ease;
}

.whitelist-badge-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.quota-pill-interactive {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 4px 10px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.quota-pill-interactive:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f87171;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  flex-shrink: 0;
}

.status-dot.active {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.btn-icon-subtle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  padding: 5px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon-subtle:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--text-danger);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 13, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 20px;
}

.modal-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.modal-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
}

.step-text {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero {
  margin-bottom: 28px;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 520px;
}

.main-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}

.dropzone {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-surface-subtle);
  transition: var(--transition-smooth);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: #181b24;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone:hover .dropzone-icon {
  color: var(--text-primary);
  transform: translateY(-2px);
  transition: var(--transition-fast);
}

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

.dropzone-limits {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.file-chip {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 20px;
}

.file-chip-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.file-chip-name {
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

.file-chip-size {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.file-chip-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
}

.file-chip-remove:hover {
  color: var(--text-danger);
}

.options-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.custom-dropdown {
  position: relative;
}

.dropdown-trigger {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.dropdown-trigger:hover, .dropdown-trigger.active {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.dropdown-trigger .chevron {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.dropdown-trigger.active .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  min-width: 200px;
  background: #12151d;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  padding: 6px;
  animation: fadeIn 0.15s ease-out;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-item {
  padding: 7px 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background: #1c202a;
  color: var(--text-primary);
}

.dropdown-item.selected {
  color: #ffffff;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

.dropdown-custom-row {
  display: flex;
  gap: 6px;
  padding: 4px;
}

.dropdown-custom-row input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  outline: none;
}

.dropdown-custom-row input:focus {
  border-color: var(--border-focus);
}

.dropdown-custom-row button {
  background: #ffffff;
  color: #090a0d;
  border: none;
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.dropdown-custom-row button:hover {
  opacity: 0.9;
}

.custom-checkbox-pill {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.custom-checkbox-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.checkbox-box {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  background: transparent;
}

.custom-checkbox-pill input {
  display: none;
}

.custom-checkbox-pill input:checked + .checkbox-box {
  background: #ffffff;
  border-color: #ffffff;
}

.checkbox-box svg {
  width: 10px;
  height: 10px;
  color: #090a0d;
  display: none;
}

.custom-checkbox-pill input:checked + .checkbox-box svg {
  display: block;
}

.password-drawer {
  display: none;
  width: 100%;
  margin-top: 12px;
}

.password-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
}

.password-input:focus {
  border-color: var(--border-focus);
}

.btn-submit {
  width: 100%;
  margin-top: 24px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-inverted);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.99);
}

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

.progress-view {
  display: none;
  margin-top: 24px;
}

.progress-metrics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.15s ease-out;
}

.progress-subtext {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  margin-top: 14px;
}

.btn-cancel:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.success-view {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.success-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.share-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.share-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
}

.btn-copy {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-copy:hover {
  border-color: var(--border-strong);
}

.meta-table {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

.meta-item:last-child {
  border-bottom: none;
}

.meta-label {
  color: var(--text-muted);
}

.meta-value {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.qr-container {
  display: none;
  padding: 16px;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-sm);
  margin: 16px auto;
  width: fit-content;
}

.download-view {
  text-align: left;
  max-width: 580px;
  margin: 20px auto;
}

.download-title {
  font-size: 1.25rem;
  font-weight: 600;
  word-break: break-all;
  margin-bottom: 8px;
}

.download-tags {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.download-tag {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

.toast-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #181b22;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.success-actions .btn-submit {
  margin-top: 0;
  flex: 1;
}

.success-sub-actions {
  display: flex;
  gap: 8px;
}

.success-sub-actions .btn-cancel {
  margin-top: 0;
}

.btn-danger {
  color: var(--text-danger) !important;
}

.password-challenge-row {
  display: flex;
  gap: 8px;
}

.password-challenge-row .password-input {
  flex: 1;
}

@media (max-width: 768px) {
  .app-container {
    padding: 12px 14px 28px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .navbar {
    height: auto;
    min-height: unset;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 6px 0 12px;
    margin-bottom: 20px;
  }

  .navbar-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .navbar-secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
  }

  .brand-title {
    font-size: 0.9rem;
  }

  .nav-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .quota-pill {
    font-size: 0.72rem;
    gap: 6px;
  }

  .quota-meter-line {
    width: 44px;
  }

  .lang-btn {
    padding: 4px 6px;
    font-size: 0.7rem;
    min-height: 28px;
  }

  .hero {
    clear: both;
    margin-top: 4px;
    margin-bottom: 18px;
  }

  .hero-title {
    font-size: 1.35rem;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .hero-sub {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .main-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }

  .dropzone {
    padding: 28px 12px;
    border-radius: var(--radius-sm);
  }

  .dropzone-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
  }

  .dropzone-text {
    font-size: 0.88rem;
  }

  .dropzone-limits {
    font-size: 0.72rem;
  }

  .file-chip {
    padding: 10px 12px;
    margin-top: 14px;
  }

  .file-chip-name {
    max-width: 170px;
    font-size: 0.82rem;
  }

  .file-chip-size {
    font-size: 0.72rem;
  }

  .options-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
  }

  .dropdown-trigger,
  .custom-checkbox-pill,
  #pillPasswordToggle {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    font-size: 0.76rem;
  }

  .dropdown-trigger span,
  .custom-checkbox-pill span,
  #pillPasswordToggle span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dropdown-menu {
    max-width: calc(100vw - 36px);
    min-width: 190px;
    z-index: 200;
  }

  #dropdownDownloads .dropdown-menu {
    left: auto;
    right: 0;
  }

  .dropdown-item {
    padding: 10px 12px;
    font-size: 0.8rem;
    min-height: 42px;
  }

  .password-input,
  .share-input,
  .custom-val-input {
    font-size: 16px !important;
  }

  .password-input {
    min-height: 44px;
    padding: 10px 12px;
  }

  .custom-val-input {
    min-height: 38px;
  }

  .btn-apply-val {
    min-height: 38px;
    padding: 0 14px;
  }

  .btn-submit {
    min-height: 48px;
    font-size: 0.92rem;
    margin-top: 18px;
  }

  .progress-view {
    margin-top: 18px;
  }

  .progress-metrics {
    font-size: 0.78rem;
  }

  .progress-subtext {
    font-size: 0.72rem;
    flex-wrap: wrap;
    gap: 6px;
  }

  .btn-cancel {
    min-height: 42px;
    padding: 8px 14px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .share-row {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
  }

  .btn-copy {
    min-height: 44px;
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    font-size: 0.82rem;
  }

  .meta-table {
    margin-bottom: 16px;
  }

  .meta-item {
    padding: 8px 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .meta-value {
    word-break: break-all;
    text-align: left;
    font-size: 0.74rem;
  }

  .success-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .success-actions .btn-submit {
    width: 100%;
    min-height: 48px;
  }

  .success-sub-actions {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .success-sub-actions .btn-cancel {
    flex: 1;
    min-height: 44px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .download-view {
    margin: 10px 0;
    padding: 18px 14px;
  }

  .download-title {
    font-size: 1.15rem;
    word-break: break-word;
    line-height: 1.3;
  }

  .download-tags {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
  }

  .password-challenge-row {
    flex-direction: column;
    gap: 8px;
  }

  #btnUnlock {
    width: 100%;
    min-height: 44px;
  }

  #btnDownload {
    min-height: 48px;
    font-size: 0.95rem;
  }

  #creatorSection button {
    min-height: 44px;
  }

  .toast-box {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .toast {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    padding: 10px 14px;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 1.2rem;
  }

  .options-bar {
    grid-template-columns: 1fr;
  }

  #whitelistUserText {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }

  .file-chip-name {
    max-width: 130px;
  }
}

.site-footer {
  margin-top: auto;
  padding: 32px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: 4px 6px;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.footer-badge:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #34d399;
}

.legal-modal-card {
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.legal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.legal-tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.legal-tab-btn:hover {
  color: var(--text-primary);
}

.legal-tab-btn.active {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.legal-content-body {
  overflow-y: auto;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-right: 6px;
}

.legal-content-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 14px 0 6px;
}

.legal-content-body h4:first-child {
  margin-top: 0;
}

.legal-content-body p {
  margin-bottom: 10px;
}

.legal-content-body ul {
  padding-left: 18px;
  margin-bottom: 12px;
}

.legal-content-body li {
  margin-bottom: 4px;
}

.legal-highlight {
  color: var(--text-primary);
  font-weight: 500;
}

.my-uploads-modal-card {
  max-width: 620px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.my-uploads-body {
  overflow-y: auto;
  max-height: 60vh;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.my-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  gap: 12px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.my-upload-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.my-upload-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.my-upload-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
}

.my-upload-details {
  min-width: 0;
  flex: 1;
}

.my-upload-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.my-upload-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.my-upload-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.my-upload-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-upload-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.btn-upload-action:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-upload-action.danger:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.btn-upload-action.confirming {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.15);
  font-weight: 600;
  font-size: 0.72rem;
  padding: 5px 8px;
}

.btn-upload-action.copied {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.12);
}

.my-uploads-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-secondary);
}

.my-uploads-empty svg {
  margin-bottom: 12px;
  opacity: 0.35;
}

.my-uploads-empty p {
  font-size: 0.82rem;
  margin-top: 4px;
  color: var(--text-muted);
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0 5px;
  min-width: 16px;
  height: 16px;
  line-height: 1;
}


