:root {
    --bg-color: #121212;
    --sidebar-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --accent-color: #bb86fc;
    --secondary-text: #a0a0a0;
    --border-color: #333;
    --input-bg: #2c2c2c;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

.view {
    height: 100vh;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Lock Screen */
.lock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

input {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 1rem;
}

button {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

button:hover {
    opacity: 0.9;
}

/* Main View */
#main-view {
    display: flex;
}

.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-list {
    flex: 1;
    overflow-y: auto;
}

.date-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.date-item:hover, .date-item.active {
    background: #333;
}

.date-item h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.date-item p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--secondary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#entry-title {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
}

#entry-date-display {
    margin-right: 20px;
    color: var(--secondary-text);
}

#entry-content {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    resize: none;
    font-family: 'Inter', sans-serif;
}

#entry-content:focus {
    outline: none;
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--sidebar-bg);
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

textarea#backup-key-display {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    background: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
