/* ===== 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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  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-logo span {
  display: inline-block;
}

.site-logo-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 7px;
}

.login-logo-mark {
  width: 32px;
  height: 32px;
}

.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 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  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;
}

.logo span {
  display: inline-block;
}

.logo .site-logo-mark-light {
  display: none;
}

.navbar.scrolled .logo .site-logo-mark-dark {
  display: none;
}

.navbar.scrolled .logo .site-logo-mark-light {
  display: block;
}

.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;
}

.nav-english-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;
  overflow: visible;
}

.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);
}

.nav-modal-btn-danger {
  background: rgba(231, 76, 60, 0.1);
  color: #d94a3a;
}

.nav-modal-btn-danger:hover {
  background: rgba(231, 76, 60, 0.16);
  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;
}

/* ===== English Corner Marquee ===== */
.english-marquee {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%);
  width: 33.333vw;
  min-width: 320px;
  max-width: calc(100vw - 40px);
  height: clamp(270px, 34vh, 390px);
  margin: 0;
  overflow: hidden;
  contain: paint;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.english-marquee.hidden {
  display: none;
}

.english-marquee::before,
.english-marquee::after {
  display: none;
}

.english-marquee::before {
  content: none;
}

.english-marquee::after {
  content: none;
}

.english-marquee-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.english-marquee-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0;
}

.english-marquee.has-cards .english-marquee-empty {
  display: none;
}

.english-float-card {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(640px, calc(100vw - 64px));
  min-height: 76px;
  padding: 12px 15px;
  transform: translate3d(100%, 0, 0);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(16, 20, 31, 0.14);
  color: #fff;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  will-change: transform;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  z-index: 1;
}

.english-float-card:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.18)),
    rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 16px 40px rgba(16, 20, 31, 0.2);
}

.english-line-en {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

.english-line-zh {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
  line-height: 1.35;
  letter-spacing: 0;
}

/* ===== English Corner Modal ===== */
.english-corner-modal {
  max-width: 760px !important;
  width: 92vw !important;
}

.english-corner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.english-corner-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.english-corner-head h3 {
  margin: 0;
  text-align: left;
}

.english-visible-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  cursor: pointer;
  flex: 0 0 auto;
}

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

.english-visible-toggle .md-toggle-slider::before {
  width: 18px;
  height: 18px;
}

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

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

.english-add-btn {
  flex: 0 0 auto;
  min-width: 78px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.18);
  transition: transform 0.2s, opacity 0.2s;
}

.english-add-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.english-corner-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
}

.english-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 12px 14px;
  background: rgba(250, 250, 250, 0.82);
  border: 1px solid rgba(45, 52, 54, 0.07);
  border-radius: 8px;
}

.english-row-main {
  min-width: 0;
}

.english-row-en,
.english-row-zh {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.english-row-en {
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--text);
}

.english-row-zh {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--text-light);
}

.english-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.english-row-btn {
  height: 30px;
  padding: 0 9px;
  border: none;
  border-radius: 7px;
  background: rgba(108, 92, 231, 0.08);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}

.english-row-btn:hover {
  background: rgba(108, 92, 231, 0.15);
  transform: translateY(-1px);
}

.english-row-btn.danger {
  background: rgba(231, 76, 60, 0.08);
  color: #d94a3a;
}

.english-row-btn.danger:hover {
  background: rgba(231, 76, 60, 0.15);
}

.english-list-empty {
  padding: 34px 16px;
  border: 1px dashed rgba(45, 52, 54, 0.12);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.84rem;
}

.english-editor-modal {
  width: 430px;
}

/* ===== 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);
}

/* ===== Category Material Cards ===== */
.journal-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(108, 92, 231, 0.035) 0%, rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 82%, rgba(0, 206, 201, 0.035) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 248, 251, 0.98) 100%);
  padding: 58px 20px 96px;
}

.journal-section::before,
.journal-section::after {
  content: '';
  position: absolute;
  top: 56px;
  bottom: 72px;
  width: 120px;
  pointer-events: none;
  opacity: 0.55;
}

