body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto;
    background: #f1f5f9;
    color: #0f172a
}

.authPage {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #1e293b)
}

.authCard {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25)
}

.authTitle {
    font-size: 22px;
    font-weight: 600;
    text-align: center
}

.authInput {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    outline: none
}

.authInput:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #2563eb22
}

.authBtn {
    padding: 12px;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px
}

.authLogin {
    background: #2563eb
}

.authLogin:hover {
    background: #1d4ed8
}

.authSignup {
    background: #22c55e
}

.authSignup:hover {
    background: #16a34a
}

.authLogout {
    background: #ef4444;
}

.authLogout:hover {
    background: #ec2727;
}

.authLink {
    text-align: center;
    font-size: 14px;
    color: #2563eb;
    cursor: pointer
}

.topbar {
    background: #0f172a;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08)
}

.logo {
    font-weight: 600;
    font-size: 18px
}

.container {
    display: flex;
    height: calc(100vh - 60px)
}

.sidebar {
    width: 270px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column
}

.newBtn {
    margin: 14px;
    padding: 10px;
    border: none;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600
}

.sidebar input {
    margin: 0 14px 14px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    outline: none;
    font-size: 14px
}

.sidebar input:focus {
    border-color: #2563eb
}

.noteItem {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: .15s
}

.noteItem:hover {
    background: #f8fafc
}

.noteTitle {
    font-weight: 600;
    font-size: 22px;
    display: -webkit-box;
    display: box;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.noteDesc {
    font-size: 16px;
    color: #64748b;
    margin-top: 10px;
    display: -webkit-box;
    display: box;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.noteTime {
    font-size: 16px;
    color: #94a3b8;
    margin-top: 16px
}

.sidebarProfile {
    padding: 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer
}

.sidebarProfile img {
    width: 36px;
    height: 36px;
    border-radius: 50%
}

.sidebarProfile div {
    min-width: 0;
}

#sidebarName {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-weight: 600;
}

#sidebarEmail {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    opacity: .60;
    font-size: 12px;
    margin-top: 5px;
}

.editor {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative
}

#title {
    font-size: 26px;
    font-weight: 600;
    border: none;
    outline: none;
    background: transparent
}

.toolbar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .04)
}

.toolbar button,
.toolbar select,
.toolbar input[type=color] {
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px
}

.toolbar button:hover,
.toolbar select:hover {
    background: #f1f5f9
}

.editorBox {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    overflow: auto;
    font-size: 16px;
    line-height: 1.6;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .05)
}

.editorBox:focus {
    outline: 2px solid #2563eb33
}

.editorActions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px
}

.delete {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500
}

.delete:hover {
    background: #dc2626
}

#saveBtn {
    background: #22c55e;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500
}

#saveBtn:hover {
    background: #16a34a
}

#downloadBtn {
    background: #0ea5e9;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

#downloadBtn:hover {
    background: #0284c7;
}