/* Buttons */
.btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn .icon {
    margin-right: 8px;
}

.btn.primary {
    background-color: var(--accent-color);
    color: white;
}

.btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn.secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn.secondary:hover {
    background-color: var(--bg-primary);
}

.btn.danger {
    background-color: var(--danger-color);
    color: white;
}

.btn.danger:hover {
    filter: brightness(1.1);
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--accent-color);
}

/* Notes */
.notes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    position: relative;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border: none;
    /* Paper-like texture */
    background-image: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.05) 1px,
        transparent 1px
    );
    background-size: 100% 20px;
}

/* Folded corner effect */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent var(--accent-color) transparent transparent;
    transition: all 0.3s ease;
}

/* Shadow for the folded corner */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 22px 22px 0;
    border-color: transparent rgba(0, 0, 0, 0.1) transparent transparent;
    transform: translate(2px, 2px);
    z-index: -1;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
    border-width: 0 32px 32px 0;
}

.card .title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.card .content {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.5;
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

/* Fade out effect for content overflow */
.card .content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--bg-secondary));
    pointer-events: none;
}

.card .actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.card .icon-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .icon-btn:hover {
    background-color: var(--bg-primary);
    color: var(--accent-color);
}

/* Add a subtle rotation to each card for a more natural look */
.notes-container .card:nth-child(odd) {
    transform: rotate(-0.5deg);
}

.notes-container .card:nth-child(even) {
    transform: rotate(0.5deg);
}

.notes-container .card:nth-child(odd):hover,
.notes-container .card:nth-child(even):hover {
    transform: rotate(0deg) translateY(-5px);
}

/* Passwords */
.passwords-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.password-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s;
    animation: slideIn 0.3s ease-out;
}

.password-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.password-card .title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.password-field {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.password-field .label {
    width: 100px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.password-field .value {
    flex-grow: 1;
    font-family: monospace;
    background-color: var(--bg-primary);
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
}

.password-field .actions {
    display: flex;
    margin-left: 8px;
}

.password-card .card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* Password input container */
.password-input-container {
    display: flex;
    position: relative;
}

.password-input-container input {
    flex-grow: 1;
    padding-right: 40px;
}

.password-input-container button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px var(--shadow-color);
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Responsive */
@media (max-width: 768px) {
    .main-app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
    }

    nav {
        flex-direction: row;
        justify-content: center;
        margin-bottom: 16px;
    }

    .theme-toggle {
        margin-top: 0;
        padding-top: 0;
    }

    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .actions {
        width: 100%;
        flex-direction: column;
    }

    .search-container {
        width: 100%;
    }

    .search-container input {
        width: 100%;
    }

    .notes-container,
    .passwords-container {
        grid-template-columns: 1fr;
    }

    /* Card actions (view, edit, delete icons) */
    .card .actions {
        display: flex;
        justify-content: flex-end;
        gap: 15px; /* Increase gap between icons */
        margin-top: 10px;
    }
    
    .card .icon-btn {
        width: 36px; /* Make icons slightly larger on mobile */
        height: 36px;
        font-size: 1.2rem;
    }
    
    /* Same for task list card actions */
    .task-list-card .actions {
        display: flex;
        justify-content: flex-end;
        gap: 15px;
        margin-top: 10px;
    }
    
    /* And for password card actions */
    .password-card .card-actions {
        display: flex;
        justify-content: flex-end;
        gap: 15px;
        margin-top: 10px;
    }
}

/* Rich Text Editor */
.note-modal-content {
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.note-modal-content .modal-body {
    overflow-y: auto;
    flex: 1;
    padding-right: 10px;
}

.editor-mode-toggle {
    display: flex;
    margin-right: 20px;
}

.editor-toggle {
    padding: 5px 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 5px;
    color: var(--text-secondary);
}

.editor-toggle.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
}

.rich-editor-toolbar button:hover,
.rich-editor-toolbar select:hover {
    background-color: var(--accent-color);
    color: white;
}

.rich-editor-toolbar .separator {
    color: var(--border-color);
    margin: 0 5px;
}

.editor-container {
    position: relative;
}

.rich-text-editor,
.html-editor {
    min-height: 200px;
    max-height: 350px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    overflow-y: auto;
}

.rich-text-editor {
    outline: none;
}

.html-editor {
    width: 100%;
    resize: vertical;
    font-family: monospace;
}

/* Styles for content inside the rich text editor */
.rich-text-editor h1,
.rich-text-editor h2,
.rich-text-editor h3,
.rich-text-editor h4 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.rich-text-editor p {
    margin-bottom: 1em;
}

.rich-text-editor ul,
.rich-text-editor ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.rich-text-editor a {
    color: var(--accent-color);
    text-decoration: underline;
}

.rich-text-editor img {
    max-width: 100%;
    height: auto;
}

/* Add these styles for file upload */
#file-upload {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

/* Add this to the notification styles in app.js or create a new class here */
.upload-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 250px;
}

