/* ══════════════════════════════════════════════════════════════════════
   Private Drive — Cyndi Wang / icyndi.wang Inspired Theme
   Y2K 糖果色 (Sakura / Lilac / Ice / Honey) × 珠光银 (Pearl & Plum Ink)
   ══════════════════════════════════════════════════════════════════════ */

:root {
  /* 主题主色：糖果樱粉 × 丁香紫 */
  --blue: #e05396;
  --dark-blue: #c63d7f;
  --red: #e5536d;
  --dark-red: #c43652;
  --moon-grey: #f4eef3;

  /* 图标与文件类型糖果色板 */
  --icon-red: #e85b77;
  --icon-orange: #f48b63;
  --icon-yellow: #f0b254;
  --icon-green: #38b88c;
  --icon-blue: #de5c9d;
  --icon-violet: #9a7bf0;

  --input-red: #fde0e6;
  --input-green: #d6f5e8;
  --item-selected: #fffDFE;
  --action: #4a3d55;

  /* 珠光浅底与深梅墨文字 */
  --background: #f4eef3;
  --surfacePrimary: #fffdfe;
  --surfaceSecondary: #eee5f0;
  --divider: rgba(23, 16, 28, 0.07);
  --iconPrimary: #e05396;
  --iconSecondary: #fffdfe;
  --iconTertiary: #b8adc2;
  --textPrimary: #5b4968;
  --textSecondary: #17101c;
  --hover: rgba(255, 143, 192, 0.12);
  --borderPrimary: rgba(180, 156, 255, 0.24);
  --borderSecondary: rgba(224, 83, 150, 0.48);
  --dividerPrimary: rgba(244, 238, 243, 0.55);
  --dividerSecondary: rgba(255, 253, 254, 0.88);

  /* Cyndi 自定义扩展变量 */
  --cyndi-sakura: #ff8fc0;
  --cyndi-sakura-lt: #ffc9e0;
  --cyndi-lilac: #b49cff;
  --cyndi-ice: #9fe3f5;
  --cyndi-honey: #ffd79a;
  --cyndi-glass: rgba(255, 253, 254, 0.78);
  --cyndi-glass-strong: rgba(255, 253, 254, 0.90);
  --cyndi-shadow: 0 12px 34px -14px rgba(74, 38, 92, 0.18);
  --cyndi-glow: 0 10px 28px -10px rgba(224, 83, 150, 0.34);
}

:root.dark {
  --blue: #ff7ab8;
  --dark-blue: #ff5ca6;
  --red: #ff6685;
  --dark-red: #e04566;
  --input-red: #5e2234;
  --input-green: #164f3b;
  --action: #f4eef3;

  /* icyndi.wang Hero 夜幕紫底 */
  --background: #140b1b;
  --surfacePrimary: #1e1229;
  --surfaceSecondary: #2a1638;
  --textPrimary: rgba(244, 238, 243, 0.76);
  --textSecondary: #fffdfe;
  --divider: rgba(255, 201, 224, 0.10);
  --iconPrimary: #ff8fc0;
  --iconSecondary: #fffdfe;
  --iconTertiary: #8d7aa0;
  --hover: rgba(255, 143, 192, 0.14);
  --borderPrimary: rgba(180, 156, 255, 0.20);
  --borderSecondary: rgba(255, 143, 192, 0.50);
  --dividerPrimary: rgba(20, 11, 27, 0.55);
  --dividerSecondary: rgba(30, 18, 41, 0.85);

  --cyndi-glass: rgba(26, 15, 36, 0.78);
  --cyndi-glass-strong: rgba(30, 18, 41, 0.90);
  --cyndi-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.55);
  --cyndi-glow: 0 10px 30px -10px rgba(255, 122, 184, 0.42);
}

/* ── 全局背景与字体排版 ────────────────────────────────────────────── */
body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  background-image:
    radial-gradient(48vw 48vw at 6% -6%, rgba(255, 143, 192, 0.24), transparent 70%),
    radial-gradient(42vw 42vw at 96% 8%, rgba(180, 156, 255, 0.22), transparent 70%),
    radial-gradient(38vw 38vw at 55% 96%, rgba(159, 227, 245, 0.20), transparent 72%);
  background-attachment: fixed;
  color: var(--textSecondary);
  -webkit-font-smoothing: antialiased;
}

:root.dark body {
  background-image:
    radial-gradient(46vw 46vw at 8% -8%, rgba(255, 143, 192, 0.18), transparent 70%),
    radial-gradient(44vw 44vw at 94% 12%, rgba(180, 156, 255, 0.18), transparent 70%),
    radial-gradient(36vw 36vw at 52% 96%, rgba(159, 227, 245, 0.10), transparent 72%);
}

/* 细滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(180, 156, 255, 0.36);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(224, 83, 150, 0.56);
}

/* ── 顶部加载进度条 ────────────────────────────────────────────────── */
.progress div,
.upload-files .file .file-progress div {
  background: linear-gradient(90deg, var(--cyndi-sakura), var(--cyndi-lilac), var(--cyndi-ice)) !important;
}

