<style>
  /* 编辑器样式 */
  .editor-container {
    scrollbar-width: thin; 
    scroll-behavior: smooth; 
    scroll-padding-bottom: 0px; 
    width: 100%; 
    height: 100%; 
    opacity: 1;
  }
  
  /* Print styles - hide everything except the editor content */
  @media print {
    body * {
      visibility: hidden;
    }
    #editor, #editor * {
      visibility: visible;
    }
    #editor {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: auto;
      min-height: 100%;
      overflow: visible;
      border: none;
      box-shadow: none;
      background: white !important;
      color: black !important;
      font-size: 12pt;
      white-space: pre-wrap;
      page-break-inside: auto;
    }
  }

  .editor {
    outline: none;
    resize: none;
    color: var(--text-color);
    caret-color: var(--primary-color);
  }
  
  .editor::placeholder {
    color: var(--text-color-secondary);
    opacity: 0.6;
    color: var(--text-color-secondary);
    opacity: 0.6;
  }



  /* 模态框样式 */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    align-items: center;
    justify-content: center;
  }

  .modal-content {
    background-color: var(--modal-bg);
    overflow: hidden;
    width: 90%;
    max-width: 500px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.08) !important;
  }
  
  .modal-header{
    color: var(--bg-color);
    background-color: var(--modal-header);
  }
  .input-bg{
    color: var(--text-color);
    background-color: var(--modal-bg);
    border: 1px solid var(--border-color);
  }
  
  /* 自定义单选按钮样式 */
  input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    outline: none;
    transition: all 0.2s ease;
    position: relative;
    vertical-align: middle;
  }
  
  input[type="radio"]:checked {
    border-color: var(--primary-color);
    background-color: transparent;
  }
  
  input[type="radio"]:checked:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
  }

  .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
  }

  .share-link-container {
    display: flex;
    margin: 15px 0;
  }

  .share-link {
    flex: 1;
    outline: none;
    font-size: 14px;
  }

  .copy-btn {
    padding: 2px 20px;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
  }

  /* 全屏模式 */
  :fullscreen {
    background-color: var(--bg-color);
  }
  
  :-webkit-full-screen {
    background-color: var(--bg-color);
  }
  
  /* 在移动设备上隐藏全屏按钮 */
  @media (max-width: 768px) {
    #fullscreen-btn {
      display: none;
    }
  }

  /* 响应式设计 */
  @media (max-width: 768px) {

    
    .editor {
      font-size: 16px;
      padding: 15px;
    }
  }
  
  /* Read-only mode styles */
  .shared-note-view .editor {
    background-color: rgba(0, 0, 0, 0.03);
    cursor: default;
  }
  
  .dark-theme.shared-note-view .editor {
    background-color: rgba(255, 255, 255, 0.03);
  }
  

  /* 工具按钮 */
  .tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: background-color 0.2s;
  }
  .tool-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
  }
  .dark-theme .tool-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* 工具提示 */
  .tooltip {
    position: relative;
    display: inline-block;
  }
  .tooltip .tooltiptext {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    padding: 4px 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
  }
  .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }
  
  .colorbox {
    width: 20px;
    height: 20px;
    display: inline-block;
    border-radius: 3px;
    margin-right: 5px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
  }
  
  .dark-theme .colorbox {
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .tooltip-bottom .tooltiptext {
    top: 125%;
    bottom: auto;
  }
  
  /* 工具面板 */
  .tools-panel {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px;
    z-index: 10;
  }
  
  /* 字数统计浮动框 */
  .word-count-container {
    position: fixed;
    right: 20px;
    bottom: 80px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    z-index: 1000;
  }
  
  /* 纸质感终极解决方案 */
  .e-ink-texture {
    position: relative;
    background-color: #e8e6e3 !important;
    background-image: url("/assets/noise-texture.svg") !important;
    background-size: 80px 80px !important;
    background-position: center !important;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.08) !important;
  }
  
  .e-ink-texture::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(to right, transparent, transparent 2px, rgba(0, 0, 0, 0.03) 2px, transparent 4px);
    background-size: 4px 100%;
    opacity: 0.4;
    pointer-events: none;
  }
  
  /* 深色模式下的纸质感 */
  .dark-theme .e-ink-texture {
    background-color: #333333 !important;
    filter: brightness(0.8) !important;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.2) !important;
  }

  .drawer-bg{
    background-color: var(--bg-color);
    color: var(--text-color);
  }
  
  /* Writer Mode CTA Toast */
  #writer-mode-cta {
    z-index: 50;
    animation: ctaSlideUp 0.4s ease-out;
  }
  #writer-mode-cta.hidden {
    display: none;
  }
  #writer-mode-cta .cta-card {
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  #writer-mode-cta .cta-card:hover {
    transform: translateY(-2px);
    opacity: 0.9;
  }
  #writer-mode-cta .cta-close {
    font-size: 16px;
    line-height: 1;
    opacity: 0.4;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
  }
  #writer-mode-cta .cta-close:hover {
    opacity: 0.8;
  }
  @keyframes ctaSlideUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
</style>