.upload-progress .progress-bar {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.upload-progress .progress-bar-fill {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 0.3s;
}

/* Update File Attachments Section */
.file-attachments-section {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
}

.file-attachments-section > label {
    margin-bottom: 10px;
    font-weight: 500;
}

.file-upload-container {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.file-upload-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    max-width: 300px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-primary);
}

.file-upload-area:hover {
    border-color: var(--accent-color);
    background-color: rgba(var(--accent-color-rgb), 0.05);
}

.file-upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.file-upload-area p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.file-types {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Restore attachment item styling */
.attachment-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.attachment-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    font-weight: 500;
    margin-bottom: 3px;
}

.attachment-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.attachment-actions {
    display: flex;
    gap: 5px;
}

.attachment-actions button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.attachment-actions button:hover {
    color: var(--accent-color);
}

.attachment-actions button.remove:hover {
    color: var(--danger-color);
}

/* Drag and drop highlight */
.file-upload-area.dragover {
    background-color: rgba(var(--accent-color-rgb), 0.1);
    border-color: var(--accent-color);
}

/* Attachments list styling */
.attachments-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Attachments indicator in note cards */
.attachments-indicator {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.attachments-indicator .icon {
    margin-right: 5px;
}

/* Secret Word Modal */
.secret-word-intro {
    margin-bottom: 20px;
    text-align: center;
}

.secret-word-intro p {
    margin-bottom: 10px;
}

.secret-word-tips {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    text-align: left;
}

.secret-word-tips h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.secret-word-tips ul {
    margin: 0;
    padding-left: 20px;
}

.secret-word-tips li {
    margin-bottom: 5px;
}

/* Auth Modal */
.auth-intro {
    text-align: center;
    margin-bottom: 20px;
}

.auth-icon {
    font-size: 3rem;
    margin: 20px 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Date display in note cards */
.date-display {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.date-display .icon {
    margin-right: 5px;
}

/* Preview modal styles */
.preview-modal {
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.preview-modal .modal-body {
    overflow-y: auto;
    padding-right: 10px;
}

.note-metadata {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.date-info {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.date-info .icon {
    margin-right: 5px;
}

.note-content {
    margin-bottom: 20px;
    line-height: 1.6;
}

.note-attachments {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.note-attachments h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.attachments-preview-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attachment-preview-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.attachment-preview-item .attachment-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

/* Custom Alert Box */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.custom-alert {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    animation: scaleIn 0.3s ease-out;
}

.custom-alert-header {
    padding: 16px 20px;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
}

.custom-alert-header .icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.custom-alert-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.custom-alert-body {
    padding: 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.custom-alert-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
}

.custom-alert-footer button {
    min-width: 80px;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Note Color Picker */
.note-color-picker {
    margin-bottom: 15px;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color);
}

/* Remove the background color styles for cards */
.card[data-color="blue"],
.card[data-color="green"],
.card[data-color="purple"],
.card[data-color="pink"],
.card[data-color="yellow"],
.card[data-color="orange"],
.card[data-color="red"],
[data-theme="dark"] .card[data-color="blue"],
[data-theme="dark"] .card[data-color="green"],
[data-theme="dark"] .card[data-color="purple"],
[data-theme="dark"] .card[data-color="pink"],
[data-theme="dark"] .card[data-color="yellow"],
[data-theme="dark"] .card[data-color="orange"],
[data-theme="dark"] .card[data-color="red"] {
    background-color: var(--bg-secondary);
}

/* Remove the text color override for dark theme */
[data-theme="dark"] .card[data-color] .content {
    color: var(--text-primary);
}

/* Update the folded corner colors for light theme */
.card[data-color="blue"]::before {
    border-color: transparent #2196F3 transparent transparent;
}

.card[data-color="green"]::before {
    border-color: transparent #4CAF50 transparent transparent;
}

.card[data-color="purple"]::before {
    border-color: transparent #9C27B0 transparent transparent;
}

.card[data-color="pink"]::before {
    border-color: transparent #E91E63 transparent transparent;
}

.card[data-color="yellow"]::before {
    border-color: transparent #FFC107 transparent transparent;
}

.card[data-color="orange"]::before {
    border-color: transparent #FF9800 transparent transparent;
}

.card[data-color="red"]::before {
    border-color: transparent #F44336 transparent transparent;
}

/* Update the title colors to match the folded corner */
.card[data-color="blue"] .title {
    color: #2196F3;
}

.card[data-color="green"] .title {
    color: #4CAF50;
}

.card[data-color="purple"] .title {
    color: #9C27B0;
}

.card[data-color="pink"] .title {
    color: #E91E63;
}

.card[data-color="yellow"] .title {
    color: #FFC107;
}

.card[data-color="orange"] .title {
    color: #FF9800;
}

.card[data-color="red"] .title {
    color: #F44336;
}

/* Update the fade out gradient for all cards */
.card .content::after {
    background: linear-gradient(to bottom, transparent, var(--bg-secondary));
}

/* Task Lists */
.task-lists-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.task-list-card {
    position: relative;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border: none;
    /* Paper-like texture */
    background-image: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.05) 1px,
        transparent 1px
    );
    background-size: 100% 20px;
}

/* Folded corner effect for task lists */
.task-list-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 24px 24px 0;
    border-color: transparent var(--accent-color) transparent transparent;
    transition: all 0.3s ease;
}

.task-list-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 22px 22px 0;
    border-color: transparent rgba(0, 0, 0, 0.1) transparent transparent;
    transform: translate(2px, 2px);
    z-index: -1;
    transition: all 0.3s ease;
}

.task-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.task-list-card:hover::before {
    border-width: 0 32px 32px 0;
}

.task-list-card .title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--accent-color);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-list-card .title .task-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.task-list-card .tasks {
    margin-bottom: 15px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.task-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.task-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.task-checkbox.checked {
    background-color: var(--accent-color);
    color: white;
}

.task-text {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

.task-text.completed {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Task items in modal */
.task-items-container {
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.task-item-edit {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.task-item-edit:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.task-item-edit .task-text-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-right: 10px;
}

.task-item-edit .task-delete-btn {
    color: var(--danger-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.add-task-item {
    display: flex;
    margin-top: 10px;
}

.add-task-item input {
    flex-grow: 1;
    margin-right: 10px;
}

/* Task list colors */
.task-list-card[data-color="blue"]::before {
    border-color: transparent #2196F3 transparent transparent;
}

.task-list-card[data-color="green"]::before {
    border-color: transparent #4CAF50 transparent transparent;
}

.task-list-card[data-color="purple"]::before {
    border-color: transparent #9C27B0 transparent transparent;
}

.task-list-card[data-color="pink"]::before {
    border-color: transparent #E91E63 transparent transparent;
}

.task-list-card[data-color="yellow"]::before {
    border-color: transparent #FFC107 transparent transparent;
}

.task-list-card[data-color="orange"]::before {
    border-color: transparent #FF9800 transparent transparent;
}

.task-list-card[data-color="red"]::before {
    border-color: transparent #F44336 transparent transparent;
}

.task-list-card[data-color="blue"] .title {
    color: #2196F3;
}

.task-list-card[data-color="green"] .title {
    color: #4CAF50;
}

.task-list-card[data-color="purple"] .title {
    color: #9C27B0;
}

.task-list-card[data-color="pink"] .title {
    color: #E91E63;
}

.task-list-card[data-color="yellow"] .title {
    color: #FFC107;
}

.task-list-card[data-color="orange"] .title {
    color: #FF9800;
}

.task-list-card[data-color="red"] .title {
    color: #F44336;
}

/* Sidebar Toggle */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 100;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

.sidebar-toggle .toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Add a class for when the sidebar is collapsed */
.app-container.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

.app-container.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}

.app-container.sidebar-collapsed .sidebar-toggle {
    left: 15px;
}

.app-container.sidebar-collapsed .sidebar-toggle .toggle-icon {
    transform: rotate(90deg);
}

/* Make the sidebar transition smooth */
.sidebar {
    transition: transform 0.3s ease;
}

.main-content {
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 100;
        height: 100%;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        width: 250px;
        overflow-y: auto;
    }
    
    .sidebar nav {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .sidebar .nav-btn {
        width: 100%;
        text-align: left;
        padding: 12px 15px;
        margin-bottom: 5px;
    }
    
    .sidebar .theme-toggle {
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid var(--border-color);
    }
    
    .sidebar .theme-toggle button {
        width: 100%;
        text-align: left;
    }
    
    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 101;
        background-color: var(--accent-color);
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu-open .sidebar {
        transform: translateX(0);
    }
    
    .mobile-menu-open .main-content::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Sidebar toggle button in header */
.sidebar-toggle-header {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin-right: 10px;
    color: var(--text-primary);
}

.sidebar-toggle-header:hover {
    color: var(--primary);
}

/* Update view header to properly align the toggle button with the heading */
.view-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.view-header h2 {
    margin: 0;
}

/* Sidebar collapsed state */
.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}

/* Ensure the sidebar has a transition */
.sidebar {
    transition: transform 0.3s ease;
}

.main-content {
    transition: margin-left 0.3s ease, width 0.3s ease;
} 