/* ── 登录页：珠光极光 + Cyndi Hero 氛围背景 + Sugar Monster 点缀 ───── */
#login {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 143, 192, 0.38), transparent 48%),
    radial-gradient(circle at 82% 24%, rgba(180, 156, 255, 0.36), transparent 50%),
    radial-gradient(circle at 50% 88%, rgba(159, 227, 245, 0.32), transparent 52%),
    var(--background) !important;
  overflow: hidden;
}

#login::before {
  content: "";
  position: fixed;
  inset: -4%;
  background: url("/static/img/cyndi-hero.webp") center 22% / cover no-repeat;
  opacity: 0.22;
  filter: blur(8px) saturate(1.12);
  pointer-events: none;
  z-index: 0;
}

:root.dark #login::before {
  opacity: 0.26;
  filter: blur(10px) saturate(1.18) brightness(0.78);
}

#login form {
  z-index: 2;
  width: min(92%, 23.5em) !important;
  max-width: 23.5em !important;
  padding: 2.35em 2em 2em !important;
  background: var(--cyndi-glass-strong) !important;
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow:
    0 28px 64px -22px rgba(42, 22, 56, 0.34),
    0 0 0 1px rgba(255, 143, 192, 0.22);
}

:root.dark #login form {
  border-color: rgba(255, 201, 224, 0.18);
  box-shadow:
    0 28px 70px -20px rgba(0, 0, 0, 0.72),
    0 0 36px -12px rgba(255, 143, 192, 0.24);
}

/* Sugar Monster 王冠小怪兽右上角徽章装饰 */
#login form::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -18px;
  width: 68px;
  height: 82px;
  background: url("/static/img/monster-crown.webp") center / contain no-repeat;
  filter: drop-shadow(0 8px 14px rgba(42, 22, 56, 0.22));
  transform: rotate(9deg);
  pointer-events: none;
}

#login img {
  width: 4.5em !important;
  height: 4.5em !important;
  border-radius: 22px;
  box-shadow: var(--cyndi-glow);
}

#login h1 {
  margin: 0.5em 0 0.75em !important;
  font-size: 1.9em !important;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(125deg, #17101c 8%, #d63e87 56%, #7d5be6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:root.dark #login h1 {
  background: linear-gradient(125deg, #fffdfe 10%, #ff9eca 55%, #b49cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#login .input--block {
  border-radius: 12px !important;
  padding: 0.75em 1em !important;
  margin-bottom: 0.8em !important;
}

#login .button--block {
  margin-top: 0.45em;
  padding: 0.78em 1em !important;
  border-radius: 12px !important;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ── 顶部导航栏 (Frosted Pearl Header) ─────────────────────────────── */
header {
  background: var(--cyndi-glass) !important;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--borderPrimary) !important;
  box-shadow: 0 4px 20px -12px rgba(42, 22, 56, 0.16) !important;
}

header img {
  border-radius: 10px;
  box-shadow: 0 4px 12px -4px rgba(224, 83, 150, 0.35);
}

header title,
header h1,
header .title {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--textSecondary);
}

header .action:hover {
  background: var(--hover);
  color: var(--blue);
}

/* 搜索栏胶囊化 */
#search #input {
  background: var(--surfaceSecondary) !important;
  border: 1px solid var(--borderPrimary) !important;
  border-radius: 999px !important;
  padding: 0 1em !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#search #input:focus-within {
  background: var(--surfacePrimary) !important;
  border-color: var(--borderSecondary) !important;
  box-shadow: 0 0 0 3px rgba(255, 143, 192, 0.22);
}

#search.active #input {
  border-radius: 0 !important;
}

#search .boxes > div > div {
  background: linear-gradient(135deg, var(--blue), #9a7bf0) !important;
  border-radius: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#search .boxes > div > div:hover {
  transform: translateY(-2px);
  box-shadow: var(--cyndi-glow);
}

/* ── 侧边栏 (Nav) ──────────────────────────────────────────────────── */
nav {
  padding-top: 0.75em;
  padding-bottom: 5.5em !important;
  background: transparent;
}

nav > div {
  border-top: 1px solid var(--divider) !important;
  padding: 0.4em 0;
}

nav > div:first-child {
  border-top: none !important;
}

nav .action {
  width: calc(100% - 16px) !important;
  margin: 3px 8px !important;
  padding: 0.58em 0.85em !important;
  border-radius: 12px !important;
  font-size: 0.98em !important;
  font-weight: 500;
  color: var(--textSecondary);
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

nav .action:hover {
  background: var(--hover) !important;
  color: var(--blue);
  transform: translateX(2px);
}

nav .action i {
  color: var(--iconPrimary);
  margin-right: 0.45em;
}

/* 侧边栏左下角 Sugar Monster 小心心点缀 */
nav::after {
  content: "";
  position: fixed;
  left: 16px;
  bottom: 14px;
  width: 48px;
  height: 54px;
  background: url("/static/img/monster-heart.webp") center / contain no-repeat;
  opacity: 0.72;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(42, 22, 56, 0.16));
}

