:root {
  --left: #aad3ef;
  --middle: #f0f0f8;
  --right: #f2d4de;
  --accent: #8ab8e8;
  --text-main: #2c3038;
  --text-sub: #8a90a0;
  --card-bg: rgba(255, 255, 255, 0.55);
  --card-border: rgba(255, 255, 255, 0.65);
  --shadow: 0 18px 50px rgba(140, 160, 190, 0.28);
  --radius: 26px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  color: var(--text-main);
  background: linear-gradient(120deg, var(--left) 0%, var(--middle) 50%, var(--right) 100%);
  background-attachment: fixed;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-orbs::before,
.bg-orbs::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.bg-orbs::before {
  width: 46vw;
  height: 46vw;
  top: -14vw;
  left: -12vw;
  background: rgba(255, 255, 255, 0.85);
}

.bg-orbs::after {
  width: 38vw;
  height: 38vw;
  bottom: -12vw;
  right: -10vw;
  background: rgba(255, 255, 255, 0.7);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.orb-1 {
  width: 30vw;
  height: 30vw;
  top: 30%;
  left: 12%;
  background: rgba(255, 255, 255, 0.6);
  animation: orbDrift 22s ease-in-out infinite alternate;
}

.orb-2 {
  width: 22vw;
  height: 22vw;
  top: 8%;
  right: 18%;
  background: rgba(255, 255, 255, 0.5);
  animation: orbDrift 28s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  width: 26vw;
  height: 26vw;
  bottom: 6%;
  left: 24%;
  background: rgba(255, 255, 255, 0.45);
  animation: orbDrift 32s ease-in-out infinite alternate;
}

@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(3vw, -3vh) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-orbs .orb,
  .page,
  .card,
  .avatar-ring,
  .avatar-ring .avatar,
  .avatar-ring .avatar-fallback {
    animation: none !important;
    transition: none !important;
  }
}

.page {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: pageFadeIn 0.7s ease both;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: cardFloatIn 0.6s ease both;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.19s; }
.card:nth-child(4) { animation-delay: 0.26s; }
.card:nth-child(5) { animation-delay: 0.33s; }

@keyframes cardFloatIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) {
  .card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(140, 160, 190, 0.34);
  }
}