.journal-section::before {
  left: 0;
  background:
    linear-gradient(90deg, rgba(108, 92, 231, 0.08), rgba(108, 92, 231, 0)),
    repeating-linear-gradient(135deg, rgba(108, 92, 231, 0.08) 0 1px, transparent 1px 18px);
  clip-path: polygon(0 0, 100% 10%, 72% 100%, 0 92%);
}

.journal-section::after {
  right: 0;
  background:
    linear-gradient(270deg, rgba(0, 206, 201, 0.08), rgba(0, 206, 201, 0)),
    repeating-linear-gradient(45deg, rgba(253, 121, 168, 0.07) 0 1px, transparent 1px 20px);
  clip-path: polygon(28% 8%, 100% 0, 100% 94%, 0 100%);
}

.journal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1160px;
  padding: 0 12px;
}

.journal-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.journal-head .section-title {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.journal-primary-btn {
  height: 46px;
  min-width: 110px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(108, 92, 231, 0.22);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.journal-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(108, 92, 231, 0.28);
}

.journal-primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.category-actions .journal-primary-btn {
  height: 40px;
  min-width: 96px;
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.18);
}

.category-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(45, 52, 54, 0.06);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(45, 52, 54, 0.06);
  margin-bottom: 22px;
  overflow: visible;
}

.category-tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 6px 2px 8px;
}

.category-tabs::-webkit-scrollbar {
  height: 4px;
}

.category-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.category-tab {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 220px;
  padding: 0 14px;
  border: 1px solid rgba(45, 52, 54, 0.08);
  border-radius: 8px;
  background: rgba(250, 250, 250, 0.86);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.category-tab:hover {
  color: var(--primary);
  border-color: rgba(108, 92, 231, 0.22);
  transform: translateY(-2px);
}

.category-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.18);
}

.category-tab-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-tab-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 52, 54, 0.06);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.category-tab.active .category-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.category-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.category-tool-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 8px;
  background: rgba(108, 92, 231, 0.08);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.category-tool-btn:hover {
  background: rgba(108, 92, 231, 0.16);
  transform: translateY(-1px);
}

.category-tool-btn.danger {
  background: rgba(231, 76, 60, 0.08);
  color: #d94a3a;
}

.category-tool-btn.danger:hover {
  background: rgba(231, 76, 60, 0.14);
}

.category-tool-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.material-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.material-card {
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(45, 52, 54, 0.06);
  box-shadow: 0 12px 34px rgba(45, 52, 54, 0.055);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.material-card:hover,
.material-card:focus {
  transform: translateY(-2px);
  border-color: rgba(108, 92, 231, 0.18);
  box-shadow: 0 18px 42px rgba(45, 52, 54, 0.08);
  outline: none;
}

.material-card-body {
  min-width: 0;
}

.material-card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-card-excerpt {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 138px;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.material-card-meta time {
  color: var(--text-light);
  font-weight: 600;
}

.journal-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(45, 52, 54, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--text-muted);
  font-size: 0.94rem;
}

.category-modal {
  max-width: 380px !important;
}

.modal-error {
  min-height: 18px;
  margin: -6px 0 8px;
  color: #d94a3a;
  font-size: 0.76rem;
}

.card-modal {
  width: 760px !important;
  max-width: 92vw !important;
}

.card-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.card-modal-head h3 {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  text-align: left;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.card-modal-head span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding-top: 3px;
}

.card-view-content {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 18px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: rgba(45, 52, 54, 0.035);
  border: 1px solid rgba(45, 52, 54, 0.06);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#card-content-input {
  min-height: 240px;
  line-height: 1.8;
}

/* ===== 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;
  }

  .english-marquee {
    width: min(88vw, 420px);
    min-width: 0;
    height: clamp(230px, 30vh, 320px);
    top: calc(100% + 14px);
    margin: 0;
  }

  .english-float-card {
    width: max-content;
    max-width: min(520px, calc(100vw - 36px));
    min-height: 72px;
    padding: 11px 13px;
  }

  .english-corner-modal,
  .english-editor-modal {
    width: 92vw !important;
  }

  .english-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .english-row-actions {
    justify-content: flex-start;
  }

  .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;
  }

  .journal-section {
    padding: 48px 16px 64px;
  }

  .journal-section::before,
  .journal-section::after {
    display: none;
  }

  .journal-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .journal-head .section-title {
    font-size: 1.75rem;
  }

  .journal-primary-btn {
    width: 100%;
  }

  .category-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .category-tabs {
    padding-top: 4px;
  }

  .category-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .category-actions .journal-primary-btn {
    flex: 0 0 auto;
  }

  .category-tools {
    justify-content: flex-end;
  }

  .material-card {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 104px;
  }

  .material-card-meta {
    min-width: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .card-modal-head {
    flex-direction: column;
    gap: 6px;
  }

  .card-modal-head span {
    padding-top: 0;
  }
}

/* ===== Scratchpad (信息暂存) ===== */
.scratch-section {
  position: relative;
  padding: 8px 24px 96px;
  /* 与上方内容区末尾色无缝衔接，向下渐隐入页面底色 */
  background: linear-gradient(180deg, #f7f8fb 0%, #fafafa 100%);
}

.scratch-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 22px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(45, 52, 54, 0.06);
  box-shadow: 0 12px 34px rgba(45, 52, 54, 0.055);
}

.scratch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.scratch-title-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.scratch-title-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.09);
}

