/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --accent: #FD79A8;
  --accent-light: #FDCB6E;
  --bg: #fafafa;
  --text: #2D3436;
  --text-light: #636e72;
  --text-muted: #b2bec3;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(108, 92, 231, 0.08);
  --shadow-hover: 0 12px 40px rgba(108, 92, 231, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Login Overlay ===== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(253, 121, 168, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(253, 203, 110, 0.15) 0%, transparent 40%),
    linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.login-card {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 24px;
  padding: 44px 40px 36px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(108, 92, 231, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.5);
  text-align: center;
  animation: login-float 0.8s ease-out;
}

@keyframes login-float {
  0% { opacity: 0; transform: translateY(24px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.login-welcome {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 32px;
  font-weight: 300;
}

.login-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 50px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  margin-bottom: 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.login-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.login-field-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.login-field:focus-within .login-field-icon {
  color: var(--primary);
}

.login-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  height: 100%;
}

.login-input::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.login-error {
  font-size: 0.8rem;
  color: #e74c3c;
  min-height: 1.2em;
  margin-bottom: 4px;
  transition: opacity 0.3s;
  opacity: 0;
}

.login-error.show {
  opacity: 1;
}

.login-btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 4px;
  margin-top: 8px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.login-btn:active {
  transform: translateY(0);
}

.login-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 18px;
  font-weight: 300;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.06);
}

.navbar .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  position: relative;
  padding: 4px 0;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: var(--transition);
  border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Music Dropdown ===== */
.nav-music-wrap {
  position: relative;
}

.music-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 16px 18px;
  width: 210px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.music-dropdown.open {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.md-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.md-item + .md-item {
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.md-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.md-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 110px;
}

.md-vol-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.md-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.md-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer;
  border: none;
}

.md-volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  cursor: pointer;
  border: none;
}

.md-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.md-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.md-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  transition: all 0.3s;
}

.md-toggle-slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: all 0.3s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.md-toggle input:checked + .md-toggle-slider {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.md-toggle input:checked + .md-toggle-slider::before {
  transform: translateX(16px);
}

.md-manage-btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(253, 121, 168, 0.1));
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}

.md-manage-btn:hover {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.18), rgba(253, 121, 168, 0.18));
  transform: translateY(-1px);
}

.md-shortcut-btn {
  width: 100%;
  padding: 8px 0;
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
  text-align: left;
}

.md-shortcut-btn:hover {
  color: var(--primary);
}

/* ===== Shortcuts Modal ===== */
.short-modal {
  max-width: 360px !important;
}

.sc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}

.sc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.sc-key kbd {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 5px;
  font-size: 0.78rem;
  font-family: inherit;
  color: var(--text);
  margin: 0 1px;
}

.sc-desc {
  color: var(--text-light);
  font-size: 0.82rem;
}

.nav-music-trigger {
  cursor: pointer;
}

/* ===== Settings Dropdown ===== */
.nav-settings-wrap {
  position: relative;
}

.settings-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 6px 0;
  min-width: 120px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.settings-dropdown.open {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sd-item {
  display: block;
  width: 100%;
  padding: 8px 18px;
  border: none;
  background: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s;
}

.sd-item:hover {
  background: rgba(108, 92, 231, 0.06);
  color: var(--primary);
}

.nav-settings-trigger {
  cursor: pointer;
}

/* ===== Settings Modal ===== */
.settings-modal {
  max-width: 860px !important;
  width: 94vw !important;
}

.set-body {
  display: flex;
  gap: 0;
  min-height: 300px;
}

.set-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.set-col-groups {
  flex: 0 0 30%;
  padding-right: 14px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.set-col-items {
  flex: 1;
  padding-left: 14px;
}

.set-col-header {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.set-group-list,
.set-item-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 300px;
  min-height: 100px;
}

.set-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}

.set-group-item:hover {
  background: rgba(108, 92, 231, 0.04);
}

.set-group-item.active {
  background: rgba(108, 92, 231, 0.08);
  border-color: rgba(108, 92, 231, 0.2);
  color: var(--primary);
}

.set-group-toggle {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.set-group-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.set-group-toggle .md-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  transition: all 0.3s;
}

.set-group-toggle .md-toggle-slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.set-group-toggle input:checked + .md-toggle-slider {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.set-group-toggle input:checked + .md-toggle-slider::before {
  transform: translateX(14px);
}

.set-item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--text);
}

.set-item-num {
  width: 20px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.set-item-name {
  flex: 0 0 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.set-item-url {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.65rem;
  min-width: 0;
}

.set-item-remark {
  flex: 0 0 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.set-item-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.set-item-del:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(108, 92, 231, 0.15) 0%, rgba(253, 121, 168, 0.1) 100%),
    url('../images/背景1.png') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,0.1) 0%,
      rgba(0,0,0,0.05) 40%,
      rgba(255,255,255,0) 60%,
      rgba(255,255,255,0.6) 100%
    );
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
  max-width: 800px;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  margin-top: 36px;
  letter-spacing: 2px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
  height: 1.8em;
  line-height: 1.8em;
}

