/* Note Pad Styles */

.notepad-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    gap: 1.5rem;
    min-height: calc(100vh - 200px);
}

.notepad-header {
    display: none;
}

/* Notes Sidebar */
.notes-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.new-note-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-note-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.note-item {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.note-item:hover {
    background: var(--dark-bg);
}

.note-item.active {
    background: rgba(88, 101, 242, 0.15);
    border-left: 3px solid var(--primary);
}

.note-item-title {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-preview {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-date {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.empty-notes {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-notes svg {
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Editor Area */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    min-width: 0;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.editor-toolbar input {
    flex: 1;
    min-width: 150px;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
}

.editor-toolbar input:focus {
    outline: none;
}

.editor-toolbar input::placeholder {
    color: var(--text-muted);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.save-status {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.save-status.saving {
    color: var(--warning);
}

.save-status.saved {
    color: #10b981;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.toolbar-btn.delete:hover {
    border-color: var(--error);
    color: var(--error);
}

#noteContent {
    flex: 1;
    padding: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    resize: none;
    box-sizing: border-box;
}

#noteContent:focus {
    outline: none;
}

#noteContent::placeholder {
    color: var(--text-muted);
}

.editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile Sidebar Toggle */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: calc(100% - 2rem);
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .notepad-container {
        padding: 1rem;
        flex-direction: column;
    }

    .notepad-header {
        display: block;
        text-align: center;
        margin-bottom: 1rem;
    }

    .notepad-header h1 {
        font-family: 'Orbitron', monospace;
        font-size: 2rem;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.25rem;
    }

    .notepad-header p {
        color: var(--text-muted);
        font-size: 1rem;
    }

    .notes-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        border-radius: 0;
        z-index: 200;
        transition: left 0.3s ease;
    }

    .notes-sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 150;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .mobile-sidebar-toggle {
        display: flex;
    }

    .editor-area {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .notepad-header h1 {
        font-size: 1.75rem;
    }

    .editor-toolbar {
        padding: 0.5rem;
    }

    .editor-toolbar input {
        font-size: 1rem;
    }

    .toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .editor-footer {
        flex-wrap: wrap;
        justify-content: center;
    }

    #noteContent {
        padding: 1rem;
        font-size: 0.95rem;
    }
}
