:root {
  --bg-1: #f3f7ff;
  --bg-2: #fff7ef;
  --panel: rgba(255, 255, 255, 0.86);
  --line: rgba(23, 28, 45, 0.08);
  --text: #1e2a3a;
  --muted: #6f7a88;
  --brand: #2e7dff;
}

[v-cloak] {
  display: none !important;
}

#app-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 22px 12px;
  background: radial-gradient(circle at 15% 20%, #fff7ef, transparent 48%),
    radial-gradient(circle at 85% 5%, #e8fff7, transparent 35%),
    linear-gradient(160deg, #f3f7ff, #f7fbff);
  transition: opacity 0.2s ease;
}

#app-boot.done {
  opacity: 0;
  pointer-events: none;
}

.boot-shell {
  width: 100%;
  max-width: 1200px;
}

.boot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 10px;
}

.boot-brand {
  width: 220px;
}

.boot-actions {
  display: flex;
  gap: 10px;
}

.boot-line,
.boot-pill,
.boot-tab,
.boot-block,
.boot-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #eaf0f9;
}

.boot-line::after,
.boot-pill::after,
.boot-tab::after,
.boot-block::after,
.boot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: bootShimmer 1.4s infinite;
}

.boot-line-title {
  width: 160px;
  height: 24px;
  margin-bottom: 8px;
}

.boot-line-sub {
  width: 110px;
  height: 14px;
}

.boot-pill {
  width: 74px;
  height: 30px;
  border-radius: 20px;
}

.boot-panel {
  border: 1px solid rgba(23, 28, 45, 0.08);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
}

.boot-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.boot-tab {
  width: 110px;
  height: 34px;
  border-radius: 8px;
}

.boot-tab.active {
  background: #dfe8f7;
}

.boot-block {
  width: 100%;
  height: 120px;
  margin-bottom: 12px;
}

.boot-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.boot-card {
  height: 92px;
}

@keyframes bootShimmer {
  100% {
    transform: translateX(100%);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 15% 20%, var(--bg-2), transparent 48%),
    radial-gradient(circle at 85% 5%, #e8fff7, transparent 35%),
    linear-gradient(160deg, var(--bg-1), #f7fbff);
}

#app {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  filter: blur(24px);
  opacity: 0.5;
  pointer-events: none;
}

.bg-shape-1 {
  width: 320px;
  height: 320px;
  border-radius: 56% 44% 34% 66% / 44% 36% 64% 56%;
  background: #b9d6ff;
  top: -80px;
  left: -120px;
  animation: floatA 10s ease-in-out infinite;
}

.bg-shape-2 {
  width: 420px;
  height: 420px;
  border-radius: 67% 33% 58% 42% / 48% 41% 59% 52%;
  background: #ffe0bd;
  right: -140px;
  top: 160px;
  animation: floatB 12s ease-in-out infinite;
}

@keyframes floatA {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(16px);
  }
}

@keyframes floatB {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-18px);
  }
}