/* ===== Nav Sidebar ===== */
.nav-sidebar {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: none;
}

.nav-group {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 12px 14px 10px;
  width: 196px;
  pointer-events: auto;
  transition: background 0.3s, border-color 0.3s;
}

.nav-group:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.nav-group-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
  cursor: text;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-title:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-group-title:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
}

.nav-group-title::after {
  content: '✎';
  font-size: 0.65rem;
  margin-left: 4px;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.nav-group-title:hover::after {
  opacity: 0.8;
}

.nav-group-title:focus::after {
  content: '';
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.nav-item {
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  font-weight: 500;
  position: relative;
  min-width: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav-item-label {
  font-size: 0.65rem;
  margin-top: 2px;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item-add {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.5);
}

.nav-item-add:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.8);
}

.nav-item.dragging {
  opacity: 0.3;
}

.nav-grid.drag-over .nav-item:not(.dragging) {
  opacity: 0.6;
}

.nav-item.drag-over-me {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-item-more {
  position: absolute;
  top: -2px;
  right: 0;
  width: 18px;
  height: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  padding: 0;
  z-index: 3;
  line-height: 1;
  letter-spacing: -1px;
}

.nav-item:hover .nav-item-more {
  display: flex;
}

.nav-item-more:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-item-menu {
  display: none;
  position: fixed;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 70px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-item-menu.open {
  display: block;
}

.nav-item-menu-item {
  display: block;
  width: 100%;
  padding: 6px 14px;
  border: none;
  background: none;
  font-size: 0.72rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-item-menu-item:hover {
  background: rgba(108, 92, 231, 0.06);
  color: var(--primary);
}

.nav-item-menu-item.danger:hover {
  background: rgba(231, 76, 60, 0.06);
  color: #e74c3c;
}

/* ===== Nav Modal ===== */
.nav-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.nav-modal-overlay.open {
  display: flex;
}

.nav-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 18px;
  padding: 28px 32px 24px;
  width: 340px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.nav-modal h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  text-align: center;
}

.nav-modal label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 4px;
}

.nav-modal input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  box-sizing: border-box;
}

.nav-modal input:focus {
  border-color: var(--primary);
}

.nav-modal textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  box-sizing: border-box;
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}

.nav-modal textarea:focus {
  border-color: var(--primary);
}

.nav-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.nav-modal-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.nav-modal-btn-cancel {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-light);
}

.nav-modal-btn-cancel:hover {
  background: rgba(0, 0, 0, 0.1);
}

.nav-modal-btn-confirm {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.nav-modal-btn-confirm:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ===== Typewriter ===== */
.typewriter {
  display: inline-block;
  white-space: nowrap;
  border-right: 2px solid rgba(255, 255, 255, 0.7);
  animation: blink-cursor 0.8s step-end infinite;
  vertical-align: top;
}

@keyframes blink-cursor {
  50% { border-color: transparent; }
}

/* ===== Search Box ===== */
.search-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  opacity: 0.7;
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.search-box:hover {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.search-input {
  background: none;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--white);
  font-family: inherit;
  width: 280px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
}

/* ===== Falling Petals ===== */
.petals-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  width: 14px;
  height: 18px;
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: petal-fall linear infinite;
}

@keyframes petal-fall {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) translateX(0);
  }
  5% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(calc(100vh + 40px)) rotate(720deg) translateX(-60px);
  }
}

/* ===== Wave Divider ===== */
.wave-divider {
  position: relative;
  width: 100%;
  height: 150px;
  margin-top: -150px;
  z-index: 3;
  pointer-events: none;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
}

.wave-1 {
  animation: wave-scroll 12s linear infinite;
  z-index: 1;
}

.wave-2 {
  animation: wave-scroll 18s linear infinite reverse;
  z-index: 2;
  opacity: 0.8;
  bottom: -5px;
}

.wave-1 path:nth-child(2) {
  animation: wave-float 3s ease-in-out infinite alternate;
}

.wave-1 path:nth-child(3) {
  animation: wave-float 4s ease-in-out infinite alternate-reverse;
}

@keyframes wave-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes wave-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(6px); }
}

/* ===== Content Section ===== */
.content {
  position: relative;
  background: var(--white);
  padding: 60px 24px 80px;
  z-index: 4;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(253, 121, 168, 0.1));
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text);
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 300;
}

/* ===== Post Cards ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(253, 121, 168, 0.06));
  color: var(--text-muted);
}

.placeholder-icon {
  width: 60px;
  height: 60px;
  opacity: 0.6;
}

.card-category {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card-body {
  padding: 24px;
}

.card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
}

.card-date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== Bare Music Cards ===== */
.music-list {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 270px;
  min-height: 370px;
  pointer-events: none;
}

.music-list-inner {
  position: relative;
  width: 100%;
  height: 370px;
}

/* -- Music Card -- */
.music-card {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 10px;
  border-radius: 10px;
  transition: all 0.5s ease;
  cursor: pointer;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.55);
  pointer-events: auto;
  box-sizing: border-box;
}

