/* ========== 基础 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --text: #f2f4f8;
  --text-muted: rgba(242, 244, 248, 0.55);
  --line: rgba(255, 255, 255, 0.22);
  --line-hover: rgba(255, 255, 255, 0.55);
  --deco: rgba(255, 255, 255, 0.28);
  --glass: rgba(255, 255, 255, 0.07);
  --radius: 16px;
  --transition: 0.25s ease;
}

html, body {
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #0a0e1a;
  overflow-x: hidden;
}

/* ========== 液态背景 ========== */
.liquid-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 15%, #1a1a3e 0%, transparent 50%),
              radial-gradient(ellipse at 85% 85%, #0f2040 0%, transparent 50%),
              #0a0e1a;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: #5b6cff;
  top: -12%;
  left: -8%;
}

.blob-2 {
  width: 360px;
  height: 360px;
  background: #c084fc;
  bottom: -18%;
  right: -10%;
  animation-delay: -6s;
}

.blob-3 {
  width: 280px;
  height: 280px;
  background: #38bdf8;
  top: 42%;
  left: 48%;
  animation-delay: -12s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(28px, -36px) scale(1.06); }
  66% { transform: translate(-22px, 18px) scale(0.96); }
}

.custom-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.custom-bg.show {
  opacity: 1;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* 特效画布 */
.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ========== 主内容 ========== */
.page {
  position: relative;
  z-index: 2;
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 6.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* ========== 装饰线条 ========== */
.deco-top,
.deco-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  margin-bottom: 1.75rem;
}

.deco-bottom {
  margin-top: 2rem;
  margin-bottom: 0;
}

.deco-line {
  display: block;
  height: 1px;
  width: 64px;
  background: linear-gradient(90deg, transparent, var(--deco), transparent);
}

.deco-line.short {
  width: 36px;
}

.deco-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--deco);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

.deco-underline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.deco-diamond {
  width: 7px;
  height: 7px;
  border: 1px solid var(--deco);
  transform: rotate(45deg);
  opacity: 0.85;
}

.name-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.deco-side-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deco-side-lines span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--deco);
}

.deco-side-lines span:nth-child(2) {
  width: 12px;
  opacity: 0.55;
}

/* 头像：仅一个 */
.profile {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar-frame {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 1.15rem;
}

.avatar-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--deco);
  opacity: 0.7;
  pointer-events: none;
}

.avatar-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--line);
  display: block;
  background: rgba(255, 255, 255, 0.06);
}

.name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.bio {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

/* ========== 线条框入口 ========== */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.link-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.link-box:hover {
  border-color: var(--line-hover);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.link-title {
  font-size: 1rem;
  font-weight: 500;
}

.link-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== 特效切换条 ========== */
.fx-bar {
  position: fixed;
  left: 1rem;
  bottom: 1.25rem;
  z-index: 50;
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 35, 0.75);
  backdrop-filter: blur(12px);
}

.fx-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-family: inherit;
}

.fx-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.fx-btn.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
}

/* 设置按钮 */
.fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(15, 20, 35, 0.75);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 50;
  transition: border-color var(--transition), transform var(--transition);
}

.fab:hover {
  border-color: var(--line-hover);
  transform: scale(1.05);
}

/* ========== 弹窗 ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem 1.35rem 1.25rem;
  border-radius: var(--radius);
  z-index: 1;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.modal-panel h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.modal-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="password"],
.field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.field select {
  cursor: pointer;
}

.field select option {
  background: #1a1f2e;
  color: var(--text);
}

.field input:focus,
.field select:focus {
  border-color: var(--line-hover);
}

.field input[type="file"] {
  width: 100%;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.5rem;
  transition: opacity var(--transition), transform var(--transition);
}

.btn.primary {
  background: linear-gradient(135deg, #6b8cff, #a78bfa);
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.btn.ghost:hover {
  border-color: var(--line-hover);
  color: var(--text);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-top: 0.35rem;
  font-family: inherit;
}

.btn-text:hover {
  color: #f87171;
}

.settings-form {
  margin-bottom: 0.25rem;
}

.upload-area {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: border-color var(--transition), background var(--transition);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--line-hover);
  background: rgba(255, 255, 255, 0.04);
}

.upload-content p {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.progress-wrap {
  margin: 0.75rem 0;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6b8cff, #a78bfa);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.result {
  text-align: center;
  margin: 0.75rem 0;
}

.result .ok {
  color: #86efac;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

@media (min-width: 520px) {
  .modal {
    align-items: center;
  }
}
