/* ContextKeep V1.2 — "Obsidian Lab" Design System */
/* Skills applied: frontend-design (DFII 14/15 — Excellent) */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
/* ─── Design Tokens ─── */
:root {
--cyan: #00d4ff;
--cyan-dim: rgba(0, 212, 255, 0.15);
--cyan-glow: rgba(0, 212, 255, 0.25);
--violet: #7c3aed;
--violet-dim: rgba(124, 58, 237, 0.2);
--danger: #f87171;
--danger-hover: #dc2626;
--bg: #090b10;
--bg-surface: #0e1117;
--bg-raised: #141922;
--bg-hover: #1a2233;
--text: #e2e8f0;
--text-dim: #64748b;
--text-mid: #94a3b8;
--border: #1e2a3a;
--border-bright:#2a3a52;
--font-ui: 'Space Grotesk', system-ui, sans-serif;
--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
--shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
--shadow-glow: 0 0 20px var(--cyan-glow), 0 4px 12px rgba(0,0,0,0.5);
--shadow-modal: 0 24px 64px rgba(0,0,0,0.7);
--transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ─── Reset & Base ─── */
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
font-family: var(--font-ui);
background: var(--bg);
color: var(--text);
line-height: 1.6;
min-height: 100vh;
background-image:
radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 212, 255, 0.06) 0%, transparent 60%);
}
/* ─── Layout ─── */
.container {
max-width: 1280px;
margin: 0 auto;
padding: 2rem 2.5rem;
}
/* ─── Header ─── */
header {
margin-bottom: 2rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid var(--border);
}
.header-inner {
display: flex;
align-items: center;
justify-content: space-between;
}
.logo-block {
display: flex;
align-items: center;
gap: 1rem;
}
.logo-icon {
font-size: 2.2rem;
filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.4));
}
header h1 {
font-size: 1.9rem;
font-weight: 700;
letter-spacing: -0.03em;
color: var(--text);
line-height: 1.1;
}
.subtitle {
color: var(--text-dim);
font-size: 0.82rem;
font-weight: 400;
letter-spacing: 0.02em;
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 2px;
}
.version-badge {
display: inline-block;
background: var(--cyan-dim);
color: var(--cyan);
border: 1px solid rgba(0, 212, 255, 0.3);
padding: 1px 7px;
border-radius: 20px;
font-size: 0.72rem;
font-family: var(--font-mono);
font-weight: 500;
letter-spacing: 0.05em;
}
.header-stats {
display: flex;
gap: 0.75rem;
}
.stat-chip {
display: flex;
flex-direction: column;
align-items: center;
background: var(--bg-raised);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 0.5rem 1.25rem;
min-width: 90px;
}
.stat-label {
font-size: 0.7rem;
font-weight: 500;
color: var(--text-dim);
text-transform: uppercase;
letter-spacing: 0.08em;
}
.stat-value {
font-size: 1.4rem;
font-weight: 700;
color: var(--cyan);
font-family: var(--font-mono);
line-height: 1.2;
}
/* ─── Toolbar ─── */
.toolbar {
display: flex;
gap: 0.75rem;
margin-bottom: 1.75rem;
align-items: center;
}
.search-bar {
flex: 1;
position: relative;
}
.search-icon {
position: absolute;
left: 1rem;
top: 50%;
transform: translateY(-50%);
color: var(--text-dim);
font-size: 1.2rem;
pointer-events: none;
font-style: normal;
}
#searchInput {
width: 100%;
padding: 0.8rem 1rem 0.8rem 2.8rem;
background: var(--bg-surface);
border: 1px solid var(--border-bright);
border-radius: var(--radius-md);
color: var(--text);
font-size: 0.95rem;
font-family: var(--font-ui);
transition: var(--transition);
}
#searchInput::placeholder { color: var(--text-dim); }
#searchInput:focus {
outline: none;
border-color: var(--cyan);
box-shadow: 0 0 0 3px var(--cyan-dim);
background: var(--bg-raised);
}
/* ─── Buttons ─── */
.btn {
padding: 0.6rem 1.1rem;
border: 1px solid var(--border-bright);
border-radius: var(--radius-sm);
cursor: pointer;
font-size: 0.875rem;
font-weight: 500;
font-family: var(--font-ui);
transition: var(--transition);
white-space: nowrap;
background: var(--bg-raised);
color: var(--text-mid);
}
.btn:hover {
background: var(--bg-hover);
color: var(--text);
border-color: var(--border-bright);
}
.btn-view { letter-spacing: 0.01em; }
.btn-view.active {
background: var(--cyan-dim);
color: var(--cyan);
border-color: rgba(0, 212, 255, 0.4);
}
.btn-primary {
background: var(--cyan);
color: #090b10;
border-color: var(--cyan);
font-weight: 600;
}
.btn-primary:hover {
background: #33dcff;
border-color: #33dcff;
color: #090b10;
box-shadow: 0 0 16px var(--cyan-glow);
}
.btn-secondary {
background: var(--bg-raised);
color: var(--text-mid);
border-color: var(--border-bright);
}
.btn-secondary:hover {
background: var(--bg-hover);
color: var(--text);
}
.btn-danger {
background: rgba(248, 113, 113, 0.15);
color: var(--danger);
border-color: rgba(248, 113, 113, 0.3);
}
.btn-danger:hover {
background: var(--danger);
color: white;
border-color: var(--danger);
}
/* ─── Grid View ─── */
.memories-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
gap: 1.25rem;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
.memory-card {
background: var(--bg-surface);
border: 1px solid var(--border);
border-left: 3px solid var(--border-bright);
border-radius: var(--radius-lg);
padding: 1.25rem 1.4rem;
transition: var(--transition);
box-shadow: var(--shadow-card);
display: flex;
flex-direction: column;
gap: 0.6rem;
}
.memory-card:hover {
border-left-color: var(--cyan);
background: var(--bg-raised);
box-shadow: var(--shadow-glow);
transform: translateY(-2px);
}
.memory-card h3 {
font-size: 1rem;
font-weight: 600;
color: var(--text);
word-break: break-word;
line-height: 1.3;
}
.card-key {
font-family: var(--font-mono);
font-size: 0.72rem;
color: var(--cyan);
opacity: 0.7;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.memory-card .meta {
font-size: 0.8rem;
color: var(--text-dim);
word-break: break-word;
}
.memory-card .snippet {
color: var(--text-mid);
font-size: 0.85rem;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.5;
flex: 1;
}
.card-footer {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 0.25rem;
gap: 0.5rem;
flex-wrap: wrap;
}
.card-tags {
display: flex;
gap: 0.35rem;
flex-wrap: wrap;
flex: 1;
}
.tag-chip {
background: var(--violet-dim);
color: rgba(167, 139, 250, 0.9);
border: 1px solid rgba(124, 58, 237, 0.3);
padding: 1px 7px;
border-radius: 20px;
font-size: 0.68rem;
font-weight: 500;
white-space: nowrap;
}
.char-badge {
font-family: var(--font-mono);
font-size: 0.68rem;
color: var(--text-dim);
background: var(--bg-hover);
border: 1px solid var(--border);
padding: 1px 7px;
border-radius: 20px;
white-space: nowrap;
}
.card-actions {
display: flex;
gap: 0.4rem;
margin-top: 0.5rem;
}
.card-actions .btn {
padding: 0.35rem 0.75rem;
font-size: 0.8rem;
}
/* ─── List View ─── */
.memories-list {
display: flex;
flex-direction: column;
gap: 0.4rem;
animation: fadeIn 0.3s ease;
}
.memories-list .memory-card {
display: grid;
grid-template-columns: 2fr 2fr 1.5fr auto;
gap: 1rem;
align-items: center;
padding: 0.85rem 1.2rem;
border-left-width: 3px;
flex-direction: unset;
gap: 0;
}
.memories-list .memory-card:hover { transform: none; }
.memories-list .memory-card h3 {
font-size: 0.9rem;
margin-bottom: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.memories-list .memory-card .card-key {
margin: 0;
font-size: 0.7rem;
}
.memories-list .memory-card .meta {
margin-bottom: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.78rem;
}
.memories-list .memory-card .snippet,
.memories-list .memory-card .card-footer { display: none; }
.memories-list .card-actions {
flex-shrink: 0;
margin-top: 0;
grid-column: 4;
}
/* ─── Empty / Loading State ─── */
.loading {
text-align: center;
padding: 4rem 2rem;
color: var(--text-dim);
font-size: 0.95rem;
grid-column: 1 / -1;
}
/* ─── Calendar View ─── */
.calendar-view {
display: flex;
flex-direction: column;
gap: 1.25rem;
animation: fadeIn 0.3s ease;
}
.calendar-nav {
display: flex;
align-items: center;
justify-content: space-between;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 0.75rem 1.25rem;
}
.cal-month-title {
font-size: 1.1rem;
font-weight: 600;
color: var(--text);
letter-spacing: -0.02em;
}
#calendarGrid {
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
gap: 0.35rem;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 1.25rem;
}
.calendar-day-header {
font-weight: 600;
text-align: center;
color: var(--text-dim);
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.08em;
padding-bottom: 0.5rem;
}
.calendar-day {
background: var(--bg-raised);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 0.5rem;
min-height: 90px;
cursor: pointer;
transition: var(--transition);
}
.calendar-day:hover { border-color: var(--cyan); background: var(--bg-hover); }
.calendar-day.empty { background: transparent; border-color: transparent; cursor: default; }
.calendar-day.today { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.calendar-day-num {
font-size: 0.8rem;
font-weight: 600;
color: var(--text-mid);
margin-bottom: 0.35rem;
font-family: var(--font-mono);
}
.today .calendar-day-num {
color: var(--cyan);
}
.calendar-memory {
background: var(--cyan-dim);
border: 1px solid rgba(0, 212, 255, 0.2);
color: rgba(0, 212, 255, 0.9);
padding: 2px 6px;
border-radius: 4px;
font-size: 0.67rem;
font-weight: 500;
margin-top: 0.2rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
transition: var(--transition);
}
.calendar-memory:hover {
background: rgba(0, 212, 255, 0.25);
}
/* ─── Modals ─── */
.modal {
display: none;
position: fixed;
z-index: 1000;
inset: 0;
background: rgba(0, 0, 0, 0.75);
backdrop-filter: blur(6px);
animation: modalFadeIn 0.15s ease;
}
@keyframes modalFadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.modal-content {
background: var(--bg-surface);
margin: 4% auto;
padding: 2rem 2.25rem;
border: 1px solid var(--border-bright);
border-radius: var(--radius-lg);
width: 90%;
max-width: 680px;
max-height: 85vh;
overflow-y: auto;
box-shadow: var(--shadow-modal);
animation: modalSlideIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-content--narrow { max-width: 420px; }
@keyframes modalSlideIn {
from { transform: translateY(-16px) scale(0.98); opacity: 0; }
to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-content h2 {
font-size: 1.25rem;
font-weight: 600;
margin-bottom: 1.5rem;
color: var(--text);
letter-spacing: -0.02em;
}
.close {
color: var(--text-dim);
float: right;
font-size: 1.75rem;
font-weight: 300;
cursor: pointer;
line-height: 1;
margin-top: -2px;
transition: color 0.15s;
}
.close:hover { color: var(--text); }
.field-label {
display: block;
font-size: 0.78rem;
font-weight: 600;
color: var(--text-mid);
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 0.4rem;
}
.field-hint {
font-weight: 400;
text-transform: none;
letter-spacing: 0;
color: var(--text-dim);
font-size: 0.75rem;
}
.meta {
font-size: 0.85rem;
color: var(--text-dim);
margin-bottom: 0.35rem;
}
.mono-text {
font-family: var(--font-mono);
color: var(--cyan);
font-size: 0.82rem;
}
.content-area {
background: var(--bg);
border: 1px solid var(--border);
padding: 1.25rem;
border-radius: var(--radius-md);
margin-top: 1rem;
white-space: pre-wrap;
word-break: break-word;
font-size: 0.875rem;
line-height: 1.7;
color: var(--text-mid);
max-height: 50vh;
overflow-y: auto;
}
.edit-title {
width: 100%;
padding: 0.7rem 0.9rem;
background: var(--bg);
border: 1px solid var(--border-bright);
border-radius: var(--radius-sm);
color: var(--text);
font-size: 1rem;
font-family: var(--font-ui);
margin-bottom: 1rem;
transition: var(--transition);
}
.edit-content {
width: 100%;
min-height: 280px;
padding: 0.9rem;
background: var(--bg);
border: 1px solid var(--border-bright);
border-radius: var(--radius-sm);
color: var(--text);
font-size: 0.875rem;
font-family: var(--font-mono);
resize: vertical;
line-height: 1.65;
transition: var(--transition);
}
.edit-title:focus,
.edit-content:focus {
outline: none;
border-color: var(--cyan);
box-shadow: 0 0 0 3px var(--cyan-dim);
}
.modal-actions {
display: flex;
gap: 0.75rem;
margin-top: 1.5rem;
justify-content: flex-end;
}
.delete-warning {
color: var(--text-dim);
font-size: 0.875rem;
margin-bottom: 0.5rem;
}
.delete-target {
font-size: 0.95rem;
color: var(--text);
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 0.75rem 1rem;
margin-bottom: 1rem;
word-break: break-word;
}
/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }