/* ============================================================
   光影相册 · 共享样式
   ============================================================ */

:root {
  --bg: #07080f;
  --bg-soft: #0d1020;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #eef1ff;
  --text-dim: #a3a9c4;
  --text-faint: #6f768f;
  --accent: #7c6cff;
  --accent-2: #22d3ee;
  --accent-3: #ff6b9d;
  --danger: #ff5d6c;
  --ok: #34d399;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --ring: 0 0 0 3px rgba(124, 108, 255, 0.28);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(124, 108, 255, 0.4);
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
  background-clip: padding-box;
}

/* ---------------------------------------------------- 极光背景 */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 12% -8%, rgba(124, 108, 255, 0.24), transparent 62%),
    radial-gradient(1000px 640px at 88% 4%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(900px 700px at 60% 108%, rgba(255, 107, 157, 0.14), transparent 62%),
    var(--bg);
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.aurora__blob--a {
  width: 46vw;
  height: 46vw;
  left: -12vw;
  top: -14vw;
  background: radial-gradient(circle, #7c6cff, transparent 68%);
  animation: drift-a 26s var(--ease) infinite;
}

.aurora__blob--b {
  width: 40vw;
  height: 40vw;
  right: -10vw;
  top: 8vh;
  background: radial-gradient(circle, #22d3ee, transparent 68%);
  animation: drift-b 32s var(--ease) infinite;
}

.aurora__blob--c {
  width: 38vw;
  height: 38vw;
  left: 32vw;
  bottom: -18vw;
  background: radial-gradient(circle, #ff6b9d, transparent 68%);
  animation: drift-c 29s var(--ease) infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(9vw, 7vh, 0) scale(1.14); }
  66% { transform: translate3d(-4vw, 12vh, 0) scale(0.94); }
}

@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  40% { transform: translate3d(-11vw, 9vh, 0) scale(1.2); }
  70% { transform: translate3d(-3vw, -6vh, 0) scale(0.92); }
}

@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  35% { transform: translate3d(8vw, -9vh, 0) scale(1.16); }
  70% { transform: translate3d(-9vw, -3vh, 0) scale(0.9); }
}

/* 细颗粒噪点，增强质感 */
.aurora::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .aurora__blob {
    animation: none !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------- 通用组件 */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s,
    box-shadow 0.25s, opacity 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.13);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  border: none;
  background: linear-gradient(120deg, #7c6cff, #22d3ee);
  color: #06070d;
  font-weight: 680;
  box-shadow: 0 12px 30px -12px rgba(124, 108, 255, 0.85);
}

.btn--primary:hover {
  background: linear-gradient(120deg, #8b7dff, #38dcf2);
  box-shadow: 0 18px 40px -14px rgba(124, 108, 255, 1);
}

.btn--danger {
  color: #ffc9cf;
  border-color: rgba(255, 93, 108, 0.35);
  background: rgba(255, 93, 108, 0.12);
}

.btn--danger:hover {
  background: rgba(255, 93, 108, 0.22);
  border-color: rgba(255, 93, 108, 0.6);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}

.btn--ghost:hover {
  background: var(--surface);
  color: var(--text);
}

.btn--sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn--block {
  width: 100%;
}

/* 波纹 */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: currentColor;
  opacity: 0.28;
  pointer-events: none;
  animation: ripple 0.62s ease-out forwards;
}

@keyframes ripple {
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.input,
.select,
textarea.input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
}

.input::placeholder,
textarea.input::placeholder {
  color: var(--text-faint);
}

.input:focus,
.select:focus,
textarea.input:focus {
  border-color: rgba(124, 108, 255, 0.75);
  background: rgba(124, 108, 255, 0.07);
  box-shadow: var(--ring);
}

textarea.input {
  resize: vertical;
  min-height: 88px;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23a3a9c4' stroke-width='1.8'%3E%3Cpath d='M3 5.5 7 9.5l4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.select option {
  background: #12142a;
  color: var(--text);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  color: var(--text-dim);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.03em;
}

.badge--admin {
  background: linear-gradient(120deg, rgba(124, 108, 255, 0.3), rgba(34, 211, 238, 0.3));
  color: #d8d3ff;
  border: 1px solid rgba(124, 108, 255, 0.4);
}

.badge--user {
  background: var(--surface-strong);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* 顶部导航 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(7, 8, 15, 0.62);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #7c6cff, #22d3ee);
  color: #06070d;
  box-shadow: 0 8px 22px -10px rgba(124, 108, 255, 0.9);
  animation: mark-glow 4.5s ease-in-out infinite;
}

@keyframes mark-glow {
  0%, 100% { box-shadow: 0 8px 22px -10px rgba(124, 108, 255, 0.9); }
  50% { box-shadow: 0 8px 34px -8px rgba(34, 211, 238, 1); }
}

.brand__mark svg {
  width: 19px;
  height: 19px;
}

.topbar__spacer {
  flex: 1;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.9), rgba(255, 107, 157, 0.85));
  color: #fff;
  font-size: 13px;
  font-weight: 680;
  text-transform: uppercase;
}

/* 提示条 */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(18, 20, 42, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in 0.42s var(--ease) both;
}

.toast--out {
  animation: toast-out 0.3s ease-in forwards;
}

.toast__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  flex: none;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16);
}

.toast--error .toast__dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 93, 108, 0.16);
}

.toast--ok .toast__dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(28px) scale(0.94); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(28px) scale(0.94); }
}

/* 模态框 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 5, 12, 0.7);
  backdrop-filter: blur(8px);
  animation: fade-in 0.24s ease both;
}

.modal[hidden] {
  display: none;
}

.modal__box {
  width: min(520px, 100%);
  padding: 26px;
  animation: modal-in 0.42s var(--ease) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(22px) scale(0.96); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 70%);
  background-size: 240% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  to { background-position: -240% 0; }
}

/* 入场动画 */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--text-faint);
}

.empty svg {
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  opacity: 0.5;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