/* ---------- Profile card ---------- */
.profile-card {
  padding: 28px 26px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.avatar-wrap {
  flex-shrink: 0;
  position: relative;
}

.avatar-ring {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg, var(--accent), #a78bfa, #f9a8d4, #f9c9a0, #a7e3d0, var(--accent));
  box-shadow: 0 12px 28px rgba(140, 160, 190, 0.35);
  animation: ringSpin 10s linear infinite;
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.avatar-ring .avatar,
.avatar-ring .avatar-fallback {
  width: 98px;
  height: 98px;
  border: 2px solid #fff;
  animation: ringReverse 10s linear infinite;
}

@keyframes ringReverse {
  to { transform: rotate(-360deg); }
}

.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  display: block;
}

.avatar-fallback {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 55%, #f9a8d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.avatar-fallback::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -40%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.5), transparent 70%);
  border-radius: 50%;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
  flex-shrink: 0;
  display: inline-block;
}

.profile-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.clock-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.clock-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.clock-icon svg {
  width: 15px;
  height: 15px;
}

.clock-time {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  background: linear-gradient(120deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.clock-sep {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sub);
  margin: 0 2px;
  background: linear-gradient(120deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.clock-date {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text-main);
  box-shadow: 0 3px 10px rgba(140, 160, 190, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(140, 160, 190, 0.22);
}

.tag-blue { background: #dcebfb; color: #2f6fb0; }
.tag-purple { background: #e9e0fb; color: #7c5cc4; }
.tag-green { background: #ddf3e4; color: #3a9668; }
.tag-orange { background: #fbe9d8; color: #c07a34; }
.tag-pink { background: #fbe0ea; color: #c0537f; }
.tag-cyan { background: #d8f2f2; color: #2c8f93; }

/* ---------- Menu card ---------- */
.menu-card {
  padding: 12px 18px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(140, 160, 190, 0.14);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  transform: translateX(4px);
  opacity: 0.85;
}

.menu-item:active {
  transform: translateX(4px) scale(0.99);
}

.menu-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-item:hover .menu-icon {
  transform: scale(1.08) rotate(-4deg);
}

.menu-icon svg {
  width: 22px;
  height: 22px;
}

.menu-icon .custom-icon-img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 7px;
}

.social-link .custom-icon-img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 6px;
}

.menu-icon-blue { background: #e0edfb; color: #3a7cc2; }
.menu-icon-purple { background: #eae1fb; color: #7c5cc4; }
.menu-icon-pink { background: #fbe3ec; color: #c0537f; }
.menu-icon-green { background: #def4e5; color: #3a9668; }
.menu-icon-orange { background: #fbeadb; color: #c07a34; }
.menu-icon-cyan { background: #daf2f2; color: #2c8f93; }

.menu-text {
  flex: 1;
  min-width: 0;
}

.menu-title {
  font-size: 16px;
  font-weight: 700;
}

.menu-desc {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.menu-arrow {
  color: #b6bccb;
  font-size: 16px;
}

/* ---------- Social card ---------- */
.social-card {
  padding: 12px 18px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a3f4c;
  background: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  transform: translateY(-3px);
  background: #fff;
  color: var(--accent);
}

.social-link svg {
  width: 20px;
  height: 20px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.social-link:hover svg {
  transform: scale(1.15);
}

/* ---------- Quote card ---------- */
.quote-card {
  padding: 28px 26px;
  text-align: center;
  cursor: default;
}

.quote-text {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.quote-author {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.quote-tip {
  margin-top: 10px;
  font-size: 11px;
  color: #b9bfcd;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quote-tip::before {
  content: '↻';
  font-size: 12px;
  transition: transform 0.3s ease;
}

.quote-card:active .quote-tip::before {
  transform: rotate(180deg);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-sub);
  padding-top: 4px;
}

/* ---------- Admin entrance ---------- */
.admin-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 10px rgba(140, 160, 190, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(90, 96, 112, 0.45);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.25s ease;
  opacity: 0.7;
}

.admin-fab:hover {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.8);
  color: rgba(90, 96, 112, 0.85);
  opacity: 1;
  box-shadow: 0 6px 20px rgba(140, 160, 190, 0.25);
}

.admin-fab svg {
  width: 15px;
  height: 15px;
}

.admin-fab:hover svg {
  width: 17px;
  height: 17px;
}

/* ---------- Image modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(40, 48, 68, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-box {
  position: relative;
  z-index: 1;
  max-width: min(82vw, 380px);
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(60, 70, 100, 0.4);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.open .modal-box {
  transform: scale(1) translateY(0);
}

.modal-box img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* ---------- Password modal ---------- */
.pwd-box {
  padding: 26px 24px;
  text-align: center;
}

.pwd-title {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pwd-lock-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  display: flex;
}

.pwd-lock-icon svg {
  width: 18px;
  height: 18px;
}

.pwd-sub {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.pwd-input {
  margin-top: 18px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(140, 160, 190, 0.35);
  background: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  letter-spacing: 2px;
}

.pwd-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 184, 232, 0.25);
}

.pwd-error {
  display: none;
  margin-top: 10px;
  font-size: 12.5px;
  color: #e0576b;
}

.pwd-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.pwd-btn {
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.pwd-btn:active {
  transform: scale(0.97);
}

.pwd-btn-cancel {
  background: rgba(140, 160, 190, 0.16);
  color: var(--text-main);
}

.pwd-btn-cancel:hover {
  opacity: 0.85;
}

.pwd-btn-confirm {
  background: linear-gradient(120deg, var(--accent), #a78bfa);
  color: #fff;
}

.pwd-btn-confirm:hover {
  opacity: 0.9;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .page {
    padding: 22px 16px 56px;
    gap: 16px;
  }

  /* 手机端个人信息卡改为垂直居中布局，避免拥挤 */
  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 26px 20px;
    gap: 0;
  }

  .avatar-wrap {
    margin-bottom: 14px;
  }

  .avatar-ring {
    width: 92px;
    height: 92px;
  }

  .avatar-ring .avatar,
  .avatar-ring .avatar-fallback {
    width: 86px;
    height: 86px;
  }

  .avatar-fallback {
    font-size: 36px;
  }

  .profile-name {
    font-size: 24px;
    justify-content: center;
  }

  .profile-subtitle {
    font-size: 13px;
    margin-top: 8px;
  }

  .clock-row {
    justify-content: center;
    margin-top: 12px;
  }

  .clock-time {
    font-size: 19px;
  }

  .clock-date {
    margin-left: 0;
  }

  .tags {
    justify-content: center;
    margin-top: 14px;
    gap: 8px;
  }

  .menu-card {
    padding: 10px 16px;
  }

  .menu-item {
    padding: 14px 4px;
    gap: 12px;
  }

  .menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .quote-card {
    padding: 24px 22px;
  }

  .social-card {
    gap: 14px;
  }
}

@media (max-width: 360px) {
  .avatar-ring {
    width: 80px;
    height: 80px;
  }

  .avatar-ring .avatar,
  .avatar-ring .avatar-fallback {
    width: 74px;
    height: 74px;
  }

  .avatar-fallback {
    font-size: 30px;
  }

  .profile-name {
    font-size: 21px;
  }

  .clock-time {
    font-size: 17px;
  }

  .clock-date {
    font-size: 14px;
  }
}
