:root { --accent: #6366f1; --accent-light: #818cf8; --text: #e8ecf1; --text2: #94a3b8; --text3: #64748b; --border: rgba(255,255,255,0.08); }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; background: #060913; color: var(--text); }
.page-loader { position: fixed; inset: 0; z-index: 9999; background: #060913; display: flex; align-items: center; justify-content: center; }
.page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-spin { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.08); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #060913, #0c1124, #060913); }
.auth-container { width: 400px; max-width: 92vw; }
.auth-card { background: rgba(17,24,39,0.85); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 44px 36px; backdrop-filter: blur(20px); }
.auth-logo { text-align: center; margin-bottom: 8px; }
.auth-logo-icon { width: 56px; height: 56px; margin: 0 auto 12px; background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3); border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.auth-logo h1 { font-size: 24px; font-weight: 700; }
.auth-logo p { font-size: 13px; color: var(--text3); }
.auth-form { margin-top: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text3); margin-bottom: 5px; }
.form-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.04); color: var(--text); font-size: 14px; font-family: inherit; outline: none; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.form-error { color: #ef4444; font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.03); color: var(--text2); font-size: 14px; font-family: inherit; cursor: pointer; transition: .2s; }
.btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 500; }
.btn-primary:hover { background: var(--accent-light); }
.btn-full { width: 100%; }
.btn-outline { background: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 4px; }
.btn:disabled { opacity: .4; pointer-events: none; }
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 500; box-shadow: 0 8px 32px rgba(0,0,0,0.5); animation: slideIn .3s; max-width: 380px; color: #fff; pointer-events: auto; }
.toast-success { background: #10b981; } .toast-error { background: #ef4444; } .toast-info { background: #6366f1; } .toast-warning { background: #f59e0b; color: #1e293b; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; }
.modal { background: #111827; border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); width: 460px; max-width: 92vw; max-height: 85vh; display: flex; flex-direction: column; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close { width: 32px; height: 32px; border: none; background: none; font-size: 22px; cursor: pointer; color: #64748b; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: rgba(255,255,255,0.08); color: #e8ecf1; }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; }
.modal-footer { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,0.06); justify-content: flex-end; }
.strength-bar { height: 4px; border-radius: 2px; margin-top: 6px; background: rgba(255,255,255,0.06); overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; transition: width .3s; }
.strength-label { font-size: 11px; margin-top: 4px; font-weight: 500; }
.input-eye-wrap { position: relative; display: flex; align-items: center; }
.input-eye-wrap .form-input { padding-right: 42px; }
.eye-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 6px; color: #64748b; border-radius: 6px; display: flex; }
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 52px; background: rgba(10,15,30,0.85); border-bottom: 1px solid rgba(255,255,255,0.06); backdrop-filter: blur(12px); z-index: 100; }
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-logo { font-size: 18px; font-weight: 700; color: #818cf8; }
.nav-sub { font-size: 11px; color: #64748b; border-left: 1px solid rgba(255,255,255,0.06); padding-left: 10px; }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-user { font-size: 12px; color: #64748b; padding: 0 10px; border-right: 1px solid rgba(255,255,255,0.06); }
.nav-lock-status { display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 14px; font-size: 11px; font-weight: 600; }
.nav-lock-unlocked { background: rgba(16,185,129,0.12); color: #10b981; }
.nav-lock-locked { background: rgba(239,68,68,0.12); color: #ef4444; }
.nav-lock-dot { width: 6px; height: 6px; border-radius: 50%; }
.nav-lock-unlocked .nav-lock-dot { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.nav-lock-locked .nav-lock-dot { background: #ef4444; }
.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 20px; height: 2px; background: #e8ecf1; border-radius: 1px; transition: .2s; }
.app-layout { display: flex; height: calc(100vh - 52px); overflow: hidden; }
.sidebar { width: 220px; flex-shrink: 0; background: rgba(255,255,255,0.015); border-right: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; overflow: hidden; }
.sidebar-header { padding: 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-header h3 { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .8px; }
.sidebar-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.sidebar-section { padding: 8px 16px 4px; font-size: 10px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .6px; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin: 1px 10px; border-radius: 8px; cursor: pointer; color: #94a3b8; font-size: 13px; transition: .15s; position: relative; border-left: 2px solid transparent; }
.sidebar-item:hover { background: rgba(255,255,255,0.05); color: #e8ecf1; }
.sidebar-item.active { background: rgba(99,102,241,0.08); color: #818cf8; border-left-color: #818cf8; }
.sidebar-item svg { flex-shrink: 0; opacity: .6; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-item-actions { display: none; gap: 2px; position: absolute; right: 10px; background: rgba(10,15,30,0.95); border-radius: 5px; }
.sidebar-item:hover .sidebar-item-actions { display: flex; }
.sidebar-act-btn { background: none; border: none; color: #64748b; cursor: pointer; font-size: 11px; padding: 2px 5px; border-radius: 3px; }
.sidebar-act-btn:hover { color: #e8ecf1; background: rgba(255,255,255,0.08); }
.sidebar-act-del:hover { color: #ef4444; }
.sidebar-add { padding: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.sidebar-add .btn { width: 100%; justify-content: center; font-size: 12px; }
.vault-entry { border-top: 1px solid rgba(255,255,255,0.06); padding: 6px 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 145; }
.sidebar-toggle-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.sidebar-toggle-btn span { display: block; width: 20px; height: 2px; background: #94a3b8; border-radius: 2px; }
.sidebar-close-btn { display: none; background: none; border: none; color: #94a3b8; font-size: 24px; cursor: pointer; }
.note-list-panel { width: 320px; flex-shrink: 0; border-right: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; overflow: hidden; }
.note-list-toolbar { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; gap: 8px; align-items: center; }
.note-list-scroll { flex: 1; overflow-y: auto; }
.note-list-empty { padding: 48px 20px; text-align: center; color: #64748b; font-size: 13px; }
.note-list-empty svg { display: block; margin: 0 auto 14px; opacity: .3; }
.note-item { padding: 14px; margin: 2px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: .15s; }
.note-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.06); }
.note-item.active { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.25); }
.note-item-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item-meta { font-size: 11px; color: #64748b; }
.editor-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.editor-toolbar { padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.editor-body { flex: 1; display: flex; overflow: hidden; }
.editor-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.editor-input { flex: 1; width: 100%; border: none; padding: 20px; background: transparent; color: #e8ecf1; font-family: "SF Mono","Consolas",monospace; font-size: 14px; line-height: 1.8; resize: none; outline: none; }
.editor-input::placeholder { color: #64748b; }
.editor-preview { flex: 1; padding: 20px; overflow-y: auto; border-left: 1px solid rgba(255,255,255,0.06); font-size: 14px; line-height: 1.8; display: none; }
.editor-preview h1,.editor-preview h2,.editor-preview h3 { margin: 16px 0 8px; font-weight: 600; }
.editor-preview h1 { font-size: 1.4em; border-bottom: 1px solid rgba(255,255,255,0.06); padding-bottom: 8px; }
.editor-preview code { background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; font-family: "SF Mono","Consolas",monospace; font-size: .9em; }
.editor-preview pre { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 12px 0; font-family: "SF Mono","Consolas",monospace; font-size: 13px; line-height: 1.6; }
.editor-preview pre.secret-block { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.2); position: relative; }
.secret-masked { filter: blur(8px); cursor: pointer; transition: filter .3s; user-select: none; }
.secret-masked:hover { filter: blur(4px); }
.secret-revealed { filter: none; }
.editor-preview blockquote { border-left: 3px solid #6366f1; padding: 4px 14px; color: #94a3b8; margin: 12px 0; background: rgba(99,102,241,0.04); border-radius: 0 8px 8px 0; }
.editor-preview a { color: #818cf8; }
.editor-preview img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.editor-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 12px 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pw-gen { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.pw-gen-output { flex: 1; padding: 7px 12px; border-radius: 8px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.06); font-family: "SF Mono","Consolas",monospace; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-gen-options { display: flex; align-items: center; gap: 8px; }
.pw-gen-options label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #64748b; cursor: pointer; }
.pw-gen-options input[type=range] { width: 60px; accent-color: #6366f1; }
.template-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.template-card { padding: 12px; border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; cursor: pointer; transition: .15s; background: rgba(255,255,255,0.03); }
.template-card:hover { border-color: #6366f1; background: rgba(99,102,241,0.15); }
.template-card-icon { font-size: 20px; margin-bottom: 6px; }
.template-card-title { font-size: 13px; font-weight: 600; }
.share-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg,#060913,#0c1124,#060913); padding: 24px; }
.share-card { width: 100%; max-width: 680px; background: rgba(17,24,39,0.85); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; overflow: hidden; backdrop-filter: blur(20px); box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.share-card-header { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 12px; }
.share-card-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3); display: flex; align-items: center; justify-content: center; }
.share-card-body { padding: 24px; }
.share-info-bar { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 16px; background: rgba(255,255,255,0.03); border-radius: 8px; margin-bottom: 20px; }
.share-info-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.share-expired { text-align: center; padding: 48px 24px; }
.share-expired-icon { font-size: 48px; margin-bottom: 16px; opacity: .6; }
.form-hint { display: block; font-size: 11px; color: #64748b; margin-top: 4px; }
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-right { display: none; position: absolute; top: 52px; left: 0; right: 0; background: #0c1124; flex-direction: column; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 110; }
  .nav-right.open { display: flex; }
  .nav-sub { display: none; }
  .app-layout { flex-direction: column; }
  .sidebar { position: fixed; left: 0; top: 52px; bottom: 0; width: 260px; z-index: 150; transform: translateX(-100%); transition: transform .3s; background: #0c1124; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .sidebar-toggle-btn { display: flex; }
  .sidebar-close-btn { display: block; }
  .note-list-panel { width: 100%; flex: 1; }
  .editor-panel { display: none; }
  .editor-panel.mobile-open { display: flex; position: fixed; inset: 52px 0 0 0; z-index: 140; background: #060913; }
  .editor-body { flex-direction: column; }
  .editor-preview { border-left: none; border-top: 1px solid rgba(255,255,255,0.06); }
}
@media (max-width: 480px) {
  .auth-card { padding: 32px 20px; }
  .template-grid { grid-template-columns: 1fr; }
}
