
﻿/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

:root {
  --bg: #12121a;
  --bg2: #1a1a24;
  --bg3: #22222e;
  --surface: #2a2a38;
  --border: #3a3a48;
  --text: #e0e0ea;
  --text2: #a0a0b0;
  --accent: #6c6cf0;
  --accent2: #8888f8;
  --danger: #e05050;
  --radius: 10px;
  --radius-sm: 6px;
  --font: system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', monospace;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ===== App Layout ===== */
.app { max-width: 1400px; margin: 0 auto; padding: 0 20px; height: 100%; display: flex; flex-direction: column; }

.app-header { }
.app-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.tagline {
  font-size: 0.82rem;
  color: var(--text2);
  margin-top: 2px;
}

/* ===== Main Grid ===== */
.app-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 20px;
}

@media (max-width: 800px) {
  .app-main { grid-template-columns: 1fr; }
}

.panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ===== Upload Area ===== */
.upload-area {
  position: relative;
  min-height: 220px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.upload-area:hover { border-color: var(--accent); }
.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(108,108,240,0.08);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  color: var(--text2);
}
.upload-placeholder svg { opacity: 0.6; width: 48px; height: 48px; }
.upload-placeholder p { font-size: 0.95rem; }
.upload-hint { font-size: 0.78rem; opacity: 0.5; }

.upload-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.upload-preview img {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.image-info {
  font-size: 0.8rem;
  color: var(--text2);
  text-align: center;
  margin-top: 10px;
}

/* ===== Controls ===== */
.controls h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.control-group {
  margin-bottom: 16px;
}
.control-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}
.control-group select {
  width: 100%;
  padding: 4px 4px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%2712%27 fill=%27%23a0a0b0%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M8 11L3 6h10z%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.control-group select:hover {
  border-color: var(--accent);
}
.control-group select:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 2px rgba(108,108,240,0.2);
}

/* ===== Segmented Buttons ===== */
.segmented {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 100%;
}
.seg-btn {
  flex: 1;
  padding: 8px 4px;
  font-size: 0.78rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  border-right: 1px solid var(--border);
}
.seg-btn:last-child { border-right: none; }
.seg-btn:hover { background: var(--surface); color: var(--text); }
.seg-btn.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
  white-space: nowrap;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  padding: 12px 20px;
  margin-top: 8px;
}
.btn-primary:hover { background: var(--accent2); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-ghost {
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg3); color: var(--text); }

.btn-loading { display: inline-flex; align-items: center; gap: 8px; }
.hidden { display: none !important; }

/* ===== Spinner ===== */
.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Result Area ===== */
.result-area {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.result-section {
  margin-bottom: 16px;
}
.result-section:last-child { margin-bottom: 0; }
.result-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

/* ===== Pixel Canvas ===== */
.pixel-canvas-wrapper {
  background: #1a1a24;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  max-height: 560px;
  min-height: 200px;
  width: 100%;
  cursor: grab;
}
.pixel-canvas-wrapper.panning { cursor: grabbing; }
.pixel-canvas-wrapper canvas {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  position: absolute;
  top: 0;
  left: 0;
}

/* ===== Edit Toolbar ===== */
.edit-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  flex-wrap: wrap;
}
.tool-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}
.tool-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.12s;
  font-family: var(--font);
}
.tool-btn:hover { background: var(--surface); color: var(--text); }
.tool-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.zoom-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  min-width: 40px;
  text-align: center;
  font-family: var(--font-mono);
}
.edit-hint {
  font-size: 0.65rem;
  color: var(--text2);
  opacity: 0.6;
  flex: 1;
}

.current-color {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

/* ===== Status Bar ===== */
.status-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--text2);
  font-family: var(--font-mono);
}
.status-sep { opacity: 0.3; }
.status-item { white-space: nowrap; }

/* ===== Checkbox ===== */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.checkbox-text {
  font-weight: 600;
  font-size: 0.9rem;
}
.checkbox-hint {
  font-size: 0.75rem;
  color: var(--text2);
  opacity: 0.6;
}

/* ===== Palette ===== */
.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.palette-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
}

