/* =========
   NexusNote 深色毛玻璃主题
   ========= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    system-ui, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  background: radial-gradient(circle at top left, #1e293b 0, #020617 45%, #000 100%);
  color: #f9fafb;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

.nx-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nx-blur-surface {
  background: radial-gradient(circle at top left, rgba(148, 163, 253, 0.18), rgba(15, 23, 42, 0.9));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(148, 163, 253, 0.35);
}

.nx-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.95),
    rgba(2, 6, 23, 0.86),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 253, 0.25);
}

.nx-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nx-header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nx-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nx-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: conic-gradient(
    from 180deg,
    #a855f7,
    #6366f1,
    #22d3ee,
    #a855f7
  );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b1120;
  font-size: 0.9rem;
  font-weight: 700;
}

.nx-logo-text-main {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.nx-logo-text-sub {
  font-size: 0.8rem;
  color: #9ca3af;
}

.nx-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.nx-main {
  flex: 1;
  padding: 1.25rem 0 1.75rem;
}

.nx-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1.7fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.nx-panel {
  border-radius: 1.1rem;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(30, 64, 175, 0.5);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9);
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.nx-panel-header {
  padding: 0.8rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(30, 64, 175, 0.45);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.nx-panel-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e5e7eb;
}

.nx-panel-sub {
  font-size: 0.8rem;
  color: #9ca3af;
}

.nx-panel-body {
  padding: 0.7rem 0.8rem 0.9rem;
  overflow: auto;
}

.nx-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 253, 0.6);
  color: #c4b5fd;
}

.nx-btn {
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    background-color 0.12s ease-out, border-color 0.12s ease-out;
}

.nx-btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-color: rgba(167, 139, 250, 0.9);
  color: #f9fafb;
  box-shadow: 0 14px 40px rgba(79, 70, 229, 0.65);
}

.nx-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 55px rgba(79, 70, 229, 0.9);
}

.nx-btn-warn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: rgba(245, 158, 11, 0.9);
  color: #fff;
}

.nx-btn-ghost {
  background-color: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 253, 0.35);
  color: #e5e7eb;
}

.nx-btn-ghost:hover {
  background-color: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.nx-btn-sm {
  padding: 0.32rem 0.9rem;
  font-size: 0.78rem;
}

.nx-sidebar-section {
  margin-bottom: 0.7rem;
}

.nx-sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.nx-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.nx-chip {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.8);
  color: #9ca3af;
  cursor: pointer;
}

.nx-chip.is-active {
  border-color: rgba(167, 139, 250, 0.9);
  color: #e5e7eb;
}

.nx-memory-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nx-memory-item {
  border-radius: 0.9rem;
  padding: 0.55rem 0.6rem;
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.35), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(55, 65, 81, 0.9);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    border-color 0.12s ease-out, background 0.12s ease-out;
}

.nx-memory-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.9);
  border-color: rgba(129, 140, 248, 0.9);
}

.nx-memory-item.is-active {
  border-color: rgba(196, 181, 253, 0.85);
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.5), rgba(15, 23, 42, 0.96));
}

.nx-memory-title {
  font-size: 0.85rem;
}

.nx-memory-meta {
  font-size: 0.72rem;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.nx-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem 0.3rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.85);
}

.nx-editor-title {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.nx-editor-area {
  flex: 1;
  padding: 0.5rem 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
}

.nx-textarea {
  flex: 1;
  resize: none;
  border-radius: 0.8rem;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background-color: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.82rem;
  padding: 0.55rem 0.7rem;
  outline: none;
}

.nx-textarea:focus {
  border-color: rgba(167, 139, 250, 0.95);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.7);
}

.nx-helper-text {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 0.35rem;
}

.nx-ai-output {
  font-size: 0.8rem;
  color: #e5e7eb;
  white-space: pre-wrap;
}

.nx-ai-placeholder {
  font-size: 0.78rem;
  color: #6b7280;
}

.nx-tag-row {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.nx-tag-pill {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
  color: #9ca3af;
}

.nx-footer {
  padding: 0.6rem 1.5rem 0.8rem;
  font-size: 0.72rem;
  color: #6b7280;
  text-align: right;
}

@media (max-width: 1040px) {
  .nx-layout {
    grid-template-columns: 220px minmax(0, 1.6fr) minmax(0, 1.3fr);
  }
}

@media (max-width: 840px) {
  .nx-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .nx-panel {
    min-height: 260px;
  }
}

