*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto}
header{padding:12px;border-bottom:1px solid #eee;display:flex;justify-content:space-between;align-items:center}
.row{display:flex;gap:8px;align-items:center}
main{display:flex;height:calc(100vh - 64px)}
aside{width:300px;border-right:1px solid #eee;overflow:auto;padding:8px}
#imageList{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}
#imageList li{padding:6px;border:1px solid #ddd;border-radius:6px;cursor:pointer}
#imageList li.active{background:#f2f6ff;border-color:#8aa8ff}
#work{flex:1;display:flex;flex-direction:column}



#canvasWrap {
    flex: 1;
    background: #111;
    /* 这里可以不用居中，否则容易误导自己画布很小 */
    display: flex;
  }
  
  #canvas {
    flex: 1;            /* 在 flex 容器里占满空间 */
    width: 100%;        /* 宽度占满父容器 */
    height: 100%;       /* 高度占满父容器 */
    border: 1px solid #444;
    display: block;
  }

#panel{padding:8px;border-top:1px solid #eee}
#tips{color:#888;margin-top:4px}
.login{position:fixed;inset:0;background:#fff;display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center;z-index:9999}
.login input{padding:8px;font-size:16px}
.login button{padding:8px 12px}
.hidden{display:none!important}




#annotationPopup {
  position: absolute;
  z-index: 10;
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 14px;
  min-width: 220px;
}

#annotationPopup.hidden {
  display: none;
}

#annotationPopup .popup-row {
  margin-bottom: 6px;
}

#annotationPopup .popup-row label {
  display: flex;
  align-items: center;
  gap: 4px;
}

#annotationPopup .popup-row input,
#annotationPopup .popup-row select {
  flex: 1;
}

#annotationPopup .popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}







#canvasWrap {
  position: relative;
}

#annotationPopup {
  position: absolute;
  z-index: 10;
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 14px;
  min-width: 220px;
}

#annotationPopup.hidden {
  display: none;
}

#annotationPopup .popup-row {
  margin-bottom: 6px;
}

#annotationPopup .popup-row label {
  display: flex;
  align-items: center;
  gap: 4px;
}

#annotationPopup .popup-row input,
#annotationPopup .popup-row select {
  flex: 1;
}

#annotationPopup .popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}





/* ============ 基础 ============ */
:root {
  --bg-main: #030415;
  --bg-gradient: radial-gradient(circle at top, #1a2b6b 0, #030415 55%, #000000 100%);
  --card-bg: rgba(11, 18, 48, 0.88);
  --border-soft: rgba(126, 143, 255, 0.3);

  --text-main: #f7f8ff;
  --text-sub: #9ca7ff;
  --text-muted: #6e7597;

  --accent: #47f4ff;
  --accent-strong: #ff2ddf;
  --danger: #ff5b6b;

  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.6);
  --shadow-neon: 0 0 18px rgba(71, 244, 255, 0.75);

  --transition-fast: 0.16s ease-out;
  --transition-med: 0.24s ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.dark-neon {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(135, 148, 255, 0.4);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(135, 148, 255, 0.7);
}

/* ============ 玻璃卡片 ============ */
.glass-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}


#annotationPopup {
  /* 深色半透明背景 */
  background: rgba(15, 23, 42, 0.95); /* 深蓝灰，你也可以换成 #111827 之类的纯色 */
  color: #f9fafb;                     /* 字体改成浅色，避免太暗看不见 */
}