/* ===== Result Area Flex Layout ===== */
.result-area .result-section {
  flex: 1;
  min-height: 0;
}
.result-area .result-section:first-child {
  flex: 3;
  min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Make canvas-with-palette fill its section */
.result-area .result-section:first-child .canvas-with-palette {
  flex: 1;
  min-height: 0;
}

  .result-area .result-section:nth-child(n+2) {
    flex: 0 0 auto;
  }

/* Used colors: limit height with scroll */
.result-section:nth-child(2) .palette {
  max-height: 120px;
  overflow-y: auto;
}



.palette-swatch {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
/* Smaller color swatches in used colors section */
.result-section:nth-child(2) .palette {
  gap: 4px;
}
.result-section:nth-child(2) .palette-item {
  width: 44px;
  gap: 2px;
}
.result-section:nth-child(2) .palette-swatch {
  width: 18px;
  height: 18px;
}
.result-section:nth-child(2) .palette-label {
  font-size: 0.45rem;
  line-height: 1.2;
}
.palette-label {
  font-size: 0.62rem;
  text-align: center;
  color: var(--text2);
  line-height: 1.3;
  word-break: break-all;
}

/* ===== Bead Swatches ===== */
.bead-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
}
.bead-swatch {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bead-swatch:hover { border-color: var(--accent); }
.bead-swatch.selected { border-color: #fff; box-shadow: 0 0 0 1px var(--accent); }
.bead-label {
  font-size: 0.55rem;
  font-weight: 700;
  font-family: var(--font-mono);
  pointer-events: none;
  text-shadow: 0 0 2px rgba(0,0,0,.5), 0 0 4px rgba(0,0,0,.3);
  line-height: 1;
}

/* ===== Export Buttons ===== */
.export-buttons {
  justify-content: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}
.btn-export:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.section-hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text2);
  opacity: 0.6;
}

/* ===== Preview Header ===== */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.preview-header h2 { margin-bottom: 0; }
.canvas-info {
  font-size: 0.78rem;
  color: var(--text2);
  font-family: var(--font-mono);
}
/* ===== Canvas with Palette Sidebar ===== */
.canvas-with-palette {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
.canvas-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.canvas-main .preview-header {
  flex-shrink: 0;
}
.canvas-main .pixel-canvas-wrapper {
  flex: 1;
  min-height: 100px;
  max-height: none;
}
.canvas-main .edit-toolbar {
  flex-shrink: 0;
}
.canvas-main .status-bar {
  flex-shrink: 0;
}
.palette-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.palette-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.palette-sidebar-header h3 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.palette-sidebar .bead-palette {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 8px 6px;
  background: transparent;
  border-radius: 0;
  min-height: 0;
}
.palette-sidebar .bead-palette::-webkit-scrollbar {
  width: 6px;
}
.palette-sidebar .bead-palette::-webkit-scrollbar-track {
  background: transparent;
}
.palette-sidebar .bead-palette::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

@media (max-width: 700px) {
  .canvas-with-palette { flex-direction: column; }
  .palette-sidebar { width: 100%; max-height: 200px; }
  .palette-sidebar .bead-palette { grid-template-columns: repeat(6, 1fr); }
}

/* Smaller swatches in sidebar */
.palette-sidebar .bead-swatch {
  border-width: 1px;
}
.palette-sidebar .bead-label {
  font-size: 0.4rem;
}

/* ===== Page Stack ===== */

.page-stack {
  height: 100%;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-upload {
  transform: translateY(0);
}

.page-editor {
  transform: translateY(100%);
}

.page-stack.at-editor .page-upload {
  transform: translateY(-100%);
}

.page-stack.at-editor .page-editor {
  transform: translateY(0);
}

.module {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.module-upload {
  justify-content: center;
}
.module-editor {
  overflow: visible;
  justify-content: flex-start;
  flex: 1;
  min-height: 0;
}
.module-upload .upload-hero {
  text-align: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.module-upload .app-main {
  margin-bottom: 0;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2), #c8b0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 0.85rem;
  color: var(--text2);
  opacity: 0.6;
  margin: 0;
}

/* ===== Bead Map Toggle ===== */
.bead-map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--text2);
  user-select: none;
}
.toggle-item{display:inline-flex;align-items:center;gap:6px;cursor:pointer;user-select:none;font-size:0.82rem;color:var(--text2);padding:4px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);transition:all 0.15s}
.toggle-item:hover{border-color:var(--accent)}
.toggle-item input[type="checkbox"]{width:14px;height:14px;accent-color:var(--accent);cursor:pointer}
.bead-map-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}









/* Right panel: fill vertically and push button to bottom */
.panel-right {
  display: flex;
  flex-direction: column;
}
.panel-right .controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.panel-right .btn-primary {
  margin-top: auto;
}



