* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0f172a; color: #e2e8f0; min-height: 100vh; }
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* Login */
#login-screen { display: none; align-items: center; justify-content: center; padding: 20px; }
#login-screen.active { display: flex; }
.login-box { text-align: center; max-width: 340px; width: 100%; }
.logo { font-size: 64px; margin-bottom: 16px; }
.login-box h1 { font-size: 28px; margin-bottom: 12px; color: #fff; }
.subtitle { color: #94a3b8; margin-bottom: 28px; line-height: 1.6; }
.btn-primary { background: #2563eb; color: #fff; border: none; padding: 16px 32px; font-size: 17px; border-radius: 12px; cursor: pointer; width: 100%; font-weight: 600; }
.btn-primary:active { background: #1d4ed8; transform: scale(0.98); }
.hint { margin-top: 24px; color: #64748b; font-size: 13px; line-height: 1.8; }

/* Header */
header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #1e293b; position: sticky; top: 0; z-index: 10; }
header h2 { font-size: 17px; color: #fff; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-small { background: #334155; color: #e2e8f0; border: none; padding: 9px 14px; border-radius: 8px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn-save { background: #16a34a; color: #fff; font-weight: 600; }

/* Search */
.search-bar { display: flex; gap: 8px; padding: 12px 16px; background: #1e293b; }
.search-bar input { flex: 1; background: #0f172a; border: 1px solid #334155; color: #e2e8f0; padding: 12px; border-radius: 10px; font-size: 15px; outline: none; }
.search-bar input:focus { border-color: #2563eb; }
.btn-add { background: #2563eb; color: #fff; border: none; padding: 0 20px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* Notes list */
.notes-list { padding: 12px 16px; }
.note-card { background: #1e293b; border-radius: 12px; padding: 16px; margin-bottom: 10px; cursor: pointer; border: 1px solid #334155; }
.note-card:active { background: #273449; }
.note-card h3 { font-size: 16px; color: #fff; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card p { font-size: 13px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card .date { font-size: 11px; color: #64748b; margin-top: 6px; }
.loading, .empty { text-align: center; color: #64748b; padding: 40px 20px; }

/* Editor */
.title-input { width: 100%; background: #1e293b; border: none; border-bottom: 1px solid #334155; color: #fff; padding: 16px; font-size: 18px; font-weight: 600; outline: none; }
.content-input { width: 100%; height: calc(100vh - 130px); background: #0f172a; border: none; color: #e2e8f0; padding: 16px; font-size: 16px; line-height: 1.7; outline: none; resize: none; font-family: inherit; }

/* Viewer */
.view-content { padding: 20px 16px; font-size: 16px; line-height: 1.8; white-space: pre-wrap; word-wrap: break-word; }
