html {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: #1d1d1f;
  font-size: 17px;
  letter-spacing: 0.3px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-width: 320px;
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f7;
}

.hidden {
  display: none !important;
}

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 20px 32px;
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.breadcrumb {
  font-size: 20px;
  font-weight: 600;
  padding-right: 16px;
  word-break: break-all;
  letter-spacing: 0.2px;
}

.breadcrumb>a {
  color: #007aff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.breadcrumb>a:hover {
  opacity: 0.7;
}

/* final breadcrumb */
.breadcrumb>b {
  color: #1d1d1f;
}

.breadcrumb>.separator {
  color: #86868b;
  padding: 0 8px;
  font-weight: 400;
}

.breadcrumb svg {
  height: 100%;
  fill: #86868b;
}

.toolbox {
  display: flex;
  gap: 12px;
  margin-right: 16px;
}

.toolbox>a,
.toolbox>div {
  height: 24px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbox .control {
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  color: #1d1d1f;
}

.toolbox .control:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.toolbox .control:active {
  background-color: rgba(0, 0, 0, 0.1);
}

.upload-file input {
  display: none;
}

.upload-file label {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.upload-file label:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.searchbar {
  display: flex;
  flex-wrap: nowrap;
  width: 280px;
  height: 36px;
  background-color: rgba(142, 142, 147, 0.12);
  transition: all 0.2s ease;
  border: none;
  border-radius: 10px;
  margin-bottom: 0;
}

.searchbar:focus-within {
  background-color: rgba(142, 142, 147, 0.18);
}

.searchbar #search {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  font-size: 17px;
  line-height: 20px;
  padding: 8px 12px;
  background-color: transparent;
  border: none;
  outline: none;
  color: #1d1d1f;
}

.searchbar #search::placeholder {
  color: #86868b;
}

.searchbar .icon {
  color: #86868b;
  padding: 10px 8px 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.main {
  padding: 24px 32px;
  flex: 1;
  overflow: auto;
  min-height: 0;
  width: 100%;
}

.empty-folder {
  font-style: italic;
  color: #86868b;
  font-size: 18px;
  padding: 40px 0;
}

.uploaders-table th,
.paths-table th {
  text-align: left;
  font-weight: 600;
  color: #86868b;
  white-space: nowrap;
  font-size: 15px;
  padding: 12px 16px;
  letter-spacing: -0.01em;
}

.uploaders-table td,
.paths-table td {
  white-space: nowrap;
  padding: 14px 16px;
  font-size: 17px;
  letter-spacing: 0.2px;
}

.uploaders-table,
.paths-table {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.uploaders-table .cell-status {
  width: 100px;
  padding-left: 16px;
}

.cell-status span {
  display: inline-block;
}

.paths-table thead a {
  color: unset;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.paths-table thead a:hover {
  color: #1d1d1f;
}

.paths-table thead a>span {
  padding-left: 4px;
}

.paths-table tbody tr {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color 0.15s ease;
}

.paths-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.paths-table .cell-actions {
  width: 100px;
  display: flex;
  gap: 8px;
  padding-left: 16px;
}

.paths-table .cell-mtime {
  width: 140px;
  padding-left: 16px;
  font-variant-numeric: tabular-nums;
  color: #86868b;
  font-size: 15px;
}

.paths-table .cell-size {
  text-align: right;
  width: 90px;
  padding-left: 16px;
  font-variant-numeric: tabular-nums;
  color: #86868b;
  font-size: 15px;
}

.paths-table th.cell-size {
  text-align: right;
}

.path svg {
  height: 20px;
  width: 20px;
  fill: #007aff;
  padding-right: 12px;
  vertical-align: text-top;
}

.path {
  list-style: none;
}

.path a {
  color: #1d1d1f;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  text-decoration: none;
  max-width: calc(100vw - 400px);
  min-width: 200px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.2s ease;
}

.path a:hover {
  color: #007aff;
}

.action-btn {
  padding: 6px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.uploaders-table {
  padding: 0;
  margin-bottom: 20px;
}

.uploader {
  padding-right: 16px;
}

.editor {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  outline: none;
  padding: 16px;
  font-size: 15px;
  font-family: "SF Mono", Monaco, Menlo, Consolas, monospace;
  line-height: 1.6;
  background-color: white;
  resize: none;
}

.editor-page {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.toolbox-right {
  margin-left: auto;
  display: flex;
  gap: 16px;
  align-items: center;
}

.login-btn,
.logout-btn,
.save-btn {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
}

.login-btn:hover,
.logout-btn:hover,
.save-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.save-btn {
  -webkit-user-select: none;
  user-select: none;
}

.user-name {
  padding-left: 6px;
  color: #1d1d1f;
  font-weight: 500;
}

.not-editable {
  font-style: italic;
  color: #86868b;
  padding: 20px;
  font-size: 17px;
}

.retry-btn {
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.retry-btn:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .path a {
    min-width: 400px;
  }
}

/* dark theme */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #000000;
  }

  html {
    color: #f5f5f7;
  }

  .head {
    background-color: rgba(29, 29, 31, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .breadcrumb>b {
    color: #f5f5f7;
  }

  .breadcrumb>a {
    color: #0a84ff;
  }

  .breadcrumb>.separator {
    color: #98989d;
  }

  .breadcrumb svg {
    fill: #98989d;
  }

  .toolbox .control {
    color: #f5f5f7;
  }

  .toolbox .control:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .toolbox .control:active {
    background-color: rgba(255, 255, 255, 0.15);
  }

  .upload-file label:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .searchbar {
    background-color: rgba(118, 118, 128, 0.24);
  }

  .searchbar:focus-within {
    background-color: rgba(118, 118, 128, 0.32);
  }

  .searchbar #search {
    color: #f5f5f7;
  }

  .searchbar #search::placeholder {
    color: #98989d;
  }

  .searchbar .icon {
    color: #98989d;
  }

  .empty-folder {
    color: #98989d;
  }

  .uploaders-table,
  .paths-table {
    background-color: #1c1c1e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  .uploaders-table th,
  .paths-table th {
    color: #98989d;
  }

  .uploaders-table td,
  .paths-table td {
    color: #f5f5f7;
  }

  .paths-table tbody tr {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .paths-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }

  .paths-table .cell-mtime,
  .paths-table .cell-size {
    color: #98989d;
  }

  .path svg {
    fill: #0a84ff;
  }

  .path a {
    color: #f5f5f7;
  }

  .path a:hover {
    color: #0a84ff;
  }

  .action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .editor {
    background-color: #1c1c1e;
    color: #f5f5f7;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .login-btn:hover,
  .logout-btn:hover,
  .save-btn:hover,
  .retry-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .user-name {
    color: #f5f5f7;
  }

  .not-editable {
    color: #98989d;
  }
}