@media (max-width: 1024px) {
  nav {
    background: var(--cyndi-glass-strong) !important;
    backdrop-filter: blur(20px);
  }
  nav::after {
    position: static;
    display: block;
    margin: 1em auto 0;
  }
}

/* ── 面包屑导航 ────────────────────────────────────────────────────── */
.breadcrumbs {
  background: var(--cyndi-glass) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--divider) !important;
  border-radius: 0 0 14px 14px;
  padding: 0 0.75em;
}

.breadcrumbs a {
  border-radius: 8px !important;
  padding: 0.25em 0.5em !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.breadcrumbs a:hover {
  background: var(--hover) !important;
  color: var(--blue);
}

/* ── 文件列表与画廊/宫格卡片 ───────────────────────────────────────── */
#listing h2 {
  font-weight: 700;
  color: var(--textPrimary);
  letter-spacing: 0.02em;
  margin-top: 0.6em;
}

#listing.mosaic .item {
  background: var(--cyndi-glass) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--borderPrimary) !important;
  border-radius: 16px !important;
  box-shadow: var(--cyndi-shadow) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease !important;
}

#listing.mosaic .item:hover {
  transform: translateY(-2px);
  border-color: var(--borderSecondary) !important;
  box-shadow: 0 14px 32px -14px rgba(224, 83, 150, 0.32) !important;
}

#listing.mosaic.gallery .item {
  border-radius: 18px !important;
  overflow: hidden;
  padding: 0.45em !important;
}

#listing.mosaic.gallery .item img {
  border-radius: 13px;
}

#listing.mosaic.gallery .item[data-type="image"] div:last-of-type {
  border-radius: 0 0 13px 13px;
  background: linear-gradient(transparent, rgba(20, 11, 27, 0.72)) !important;
}

#listing.list .item:not(.header) {
  background: var(--cyndi-glass) !important;
  border: 1px solid var(--divider) !important;
  border-radius: 12px !important;
  margin-bottom: 5px !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

#listing.list .item:not(.header):hover {
  background: var(--surfacePrimary) !important;
  border-color: var(--borderSecondary) !important;
}

#listing.list .item.header {
  background: transparent !important;
  border-bottom: 1px solid var(--borderPrimary) !important;
  margin-bottom: 8px;
}

#listing .item[aria-selected="true"] {
  background: linear-gradient(135deg, var(--blue), #9a7bf0) !important;
  border-color: transparent !important;
  color: #fffdfe !important;
  box-shadow: var(--cyndi-glow) !important;
}

#listing .item[aria-selected="true"] i,
#listing .item[aria-selected="true"] p {
  color: #fffdfe !important;
}

/* 文件类型图标柔和糖果色 */
#listing .item[data-dir="true"] i {
  color: #e866a3;
}
#listing .item[data-type="image"] i {
  color: #9a7bf0;
}
#listing .item[data-type="video"] i {
  color: #f48b63;
}
#listing .item[data-type="audio"] i {
  color: #4cc2db;
}

/* ── 按钮、输入框、弹窗卡片、分享框 ────────────────────────────────── */
.button {
  background: linear-gradient(135deg, var(--blue), #a47cf3) !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 18px -6px rgba(224, 83, 150, 0.45) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
}

.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: var(--cyndi-glow) !important;
}

.button--red {
  background: linear-gradient(135deg, #e85571, #d13858) !important;
  box-shadow: 0 6px 16px -6px rgba(229, 83, 109, 0.45) !important;
}

.button--flat {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--blue) !important;
  border-radius: 10px !important;
}

.button--flat:hover {
  background: var(--hover) !important;
  transform: none;
}

.input {
  background: var(--surfacePrimary) !important;
  border: 1px solid var(--borderPrimary) !important;
  border-radius: 10px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:hover,
.input:focus {
  border-color: var(--borderSecondary) !important;
  box-shadow: 0 0 0 3px rgba(255, 143, 192, 0.20);
  outline: none;
}

.card,
.share__box {
  background: var(--cyndi-glass-strong) !important;
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid var(--borderPrimary);
  border-radius: 18px !important;
  box-shadow: var(--cyndi-shadow) !important;
}

.card .card-action.full .action {
  border-radius: 14px !important;
  border-color: var(--borderPrimary) !important;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.card .card-action.full .action:hover {
  background: var(--hover);
  border-color: var(--borderSecondary) !important;
  transform: translateY(-1px);
}

/* Toast 提示 */
.Vue-Toastification__toast--info,
.Vue-Toastification__toast--default {
  background: linear-gradient(135deg, #e05396, #9a7bf0) !important;
  border-radius: 14px !important;
}
.Vue-Toastification__toast--success {
  background: linear-gradient(135deg, #38b88c, #4fc3b0) !important;
  border-radius: 14px !important;
}
.Vue-Toastification__toast--error {
  background: linear-gradient(135deg, #e85571, #c63d7f) !important;
  border-radius: 14px !important;
}