.shell {
  min-height: 100vh;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  height: auto !important;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.5px;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main {
  padding: 0 12px 20px !important;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  margin-bottom: 16px;
}

.panel-title {
  margin: 0 0 12px;
}

.hint {
  color: var(--muted);
  margin-top: 10px;
  font-size: 13px;
}

.divider {
  height: 1px;
  margin: 14px 0;
  background: var(--line);
}

.client-compress-panel {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.client-compress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-compress-title {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.client-compress-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.client-compress-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.client-compress-field>span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.preview-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.preview-item {
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.preview-item img {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  object-fit: cover;
}

.preview-image-button {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.preview-image-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.preview-fallback {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  color: var(--muted);
  background: #eef3fb;
}

.preview-meta {
  flex: 1;
  min-width: 0;
}

.preview-meta .name {
  font-size: 13px;
  margin: 2px 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-size-info {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.preview-error {
  margin: 0 0 8px;
  font-size: 12px;
  color: #c04d43;
}

.compress-actions-row {
  margin-top: 6px;
}

.compress-preview-list {
  grid-template-columns: 1fr;
}

.compress-preview-item {
  min-height: 220px;
  align-items: stretch;
}

.compress-preview-item .preview-image-button,
.compress-preview-item .preview-fallback {
  width: 280px;
  height: 198px;
}

.compress-preview-item img {
  width: 280px;
  height: 198px;
  border-radius: 0;
}

.compress-preview-item .preview-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.card-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

.upload-result-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.upload-result-card {
  border: 1px solid var(--line);
}

.upload-result-row {
  display: flex;
  gap: 12px;
}

.thumb-shell {
  position: relative;
  overflow: hidden;
  background: #eef3fb;
}

.thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.24s ease;
}

.thumb-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #e8eef8 20%, #f5f8fe 40%, #e8eef8 60%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s linear infinite;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.upload-result-thumb {
  width: 88px;
  height: 88px;
  border-radius: 10px;
}

.upload-result-preview-button {
  width: 88px;
  height: 88px;
}

.upload-result-main {
  min-width: 0;
  flex: 1;
}

.upload-result-title {
  margin-bottom: 4px;
  font-size: 13px;
  color: #2f7a3f;
}

.upload-result-filename {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-result-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-result-link {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.upload-result-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.month-collapse {
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .client-compress-header {
    flex-direction: column;
    align-items: stretch;
  }

  .client-compress-grid {
    grid-template-columns: 1fr;
  }
}

.image-pagination-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.month-group-title {
  font-weight: 600;
  color: var(--text);
}

.image-row-list {
  display: grid;
  gap: 10px;
}

.image-row-card {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.image-row {
  display: flex;
  gap: 12px;
}

.image-row-thumb {
  width: 120px;
  height: 120px;
  border-radius: 10px;
}

.image-row-thumb-button {
  width: 120px;
  height: 120px;
}

.image-row-content {
  flex: 1;
  min-width: 0;
}

.image-row-content h4 {
  margin: 2px 0 8px;
  font-size: 15px;
}

.image-row-content p {
  margin: 6px 0;
  color: #364860;
  word-break: break-all;
  font-size: 13px;
}

.image-link-row {
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-link-label {
  color: #364860;
  font-size: 13px;
}

.image-link-row a {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.tag-edit-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.tag-select {
  flex: 1;
  min-width: 0;
}

.tag-edit-row .el-button {
  flex: 0 0 auto;
}

.image-preview-dialog.el-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 28px;
  background: rgba(12, 18, 28, 0.94);
}

.image-preview-dialog .el-dialog__header {
  display: none;
}

.image-preview-dialog .el-dialog__body {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  overflow: auto;
  padding: 0;
}

.image-preview-full {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-preview-close {
  position: fixed;
  z-index: 1;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  font-size: 32px;
  line-height: 38px;
}

.image-preview-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

@media (max-width: 900px) {
  .boot-header {
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .boot-brand {
    width: 100%;
  }

  .boot-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    max-width: 100%;
  }

  .header {
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .main {
    padding: 0 10px 12px !important;
  }

  .upload-result-row,
  .image-row {
    flex-direction: column;
  }

  .upload-result-thumb,
  .image-row-thumb {
    width: 100%;
    height: 180px;
  }

  .image-row-thumb-button {
    width: 100%;
    height: 180px;
  }

  .upload-result-preview-button {
    width: 100%;
    height: 180px;
  }

  .compress-preview-item {
    min-height: 0;
    flex-direction: column;
  }

  .compress-preview-item .preview-image-button,
  .compress-preview-item .preview-fallback,
  .compress-preview-item img {
    width: 100%;
    height: 220px;
  }

  .image-preview-dialog.el-dialog {
    padding: 18px;
  }

  .image-link-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-pagination-wrap {
    justify-content: center;
  }
}