.music-card:hover {
  background: rgba(255, 255, 255, 0.75);
}

.music-card-cover {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.music-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.music-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-card-artist {
  font-size: 0.62rem;
  color: var(--text-light);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-card-progress {
  flex: 0 0 60px;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.music-card-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: width 0.3s linear;
}

.music-card-time {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 400;
  min-width: 28px;
  text-align: right;
}

.music-card-play {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(108, 92, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
  padding: 5px;
}

.music-card-play svg {
  width: 100%;
  height: 100%;
  fill: var(--primary);
}

.music-card-play:hover {
  background: rgba(108, 92, 231, 0.2);
  transform: scale(1.1);
}

.music-card.mc-playing .music-card-play {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.music-card.mc-playing .music-card-play svg {
  fill: #fff;
}

/* -- Bottom Controls -- */
.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.mc-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(108, 92, 231, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  padding: 7px;
}

.mc-btn svg {
  width: 100%;
  height: 100%;
  fill: var(--text-light);
  transition: fill 0.25s;
}

.mc-btn:hover {
  background: rgba(108, 92, 231, 0.16);
}

.mc-btn:hover svg {
  fill: var(--primary);
}

.mc-btn-play {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.mc-btn-play svg {
  fill: #fff;
}

.mc-btn-play:hover {
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
  transform: scale(1.05);
}

/* -- Playlist Management Modal -- */
.playlist-modal {
  max-width: 720px !important;
  width: 92vw;
}

.pm-body {
  display: flex;
  gap: 0;
  min-height: 360px;
  margin-top: 4px;
}

.pm-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pm-col-upload {
  padding-right: 16px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.pm-col-uploaded {
  padding-left: 16px;
}

.pm-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.pm-select-btn {
  display: inline-block;
  padding: 5px 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  border: none;
  line-height: 1.4;
}

.pm-select-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.25);
}

.pm-refresh-btn {
  padding: 5px 12px;
  background: rgba(108, 92, 231, 0.08);
  border: none;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.pm-refresh-btn:hover {
  background: rgba(108, 92, 231, 0.16);
}

.pm-pending-list,
.pm-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 400px;
  min-height: 140px;
}

.pm-search {
  width: 100%;
  padding: 7px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.pm-search:focus {
  border-color: var(--primary);
}

.pm-search::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.pm-empty {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 40px 0;
}

/* -- Pending item card -- */
.pm-pending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(108, 92, 231, 0.04);
  border: 1px solid rgba(108, 92, 231, 0.1);
  border-radius: 10px;
  transition: all 0.2s;
}

.pm-pending-item:hover {
  background: rgba(108, 92, 231, 0.07);
}

.pm-pending-cover {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  overflow: hidden;
}

.pm-pending-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pm-pending-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-pending-artist {
  font-size: 0.68rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-pending-dup {
  display: inline-block;
  padding: 0 5px;
  margin-left: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  color: #e67e22;
  background: rgba(230, 126, 34, 0.1);
  border-radius: 3px;
  line-height: 1.4;
}

/* -- Uploaded item card -- */
.pm-uploaded-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  transition: all 0.2s;
}

.pm-uploaded-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.pm-uploaded-cover {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  overflow: hidden;
}

.pm-uploaded-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pm-uploaded-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-uploaded-artist {
  font-size: 0.68rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-uploaded-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.pm-uploaded-del:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

/* -- Upload button & status -- */
.pm-upload-btn {
  width: 100%;
  margin-top: 10px;
  padding: 9px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}

.pm-upload-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.pm-upload-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.pm-upload-status {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 6px;
  min-height: 1em;
  text-align: center;
}

.pm-count {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}

.pm-pending-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.pm-pending-del:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.pm-uploaded-num {
  width: 18px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.pm-uploaded-item {
  cursor: grab;
}

.pm-uploaded-item:active {
  cursor: grabbing;
}

.pm-uploaded-item.dragging {
  opacity: 0.3;
}

.pm-uploaded-item.drag-over-me {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.06);
}

/* ===== About Section ===== */
.about {
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
  padding: 60px 24px 80px;
}

.about-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px 32px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.about-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.25);
}

.about-card h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.about-card p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.about-social {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  background: var(--bg);
  transition: var(--transition);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

/* ===== Footer ===== */
.footer {
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding: 32px 24px;
  text-align: center;
}

.footer-content p {
  font-size: 0.82rem;
  color: var(--text-light);
}

.footer-quote {
  margin-top: 6px;
  color: var(--text-muted) !important;
  font-style: italic;
  font-size: 0.78rem !important;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-light), var(--accent));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 20px 24px;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  }

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

  .search-input {
    width: 160px;
  }

  .search-box {
    padding: 12px 20px;
  }

  .hero-subtitle {
    height: auto;
    min-height: 2.4em;
    line-height: 1.6;
  }

  .typewriter {
    font-size: 0.85rem;
    white-space: normal;
    padding: 0 4px;
  }

  .nav-sidebar {
    display: none;
  }

  .music-list {
    display: none;
  }

  .wave-divider {
    height: 80px;
    margin-top: -80px;
  }
}