.scratch-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
}

.scratch-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-light);
  white-space: nowrap;
}

.scratch-status.saving::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-light);
  animation: scratch-pulse 1s ease-in-out infinite;
}

@keyframes scratch-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

.scratch-editor {
  min-height: 76px;
  max-height: 380px;
  overflow-y: auto;
  padding: 13px 16px;
  border-radius: 8px;
  background: rgba(108, 92, 231, 0.035);
  border: 1px solid rgba(108, 92, 231, 0.07);
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text);
  outline: none;
  caret-color: var(--primary);
  word-break: break-word;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.scratch-editor:hover {
  background: rgba(108, 92, 231, 0.05);
}

.scratch-editor:focus {
  background: var(--white);
  border-color: rgba(108, 92, 231, 0.35);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.10);
}

/* 拖拽文件悬停时的提示态 */
.scratch-card.scratch-drag .scratch-editor {
  background: rgba(108, 92, 231, 0.09);
  border-color: rgba(108, 92, 231, 0.40);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.10);
}

.scratch-editor.is-empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  font-weight: 300;
  pointer-events: none;
  display: block;
}

.scratch-editor img.scratch-img {
  display: inline-block;
  vertical-align: middle;
  max-width: min(100%, 260px);
  max-height: 170px;
  margin: 4px 3px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(45, 52, 54, 0.10);
  cursor: zoom-in;
  transition: opacity var(--transition);
}

.scratch-editor img.scratch-img:hover {
  opacity: 0.88;
}

/* ---- 附件列表 ---- */
.scratch-attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.scratch-attachments:empty {
  display: none;
}

.scratch-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(108, 92, 231, 0.05);
  border: 1px solid rgba(108, 92, 231, 0.06);
  transition: background var(--transition), border-color var(--transition);
}

.scratch-file-row:hover {
  background: rgba(108, 92, 231, 0.08);
  border-color: rgba(108, 92, 231, 0.14);
}

.scratch-file-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(253, 121, 168, 0.10));
  color: var(--primary);
}

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

.scratch-file-name {
  flex: 1;
  min-width: 0;
  font-size: 0.86rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scratch-file-size {
  flex: 0 0 auto;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.scratch-file-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.scratch-file-action svg {
  width: 15px;
  height: 15px;
}

.scratch-file-action:hover {
  background: rgba(108, 92, 231, 0.12);
  color: var(--primary);
  transform: translateY(-1px);
}

.scratch-file-action.scratch-file-remove:hover {
  background: rgba(253, 121, 168, 0.14);
  color: var(--accent);
}

/* ---- 图片灯箱 ---- */
.scratch-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(20, 16, 40, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  cursor: zoom-out;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.scratch-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.scratch-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  transform: scale(0.95);
  transition: transform 0.28s ease;
}

.scratch-lightbox.open img {
  transform: scale(1);
}

@media (max-width: 768px) {
  .scratch-section {
    padding: 4px 16px 64px;
  }

  .scratch-card {
    padding: 15px 14px 16px;
  }

  .scratch-editor {
    min-height: 68px;
  }
}