/* ===== 手机端优化 (< 500px) ===== */
@media (max-width: 500px) {
  .app { padding: 0 10px; }

  .app-header h1 { font-size: 1.2rem; }

  .hero-title { font-size: 1.6rem !important; letter-spacing: 0.1em !important; }
  .hero-subtitle { font-size: 0.72rem; }

  .module-upload .upload-hero { margin-bottom: 10px; }

  .panel { padding: 14px; }

  .controls h2 { font-size: 0.9rem; margin-bottom: 10px; }
  .control-group { margin-bottom: 10px; }

  .upload-area { min-height: 140px; padding: 14px; }
  .upload-placeholder svg { width: 28px; height: 28px; }
  .upload-placeholder p { font-size: 0.82rem; }
  .upload-hint { font-size: 0.7rem; }
  .upload-preview img { max-height: 140px; }

  .seg-btn { font-size: 0.7rem; padding: 5px 2px; }

  .control-group select { font-size: 0.8rem; padding: 6px 10px; padding-right: 24px; }

  .btn-primary { font-size: 0.85rem; padding: 10px 16px; }

  /* Editor page: auto height so border wraps all content */
  .module-editor { flex: 0 0 auto; height: auto; }
  .result-area { display: flex !important; flex-direction: column; gap: 8px; flex: 0 0 auto; height: auto; }
  .result-area .result-section { flex: 0 0 auto !important; min-height: 0; padding: 0; overflow: visible; }
  .result-area .result-section:first-child { display: flex; flex-direction: column; flex: 1 !important; }
  .result-area .result-section:first-child .canvas-with-palette { display: flex; flex-direction: column; flex: 1; }
  .result-section + .result-section { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
  
  .canvas-with-palette { display: flex; flex-direction: column; }
  .palette-sidebar { width: 100%; max-height: 100px; }
  .palette-sidebar .bead-palette { grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 4px; }
  .canvas-main { display: flex; flex-direction: column; flex: 1; }
  .canvas-main .pixel-canvas-wrapper { min-height: 55vh; height: auto; flex: 1; }
  .result-section h2 { font-size: 0.85rem; margin-bottom: 6px; }
  .result-area .result-section:last-child { margin-bottom: 0; }
  
  .result-section:nth-child(2) .palette { gap: 3px; }
  .result-section:nth-child(2) .palette-item { width: 36px; }
  .result-section:nth-child(2) .palette-swatch { width: 14px; height: 14px; }

  .export-buttons { flex-direction: column; align-items: stretch; }
  .btn-export { justify-content: center; padding: 8px 12px; font-size: 0.75rem; }

  .edit-toolbar { gap: 3px; padding: 4px 6px; flex-wrap: wrap; }
  .tool-btn { width: 22px; height: 22px; font-size: 0.7rem; }
  .edit-hint { display: none; }
  .zoom-label { min-width: 30px; font-size: 0.7rem; }

  .status-bar { font-size: 0.55rem; padding: 1px 6px; }

  .palette-sidebar .bead-swatch { border-width: 1px; }
  .palette-sidebar .bead-label { font-size: 0.35rem; }

  .preview-header h2 { font-size: 0.85rem; margin-bottom: 4px; }
  .canvas-info { font-size: 0.7rem; }

  .section-hint { display: none; }
  .palette-sidebar-header { padding: 4px 6px; }
  .palette-sidebar-header h3 { font-size: 0.7rem; }

  .result-section h2 { font-size: 0.85rem; margin-bottom: 6px; }
  .result-section { margin-bottom: 8px; }
  
  .tool-group { gap: 2px; }
  .tool-divider { margin: 0 2px; }
}/* ===== 小平板端优化 (500px - 800px) ===== */
@media (min-width: 501px) and (max-width: 800px) {
  .app { padding: 0 14px; }
  .panel { padding: 18px; }
  .hero-title { font-size: 2rem !important; }
  .export-buttons { flex-wrap: wrap; }
  .upload-area { min-height: 180px; }
  .palette-sidebar .bead-palette { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Auth Modal ===== */
.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.6);z-index:1000;display:flex;align-items:center;justify-content:center}
.modal-box{background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);width:360px;max-width:90vw;box-shadow:0 8px 32px rgba(0,0,0,0.4)}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border)}
.modal-header h2{font-size:1.1rem;font-weight:600;margin:0}
.modal-body{padding:20px}
.form-input{width:100%;padding:10px 12px;font-size:0.88rem;font-family:var(--font);background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:var(--radius-sm);outline:none;box-sizing:border-box}
.form-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-glow)}
.form-input::placeholder{color:var(--text2);opacity:0.4}
.header-actions{display:flex;align-items:center;gap:8px;font-size:0.82rem}
.header-actions .btn{font-size:0.78rem}
#userStatus{display:flex;align-items:center;gap:6px}
.user-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent2));display:flex;align-items:center;justify-content:center;font-size:0.75rem;font-weight:700;color:#fff;flex-shrink:0}
.user-email{font-size:0.78rem;color:var(--text2);max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-item{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:8px;cursor:pointer;transition:all 0.15s}
.project-item:hover{border-color:var(--accent);background:rgba(120,120,240,0.05)}
.project-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.project-name{font-weight:600;font-size:0.88rem}
.project-meta{font-size:0.72rem;color:var(--text2)}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--surface);color:var(--text);padding:10px 20px;border-radius:var(--radius-sm);border:1px solid var(--border);font-size:0.85rem;z-index:2000;opacity:0;transition:opacity 0.3s;pointer-events:none}
.toast.show{opacity:1}


/* ===== User Dropdown ===== */
.header-actions{position:relative}
.user-dropdown{position:absolute;top:100%;right:0;background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius-sm);box-shadow:0 4px 20px rgba(0,0,0,0.35);z-index:999;min-width:160px;overflow:hidden}
.user-dropdown-header{padding:10px 14px;font-size:0.78rem;color:var(--text2);border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-dropdown-item{padding:10px 14px;font-size:0.85rem;cursor:pointer;transition:background 0.12s}
.user-dropdown-item:hover{background:var(--bg3)}
.user-dropdown-exit{color:#e55}
.user-dropdown-divider{height:1px;background:var(--border)}
@media(max-width:500px){.user-dropdown-item{padding:12px 14px;font-size:0.9rem}}

/* 手机端强制隐藏顶部按钮（只保留头像） */
@media(max-width:500px){#logoutBtn,#saveBtn,#loadBtn{display:none!important}}
