Files

1213 lines
21 KiB
CSS

@import "tailwindcss";
/* ===== CSS Variables / Theme ===== */
:root,
[data-theme="light"] {
--bg-primary: #ffffff;
--bg-secondary: #f8f9fa;
--bg-tertiary: #f0f1f3;
--bg-hover: #e9ecef;
--bg-active: #dbeafe;
--bg-sidebar: #f8f9fa;
--text-primary: #1a1a2e;
--text-secondary: #6b7280;
--text-tertiary: #9ca3af;
--border-color: #e5e7eb;
--border-light: #f0f1f3;
--accent: #3b82f6;
--accent-hover: #2563eb;
--accent-light: #dbeafe;
--danger: #ef4444;
--danger-hover: #dc2626;
--danger-light: #fee2e2;
--pin-color: #f59e0b;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
--shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
--radius: 8px;
--radius-sm: 6px;
--radius-lg: 12px;
--transition: 150ms ease;
--font-sans: var(--font-geist-sans), system-ui, -apple-system, sans-serif;
--font-mono: var(--font-geist-mono), "Fira Code", "JetBrains Mono", monospace;
}
[data-theme="dark"] {
--bg-primary: #0f0f17;
--bg-secondary: #16161f;
--bg-tertiary: #1e1e2a;
--bg-hover: #262636;
--bg-active: #1e3a5f;
--bg-sidebar: #12121a;
--text-primary: #e5e7eb;
--text-secondary: #9ca3af;
--text-tertiary: #6b7280;
--border-color: #2a2a3a;
--border-light: #1e1e2a;
--accent: #60a5fa;
--accent-hover: #3b82f6;
--accent-light: #1e3a5f;
--danger: #f87171;
--danger-hover: #ef4444;
--danger-light: #3b1111;
--pin-color: #fbbf24;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
--shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.5);
}
/* ===== Reset & Base ===== */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
min-height: 100%;
}
body {
font-family: var(--font-sans);
background: var(--bg-primary);
color: var(--text-primary);
overflow-x: hidden;
overflow-y: auto;
transition: background var(--transition), color var(--transition);
}
.site-shell {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
}
/* ===== Layout ===== */
.app-container {
display: flex;
height: 100vh;
overflow: hidden;
}
/* ===== Site Footer ===== */
.site-footer {
border-top: 1px solid var(--border-color);
background:
radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 34%),
linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
padding: 40px 24px 28px;
}
.site-footer-inner {
max-width: 1200px;
margin: 0 auto;
display: grid;
grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
gap: 28px;
}
.site-footer-brand {
display: flex;
flex-direction: column;
gap: 16px;
}
.site-footer-logo {
display: inline-flex;
align-items: center;
gap: 10px;
font-size: 22px;
font-weight: 700;
letter-spacing: -0.4px;
}
.site-footer-mark {
display: block;
width: 34px;
height: 34px;
border-radius: 10px;
}
.site-footer-description {
max-width: 34rem;
font-size: 15px;
line-height: 1.7;
color: var(--text-secondary);
}
.site-footer-badges {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.site-footer-badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
border: 1px solid var(--border-color);
border-radius: 999px;
background: var(--bg-primary);
color: var(--text-secondary);
font-size: 12px;
}
.site-footer-column {
display: flex;
flex-direction: column;
gap: 14px;
}
.site-footer-heading {
font-size: 13px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-tertiary);
}
.site-footer-links {
display: flex;
flex-direction: column;
gap: 10px;
}
.site-footer-link {
color: var(--text-primary);
text-decoration: none;
font-size: 15px;
line-height: 1.5;
transition: color var(--transition);
}
.site-footer-link:hover {
color: var(--accent);
}
.site-footer-link-muted {
color: var(--text-secondary);
}
.site-footer-bottom {
max-width: 1200px;
margin: 28px auto 0;
padding-top: 20px;
border-top: 1px solid var(--border-light);
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
color: var(--text-tertiary);
font-size: 13px;
}
.site-footer-bottom strong {
color: var(--text-primary);
}
.legal-page {
flex: 1;
width: 100%;
max-width: 1100px;
margin: 0 auto;
padding: 80px 24px 96px;
}
.legal-page-hero {
display: flex;
flex-direction: column;
gap: 14px;
max-width: 46rem;
margin-bottom: 32px;
}
.legal-page-kicker {
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.12em;
color: var(--accent);
}
.legal-page-title {
font-size: clamp(2rem, 4vw, 3.2rem);
line-height: 1.05;
letter-spacing: -0.05em;
}
.legal-page-intro {
font-size: 18px;
line-height: 1.7;
color: var(--text-secondary);
}
.legal-page-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 18px;
}
.legal-card {
padding: 24px;
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
box-shadow: var(--shadow-sm);
}
.legal-card h2 {
margin-bottom: 12px;
font-size: 20px;
letter-spacing: -0.02em;
}
.legal-card p,
.legal-card li {
font-size: 15px;
line-height: 1.7;
color: var(--text-secondary);
}
.legal-card ul {
padding-left: 18px;
}
.legal-page-link {
color: var(--accent);
text-decoration: none;
}
.legal-page-link:hover {
text-decoration: underline;
}
/* ===== Loading ===== */
.loading-screen {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background: var(--bg-primary);
}
.loading-spinner {
width: 32px;
height: 32px;
border: 3px solid var(--border-color);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ===== Sidebar ===== */
.sidebar {
width: 300px;
min-width: 300px;
height: 100vh;
display: flex;
flex-direction: column;
background: var(--bg-sidebar);
border-right: 1px solid var(--border-color);
transition: all var(--transition);
overflow: hidden;
}
.sidebar-collapsed {
width: 52px;
min-width: 52px;
align-items: center;
padding-top: 12px;
gap: 8px;
}
.sidebar-header {
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
border-bottom: 1px solid var(--border-color);
}
.sidebar-title-row {
display: flex;
align-items: center;
justify-content: space-between;
}
.sidebar-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 18px;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.3px;
}
/* ===== Search ===== */
.search-bar {
position: relative;
}
.search-icon {
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
color: var(--text-tertiary);
pointer-events: none;
}
.search-input {
width: 100%;
padding: 8px 12px 8px 34px;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
background: var(--bg-primary);
color: var(--text-primary);
font-size: 13px;
outline: none;
transition: border var(--transition), box-shadow var(--transition);
}
.search-input:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-light);
}
.search-input::placeholder {
color: var(--text-tertiary);
}
/* ===== Sidebar Actions ===== */
.sidebar-actions {
display: flex;
align-items: center;
gap: 8px;
}
.sort-buttons {
display: flex;
gap: 2px;
margin-left: auto;
}
.btn-sort {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
border: none;
border-radius: var(--radius-sm);
background: transparent;
color: var(--text-tertiary);
cursor: pointer;
transition: all var(--transition);
}
.btn-sort:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.btn-sort.active {
background: var(--accent-light);
color: var(--accent);
}
/* ===== Buttons ===== */
.btn-primary {
display: flex;
align-items: center;
gap: 6px;
padding: 7px 14px;
border: none;
border-radius: var(--radius-sm);
background: var(--accent);
color: #fff;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all var(--transition);
white-space: nowrap;
}
.btn-primary:hover {
background: var(--accent-hover);
box-shadow: var(--shadow-sm);
}
.btn-icon {
display: flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
border: none;
border-radius: var(--radius-sm);
background: transparent;
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition);
}
.btn-icon:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.btn-icon-sm {
display: flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
border: none;
border-radius: 4px;
background: transparent;
color: var(--text-tertiary);
cursor: pointer;
transition: all var(--transition);
}
.btn-icon-sm:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.btn-icon-sm.pinned {
color: var(--pin-color);
}
.btn-icon-sm.btn-danger:hover {
background: var(--danger-light);
color: var(--danger);
}
.btn-new-note {
background: var(--accent);
color: #fff !important;
border-radius: var(--radius-sm);
}
.btn-new-note:hover {
background: var(--accent-hover);
}
/* ===== Notes List ===== */
.notes-list {
flex: 1;
overflow-y: auto;
padding: 8px;
}
.notes-list::-webkit-scrollbar {
width: 4px;
}
.notes-list::-webkit-scrollbar-thumb {
background: var(--border-color);
border-radius: 4px;
}
.empty-state {
display: flex;
align-items: center;
justify-content: center;
height: 120px;
color: var(--text-tertiary);
font-size: 14px;
}
.note-item {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 10px 12px;
border-radius: var(--radius-sm);
cursor: pointer;
transition: all var(--transition);
margin-bottom: 2px;
position: relative;
}
.note-item:hover {
background: var(--bg-hover);
}
.note-item.active {
background: var(--bg-active);
}
.note-item-content {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 3px;
}
.note-item-title {
display: flex;
align-items: center;
gap: 5px;
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pin-indicator {
color: var(--pin-color);
flex-shrink: 0;
}
.note-item-preview {
font-size: 12px;
color: var(--text-secondary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.note-item-date {
font-size: 11px;
color: var(--text-tertiary);
}
.note-item-actions {
display: flex;
align-items: center;
gap: 2px;
flex-shrink: 0;
animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateX(4px); }
to { opacity: 1; transform: translateX(0); }
}
/* ===== Sidebar Footer ===== */
.sidebar-footer {
padding: 12px 16px;
border-top: 1px solid var(--border-color);
}
.btn-delete-all {
display: flex;
align-items: center;
gap: 6px;
width: 100%;
padding: 7px 12px;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
background: transparent;
color: var(--text-secondary);
font-size: 12px;
cursor: pointer;
transition: all var(--transition);
}
.btn-delete-all:hover {
border-color: var(--danger);
color: var(--danger);
background: var(--danger-light);
}
.confirm-delete-all {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--text-secondary);
}
.btn-confirm-yes {
padding: 4px 12px;
border: none;
border-radius: 4px;
background: var(--danger);
color: #fff;
font-size: 12px;
cursor: pointer;
transition: background var(--transition);
}
.btn-confirm-yes:hover {
background: var(--danger-hover);
}
.btn-confirm-no {
padding: 4px 12px;
border: 1px solid var(--border-color);
border-radius: 4px;
background: transparent;
color: var(--text-secondary);
font-size: 12px;
cursor: pointer;
transition: all var(--transition);
}
.btn-confirm-no:hover {
background: var(--bg-hover);
}
/* ===== Main Content ===== */
.main-content {
flex: 1;
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
position: relative;
background: var(--bg-primary);
}
.theme-toggle-wrapper {
position: absolute;
top: 12px;
right: 16px;
z-index: 10;
}
.btn-theme {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border: 1px solid var(--border-color);
border-radius: var(--radius);
background: var(--bg-secondary);
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition);
}
.btn-theme:hover {
background: var(--bg-hover);
color: var(--text-primary);
border-color: var(--accent);
}
/* ===== Empty Editor ===== */
.empty-editor {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
gap: 12px;
color: var(--text-tertiary);
}
.empty-editor h2 {
font-size: 28px;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.5px;
}
.empty-editor p {
font-size: 15px;
color: var(--text-secondary);
}
.shortcut-hint {
font-size: 13px;
color: var(--text-tertiary);
margin-top: 4px;
}
.shortcut-hint kbd {
padding: 2px 6px;
border: 1px solid var(--border-color);
border-radius: 4px;
background: var(--bg-secondary);
font-family: var(--font-mono);
font-size: 11px;
}
/* ===== Editor ===== */
.editor-container {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
.editor-header {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 20px;
border-bottom: 1px solid var(--border-color);
background: var(--bg-primary);
}
.editor-title-input {
flex: 1;
padding: 6px 0;
border: none;
background: transparent;
color: var(--text-primary);
font-size: 20px;
font-weight: 700;
outline: none;
letter-spacing: -0.3px;
}
.editor-title-input::placeholder {
color: var(--text-tertiary);
}
.view-mode-buttons {
display: flex;
gap: 2px;
background: var(--bg-secondary);
border-radius: var(--radius-sm);
padding: 3px;
border: 1px solid var(--border-color);
}
.btn-view {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 28px;
border: none;
border-radius: 4px;
background: transparent;
color: var(--text-tertiary);
cursor: pointer;
transition: all var(--transition);
}
.btn-view:hover {
color: var(--text-primary);
}
.btn-view.active {
background: var(--bg-primary);
color: var(--accent);
box-shadow: var(--shadow-sm);
}
/* ===== Toolbar ===== */
.toolbar {
display: flex;
align-items: center;
gap: 2px;
padding: 6px 16px;
border-bottom: 1px solid var(--border-color);
background: var(--bg-secondary);
flex-wrap: wrap;
}
.toolbar-btn {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 30px;
border: none;
border-radius: 4px;
background: transparent;
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition);
}
.toolbar-btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.toolbar-btn:active {
background: var(--accent-light);
color: var(--accent);
}
/* ===== Editor Body ===== */
.editor-body {
flex: 1;
display: flex;
overflow: hidden;
}
.editor-body.split .editor-pane,
.editor-body.split .preview-pane {
width: 50%;
}
.editor-body.split .editor-pane {
border-right: 1px solid var(--border-color);
}
.editor-body.edit .editor-pane {
width: 100%;
}
.editor-body.preview .preview-pane {
width: 100%;
}
.editor-pane {
display: flex;
flex-direction: column;
overflow: hidden;
}
.editor-textarea {
flex: 1;
width: 100%;
padding: 20px 24px;
border: none;
background: transparent;
color: var(--text-primary);
font-family: var(--font-mono);
font-size: 14px;
line-height: 1.7;
resize: none;
outline: none;
overflow-y: auto;
tab-size: 2;
}
.editor-textarea::placeholder {
color: var(--text-tertiary);
}
.editor-textarea::-webkit-scrollbar {
width: 6px;
}
.editor-textarea::-webkit-scrollbar-thumb {
background: var(--border-color);
border-radius: 3px;
}
.preview-pane {
overflow-y: auto;
padding: 20px 28px;
}
.preview-pane::-webkit-scrollbar {
width: 6px;
}
.preview-pane::-webkit-scrollbar-thumb {
background: var(--border-color);
border-radius: 3px;
}
/* ===== Markdown Preview (Prose) ===== */
.markdown-preview {
font-size: 15px;
line-height: 1.75;
color: var(--text-primary);
}
.markdown-preview .preview-empty {
color: var(--text-tertiary);
font-style: italic;
}
.markdown-preview h1 {
font-size: 2em;
font-weight: 800;
margin: 1em 0 0.5em;
padding-bottom: 0.3em;
border-bottom: 1px solid var(--border-color);
letter-spacing: -0.5px;
}
.markdown-preview h2 {
font-size: 1.5em;
font-weight: 700;
margin: 0.8em 0 0.4em;
padding-bottom: 0.25em;
border-bottom: 1px solid var(--border-light);
letter-spacing: -0.3px;
}
.markdown-preview h3 {
font-size: 1.25em;
font-weight: 600;
margin: 0.7em 0 0.3em;
}
.markdown-preview p {
margin: 0.6em 0;
}
.markdown-preview strong {
font-weight: 700;
color: var(--text-primary);
}
.markdown-preview em {
font-style: italic;
}
.markdown-preview del {
text-decoration: line-through;
color: var(--text-secondary);
}
.markdown-preview ul, .markdown-preview ol {
margin: 0.5em 0;
padding-left: 1.8em;
}
.markdown-preview li {
margin: 0.25em 0;
}
.markdown-preview code {
font-family: var(--font-mono);
font-size: 0.88em;
padding: 2px 6px;
border-radius: 4px;
background: var(--bg-tertiary);
color: var(--accent);
}
.markdown-preview pre {
margin: 1em 0;
padding: 16px 20px;
border-radius: var(--radius);
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
overflow-x: auto;
}
.markdown-preview pre code {
padding: 0;
background: transparent;
color: var(--text-primary);
font-size: 13px;
line-height: 1.6;
}
.markdown-preview blockquote {
margin: 0.8em 0;
padding: 8px 16px;
border-left: 4px solid var(--accent);
background: var(--bg-secondary);
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
color: var(--text-secondary);
}
.markdown-preview blockquote p {
margin: 0.2em 0;
}
.markdown-preview hr {
margin: 1.5em 0;
border: none;
border-top: 2px solid var(--border-color);
}
.markdown-preview a {
color: var(--accent);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: border-color var(--transition);
}
.markdown-preview a:hover {
border-bottom-color: var(--accent);
}
.markdown-preview img {
max-width: 100%;
border-radius: var(--radius);
}
.markdown-preview table {
width: 100%;
border-collapse: collapse;
margin: 1em 0;
}
.markdown-preview th, .markdown-preview td {
padding: 8px 12px;
border: 1px solid var(--border-color);
text-align: left;
}
.markdown-preview th {
background: var(--bg-secondary);
font-weight: 600;
}
/* ===== Responsive ===== */
@media (max-width: 768px) {
.sidebar {
width: 260px;
min-width: 260px;
}
.sidebar-collapsed {
width: 48px;
min-width: 48px;
}
.editor-body.split {
flex-direction: column;
}
.editor-body.split .editor-pane,
.editor-body.split .preview-pane {
width: 100%;
}
.editor-body.split .editor-pane {
height: 50%;
border-right: none;
border-bottom: 1px solid var(--border-color);
}
.editor-body.split .preview-pane {
height: 50%;
}
.editor-header {
padding: 10px 14px;
}
.editor-title-input {
font-size: 17px;
}
.editor-textarea {
padding: 14px 16px;
}
.preview-pane {
padding: 14px 16px;
}
.site-footer {
padding: 32px 20px 24px;
}
.site-footer-inner {
grid-template-columns: 1fr 1fr;
}
.site-footer-brand {
grid-column: 1 / -1;
}
.legal-page {
padding: 64px 20px 88px;
}
.legal-page-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.sidebar {
position: fixed;
z-index: 100;
width: 100%;
min-width: 100%;
box-shadow: var(--shadow-lg);
}
.sidebar-collapsed {
width: 48px;
min-width: 48px;
}
.site-footer-inner {
grid-template-columns: 1fr;
}
.site-footer-bottom {
align-items: flex-start;
}
}
/* ===== Accessibility ===== */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
/* Focus visible for keyboard navigation */
*:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* Skip to content for a11y */
.skip-to-content {
position: absolute;
top: -100%;
left: 16px;
z-index: 9999;
padding: 8px 16px;
background: var(--accent);
color: #fff;
border-radius: var(--radius-sm);
font-size: 14px;
font-weight: 600;
text-decoration: none;
transition: top 0.2s ease;
}
.skip-to-content:focus {
top: 16px;
}
/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* Print styles */
@media print {
.sidebar, .toolbar, .theme-toggle-wrapper, .view-mode-buttons {
display: none !important;
}
.main-content {
margin: 0;
padding: 0;
}
.editor-body {
display: block;
}
.preview-pane {
width: 100% !important;
padding: 0 !important;
}
}