/* 浮窗每一行：暗黑霓虹背景 + 浅色文字 */
.annotation-popup .popup-row {
  background: linear-gradient(135deg, #0f172a, #020617); /* 简单暗黑渐变 */
  color: #f9fafb;
  padding: 4px 8px;           /* 让背景稍微露出来一点 */
  border-radius: 6px;
  margin-bottom: 6px;         /* 行与行之间留点空隙，可选 */
}

/* label 跟随这一行，统一用浅色文字 */
.annotation-popup label {
  color: inherit;
}

/* ============ 顶部 Header ============ */
.app-header {
  margin: 12px 16px 0;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.logo-text {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(71, 244, 255, 0.9);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-sub);
  opacity: 0.85;
}

.header-row {
  justify-content: space-between;
  align-items: center;
}

/* ============ 布局 ============ */
.layout {
  flex: 1;
  display: grid;
  /* 左 1/6 ，右 5/6 */
  grid-template-columns: minmax(0, 1fr) minmax(0, 5fr);
  gap: 12px;
  padding: 12px 16px 16px;
  min-height: 0;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 230px minmax(0, 1.9fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .side-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
}

@media (max-width: 800px) {
  body.dark-neon {
    overflow: auto;
  }

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .sidebar,
  .work-area,
  .side-panel {
    min-height: unset;
  }

  .side-panel {
    order: 2;
  }

  .work-area {
    display: flex;
    /* 让内部的 side-panel 吃满高度 */
    height: 100%;
  }
}

/* ============ 侧边栏 ============ */
.sidebar {
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.day-switch {
  justify-content: space-between;
}

.image-list {
  list-style: none;
  margin: 0;
  padding: 4px 4px 4px 0;
  overflow-y: auto;
  flex: 1;
  font-size: 13px;
}

.image-list li {
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-sub);
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

.image-list li:hover {
  background: rgba(71, 244, 255, 0.08);
  color: var(--text-main);
  transform: translateY(-1px);
}

.image-list li.active {
  background: rgba(71, 244, 255, 0.15);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(71, 244, 255, 0.7);
}

/* ============ 工作区 & 画布 ============ */
.work-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.canvas-wrap {
  position: relative;
  flex: 1;          /* 关键：占满剩余空间 */
  min-height: 0;
  margin-top: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#canvas {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at center, #1b2148 0, #05071b 50%, #000 100%);
  box-shadow: 0 0 0 1px rgba(122, 138, 255, 0.2), 0 14px 45px rgba(0, 0, 0, 0.85);
}

/* 浮动标注弹窗 */
.annotation-popup {
  position: absolute;
  /* 关键：不要被通用的 glass-card 样式拉伸 */
  width: auto;
  max-width: 320px;   /* 自己调，比如 260 / 300 / 360 */
  min-width: 220px;   /* 可选：给个最小宽度，看起来更稳定 */
  box-sizing: border-box;
  flex: none;         /* 如果外面是 flex 布局，防止被拉伸 */
}

/* 如果你的 .glass-card 有 width: 100% 之类，可以强行覆盖一次 */
#annotationPopup.glass-card {
  width: auto;
  max-width: 320px;
}

.annotation-popup.hidden {
  display: none;
}

.popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.popup-row label {
  flex: 1;
}

.popup-row .full {
  width: 100%;
}

.popup-actions {
  justify-content: flex-end;
}

/* ============ 面板 ============ */
.side-panel {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  font-size: 14px;
  overflow: hidden;   /* 防止内部溢出把卡片撑坏 */
}

.panel-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-row + .panel-row {
  margin-top: 4px;
}

.label {
  color: var(--text-muted);
}

.value {
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.tips {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ 输入 & 按钮 ============ */
.inline-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.input {
  outline: none;
  border-radius: 999px;
  border: 1px solid rgba(112, 126, 255, 0.6);
  background: rgba(14, 17, 40, 0.9);
  color: var(--text-main);
  padding: 6px 10px;
  font-size: 13px;
  min-width: 0;
  transition: border var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.input::placeholder {
  color: rgba(158, 169, 255, 0.6);
}

.input:focus {
  border-color: var(--accent);
  background: rgba(8, 12, 34, 1);
  box-shadow: 0 0 12px rgba(71, 244, 255, 0.6);
  transform: translateY(-0.5px);
}

select.input {
  padding-right: 26px;
}

/* 按钮 */
button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  position: relative;
  border-radius: 999px;
  border: 1px solid rgba(135, 148, 255, 0.8);
  background: linear-gradient(135deg, rgba(11, 17, 48, 0.9), rgba(21, 30, 69, 0.95));
  color: var(--text-main);
  padding: 6px 14px;
  font-size: 13px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition-med), box-shadow var(--transition-med),
    transform var(--transition-fast), border var(--transition-fast);
  white-space: nowrap;
}

.btn:hover {
  background: linear-gradient(135deg, rgba(25, 37, 91, 1), rgba(54, 65, 130, 1));
  box-shadow: 0 0 14px rgba(128, 143, 255, 0.6);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(128, 143, 255, 0.8);
}

/* 主要按钮 */
.btn.primary {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(71, 244, 255, 0.4);
}

/* 霓虹按钮（用于“审核完毕”） */
.btn.neon {
  border-color: var(--accent-strong);
  background: radial-gradient(circle at top left, rgba(255, 45, 223, 0.85), rgba(12, 20, 61, 0.95));
  box-shadow: var(--shadow-neon), 0 0 28px rgba(255, 45, 223, 0.75);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.btn.neon:hover {
  box-shadow: 0 0 18px rgba(71, 244, 255, 0.95), 0 0 38px rgba(255, 45, 223, 0.9);
}

/* 透明按钮 */
.btn.ghost {
  background: rgba(9, 13, 33, 0.4);
  border-color: rgba(128, 143, 255, 0.55);
}

.btn.ghost:hover {
  background: rgba(33, 42, 90, 0.9);
}

/* 小号按钮 */
.btn.tiny {
  padding: 4px 10px;
  font-size: 12px;
}

/* 宽按钮 */
.btn.wide {
  width: 100%;
  justify-content: center;
}

/* 行布局通用 */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============ 登录层 ============ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(12, 26, 61, 0.96), rgba(2, 3, 12, 0.96));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.login-card {
  max-width: 360px;
  width: 88%;
  padding: 20px 22px 16px;
  text-align: center;
  border-radius: 28px;
  box-shadow: var(--shadow-soft), 0 0 30px rgba(71, 244, 255, 0.5);
}

.login-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-group {
  margin-bottom: 10px;
}

.login-card input {
  width: 100%;
}

#loginBtn {
  margin-top: 4px;
  width: 100%;
}

#loginMsg.msg {
  margin-top: 8px;
  font-size: 12px;
  min-height: 16px;
  color: var(--danger);
}

/* 登录隐藏时（你可以在 JS 里加 login-overlay.hidden 类） */
.login-overlay.hidden {
  display: none;
}
