@charset "UTF-8";
.user-avatar-container,
#note-app-core h2,
.toolbar {
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
    animation-delay: 0.1s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 新增骨架屏样式 */
ul.notes:empty::after {
    content: '';
    display: block;
    width: 100%;
    height: 60vh;
    background: 
        linear-gradient(90deg, #f0f2f5 25%, #e6e8eb 50%, #f0f2f5 75%);
    background-size: 400% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
body {
  padding: 20px;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
  background: #f0f2f5;
  min-height: 100vh;
}
.user-avatar-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  z-index: 10;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.9);
  padding: 8px 12px;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.user-avatar {
  border-radius: 50%;
  width: 40px;
  height: 40px;
}
.logout-link {
  color: #666;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
}
.logout-link:hover {
  color: #ff4757;
}

/* 同步指示器容器 */
.sync-indicator {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 280px;
  background: #ffffff;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}

/* 状态颜色 */
.sync-indicator.syncing {
  border-left: 3px solid #1890ff;
}
.sync-indicator.error {
  border-left: 3px solid #ff4d4f;
}
.sync-indicator.has-changes:not(.syncing) {
  animation: attention-pulse 1.5s infinite;
}

/* 进度条 */
.sync-progress {
  height: 2px;
  background: #1890ff;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 内容区域 */
.sync-status-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.sync-status-content:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* 图标容器 */
.status-icon-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 状态图标 */
.status-icon {
  font-size: 20px;
}
.spin-animation {
  animation: spin 1.2s linear infinite;
}

/* 状态文字 */
.status-text {
  line-height: 1.4;
}
.status-title {
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
}
.sync-details {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}

/* 操作按钮 */
.sync-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.retry-btn {
  padding: 4px 8px;
  background: #ff4d4f;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.retry-btn:hover {
  opacity: 0.8;
}
.pending-badge {
  background: #1890ff;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* 动画 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes attention-pulse {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

/* 错误抖动动画 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-3px); }
  40%, 80% { transform: translateX(3px); }
}
#note-app-core {
  max-width: 2200px;
  margin: 0 auto;
  position: relative;
}
#note-app-core h2 {
  color: #2c3e50;
  font-size: 24px;
  text-align: center;
  margin: 20px 0 10px;
}
#note-app-core h4 {
  color: #7f8c8d;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 0 20px;
}
ul.notes {
  column-count: 4;
  column-gap: 20px;
  padding: 20px;
  margin: 0;
  list-style: none;
}
ul.notes li {
  break-inside: avoid;
  margin-bottom: 20px;
  page-break-inside: avoid;
}
ul.notes li > div {
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  position: relative;
  will-change: transform;
}
ul.notes li > div:hover {
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}
ul.notes li > div span.time {
  position: absolute;
  display: flex;
  gap: 15px;
  top: 15px;
  left: 65px;
  font-size: 12px;
  color: #95a5a6;
}
ul.notes li .deleteNote {
  position: absolute;
  top: 10px;
  right: 15px;
  width: 24px;
  height: 24px;
  background: url(../images/shanchu.png) no-repeat center/contain;
  opacity: 0.6;
  transition: 0.3s;
  cursor: pointer;
  z-index: 2;
}
ul.notes li .deleteNote:hover {
  opacity: 1;
  transform: scale(1.1);
}
ul.notes li:hover .deleteNote,
ul.notes li:hover .saveNote {
  opacity: 1;
  transform: scale(1.1);
}
ul.notes li .title input {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  outline: none;
}
ul.notes li .content {
  margin-top: 20px;
}
.newNote .content {
  display: flex;
  flex-direction: column;
  height: calc(100% - 50px);
  overflow: hidden;
}
.auto-height-textarea {
  width: 100%;
  min-height: 200px;
  max-height: 80vh;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ddd;
  resize: none;
  overflow-y: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
  line-height: 2;
  will-change: height;
  outline: none !important;
  transition: height 0.2s ease-out;
}
.auto-height-textarea[data-v-old] {
    min-height: 40px !important;
}
.auto-height-textarea.scroll-active {
  overflow-y: auto !important;
}
.auto-height-textarea[placeholder]:empty::before {
  content: attr(placeholder);
  color: #95a5a6;
  cursor: text;
}
textarea {
  white-space: pre-wrap;
  word-break: break-word;
}
textarea:focus {
  border: 1px solid #00adb5 !important;
  box-shadow: 0 0 5px rgba(0,173,181,0.3);
}
#note-app-core .addNew {
  width: 50px;
  height: 50px;
  background: #fff url(../images/note_add.png) no-repeat center/50%;
  border-radius: 50%;
  position: fixed;
  bottom: 20px;
  right: 20px;
  box-shadow: 0 4px 15px rgba(0,173,181,0.3);
  transition: 0.3s;
  z-index: 1000;
  cursor: pointer;
}
#note-app-core .addNew.addRotate {
  transform: rotate(135deg);
}
.toggle-expand {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #95a5a6;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1;
}
.toggle-expand:hover {
    color: #00adb5;
    transform: scale(1.2);
}
.collapsed-hint {
    display: flex;
    align-items: center;
	text-align: center;
    justify-content: center;
    font-size: 14px;
    color: #95a5a6;
	box-sizing: border-box;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
	line-height: 2;
	padding: 50px 20px;
	white-space: pre-line;
    overflow: hidden;
}
.content-placeholder {
    position: absolute;
    top: 50px;
    left: 30px;
    font-size: 16px;
    color: #95a5a6;
    cursor: text;
    z-index: 1;
}
.newNote {
  position: fixed;
  top: 0;
  right: 0;
  width: 330px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0,0,0,0.1);
  transform: translateX(100%);
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 25px;
  z-index: 999;
}
.newNote.showNote {
  transform: translateX(0);
}
.newNote .customized {
  margin-bottom: 20px;
}
.newNote input {
  width: 95%;
  padding: 10px;
  margin: 10px 0 25px;
  border: 1px solid #eee;
  border-radius: 6px;
}
.newNote .create {
  color: #fff;
  padding: 12px;
  margin-top: 5px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
  display: block;
  z-index: 1;
  background: rgba(0, 173, 181);
}
.newNote .create:hover,
.close-btn:hover,
.toolbar .clear-btn:hover,
button:hover{
  opacity: 0.8;
  transform: translateY(-1px);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: nowrap;
  width: 100%;
}
.toolbar button {
    background: #00adb5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
    transition: 0.3s;
}
.toolbar .clear-btn {
    background: #ff4757 !important;
}
.toolbar .theme-toggle {
    background: #2c3e50 !important;
}
.encrypt-btn {
  position: absolute;
  top: 7px;
  left: 40px;
  z-index: 2;
  cursor: pointer;
}
.encrypt-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}
.encrypt-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  transition: 0.3s;
}
.encrypt-btn:hover .encrypt-icon {
  transform: scale(1.1);
  opacity: 0.9;
}
.security-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff3cd;
  color: #856404;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16);
  z-index: 9999;
  display: flex;
  align-items: center;
  font-size: 14px;
  border: 1px solid #ffeeba;
}
.slide-fade-enter-active {
  transition: all 0.3s ease-out;
}
.slide-fade-leave-active {
  transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
}
.slide-fade-enter-from,
.slide-fade-leave-to {
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
}
/* 前端错误边界实现 */
.note-error-boundary {
  padding: 20px;
  border: 2px solid #ff4444;
  background: #fff0f0;
  text-align: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
/* 调整空白便签的提示样式 */
.content-placeholder {
  opacity: 0.6;
  transition: opacity 0.2s;
}
.content-placeholder:hover {
  opacity: 1;
}
/* 分组管理弹窗 */
.group-manager-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.group-manager-content {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  width: 80%;
  max-width: 400px;
}
.group-manager-content h3 {
  color: #2c3e50;
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 20px;
}
.group-list {
  margin: 15px 0;
}
.group-item {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  align-items: center;
}
.group-item input,
.add-group input{
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.3s;
}
.group-item input:focus {
  border-color: #00adb5;
  box-shadow: 0 0 5px rgba(0,173,181,0.2);
}
.group-item input::placeholder {
  color: #999;
}
.group-item button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #ff4757;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}
.group-item button:disabled {
  background: #95a5a6;
  cursor: not-allowed;
}
.add-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.add-group button {
  background: #00adb5;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}
.close-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(44, 62, 80);
}
.group-select {
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
}

/* 工具栏分组选择样式 */
.toolbar .group-select {
  max-width: 120px;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #00adb5;
  background: rgba(0, 173, 181, 0.1);
  color: #2c3e50;
  cursor: pointer;
  margin: 0;
}
.newNote .group-select {
  border: 1px solid #00adb5;
  background: rgba(0, 173, 181, 0.1);
  color: #2c3e50;
  cursor: pointer;
  margin-bottom: 10px;
}
.pending-indicator {
  color: #ff6b6b;
  animation: pulse 1.5s infinite;
  margin-left: 3px;
}
.sync-details {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 22px;
  z-index: 1001;
  font-size: 13px;
}
.detail-item {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
}
.detail-item.total {
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.label.total {
  color: #666;
  font-weight: bold;
}
.label {
  color: #666;
}
.label.added { color: #4CAF50; }
.label.updated { color: #2196F3; }
.label.deleted { color: #f44336; }
.error-message {
  color: #f44336;
  margin-top: 10px;
  word-break: break-word;
  max-width: 200px;
}
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}
.count-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 8px;
  font-weight: 700;
}

/* 深色模式样式 */
html.io-black-mode {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --card-bg: #2d2d2d;
  --border-color: #404040;
}

html.io-black-mode body.note-app-body {
  background: #1a1a1a;
  color: #e0e0e0;
}

html.io-black-mode ul.notes li > div {
  background: var(--card-bg) !important;
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}

html.io-black-mode .auto-height-textarea {
  background: var(--card-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

html.io-black-mode .toolbar button:not(.clear-btn) {
  background: #3d3d3d;
}

html.io-black-mode .toggle-expand,
html.io-black-mode ul.notes li > div span.time {
  color: #888;
}

html.io-black-mode .content-placeholder {
  color: #666;
}

html.io-black-mode .collapsed-hint {
  background: rgba(45,45,45,0.5);
  color: #888;
}

html.io-black-mode .security-alert {
  background: #3d2e1a;
  color: #ffd8a8;
  border-color: #4a3a25;
}

html.io-black-mode .toolbar .theme-toggle {
  color: #2d2d2d;
  background: #e0e0e0 !important;
}
html.io-black-mode .newNote{
  background: #2d2d2d;
}
html.io-black-mode #myNote>h2{
  color: #fff;
}
html.io-black-mode .group-manager-content {
  background: #2d2d2d;
  color: #e0e0e0;
}
html.io-black-mode .group-manager-content h3 {
  color: #e0e0e0;
}
html.io-black-mode .group-item input,
html.io-black-mode .add-group input{
  background: #3d3d3d;
  border-color: #555;
  color: #fff;
}
html.io-black-mode .toolbar .group-select,
html.io-black-mode .user-avatar-container,{
  background: #3d3d3d;
  border-color: #555;
  color: #e0e0e0;
}
html.io-black-mode .logout-link{
  color: #e0e0e0;
}
html.io-black-mode .newNote .group-select {
  background: #3d3d3d;
  border-color: #555;
  color: #e0e0e0;
}
html.io-black-mode .newNote .group-select {
  background: #3d3d3d;
  border-color: #555;
  color: #e0e0e0;
}
html.io-black-mode .group-manager-content p {
  color: #888;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track-piece {
  background-color: #e8e8e8;
  -webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:vertical {
  height: 5px;
  background-color: #999;
  -webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:horizontal {
  width: 5px;
  background-color: #e8e8e8;
  -webkit-border-radius: 6px;
}
@media (max-width: 1720px) {
  ul.notes {
    column-count: 3;
  }
}
@media (max-width: 1440px) {
  ul.notes {
    column-count: 2;
  }
}
@media (max-width: 576px) {
  ul.notes {
    column-count: 1;
  }
  #note-app-core .addNew {
    bottom: 15px;
    left: 15px;
  }
  ul.notes li .deleteNote {
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
  }

  ul.notes li > div span.time {
    right: 40px;
    font-size: 10px;
  }
  .auto-height-textarea {
    font-size: 14px !important;
  }
  .toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
  }
  .import-btn,
  .export-btn {
    display: none !important;
  }
  .toolbar button {
    flex-shrink: 0;
    padding: 8px 8px;
    font-size: 14px;
    min-width: fit-content;
  }
  .toolbar .group-select{
  max-width: 100px;
  padding: 8px;
  }
  .clear-btn {
    background: #ff4757 !important;
  }
}