/* Global Variables */
:root {
    /* Color Palette */
    --primary: #4a6fa5;
    --primary-light: #6789c0;
    --primary-dark: #345685;
    --secondary: #64B5F6;
    --accent: #4fc3f7;
    --background: #f5f7fa;
    --surface: #ffffff;
    --surface-variant: #edf2fa;
    --error: #e53935;
    --error-container: #ffebee;
    --success: #43a047;
    --success-container: #e8f5e9;
    --warning: #fb8c00;
    --warning-container: #fff3e0;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-hint: #999999;
    --text-on-primary: #ffffff;
    --text-on-secondary: #000000;
    --border: #e0e0e0;
    --divider: #eeeeee;
    --hover: #f0f4f8;
    --selected: #e1f5fe;
    --shadow: rgba(0, 0, 0, 0.1);
    --grid-gap: 20px;
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    
    /* Transitions */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;

    /* Light Theme Colors */
    --background-light: #f9f9f9;
    --surface-light: #ffffff;
    --text-primary-light: #333333;
    --text-secondary-light: #666666;
    --border-light: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --hover-light: #f0f0f0;
    --accent-light: #ff7043;
    
    /* Enhanced Colors for Light Theme */
    --success-light: #66bb6a;
    --warning-light: #ffa726;
    --danger-light: #ef5350;
    --info-light: #29b6f6;
    --highlight-light: rgba(255, 245, 157, 0.5);

    /* Dark Theme Colors */
    --secondary-dark: #42a5f5;
    --background-dark: #1a1a1a;
    --surface-dark: #2d2d2d;
    --text-primary-dark: #e0e0e0;
    --text-secondary-dark: #a0a0a0;
    --border-dark: #444444;
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --hover-dark: #3d3d3d;
    --accent-dark: #ff9e80;
    
    /* Enhanced Colors for Dark Theme */
    --success-dark: #81c784;
    --danger-dark: #e57373;
    --info-dark: #4fc3f7;
    --highlight-dark: rgba(255, 245, 157, 0.2);

    /* Animation Timing */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    
    /* Gradients */
    --gradient-primary-light: linear-gradient(135deg, #4a6fa5, #6789bc);
    --gradient-primary-dark: linear-gradient(135deg, #42a5f5, #2196f3);
    --gradient-accent-light: linear-gradient(135deg, #ff7043, #ff9e80);
    --gradient-accent-dark: linear-gradient(135deg, #ff9e80, #ffab91);
}

/* Theme Definitions */
.light-theme {
    --primary: var(--primary-light);
    --secondary: var(--secondary-light);
    --background: var(--background-light);
    --surface: var(--surface-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --border: var(--border-light);
    --shadow: var(--shadow-light);
    --hover: var(--hover-light);
    --accent: var(--accent-light);
    --editor-bg: #f5f5f5;
    --editor-text: #24292e;
    --success: var(--success-light);
    --warning: var(--warning-light);
    --danger: var(--danger-light);
    --info: var(--info-light);
    --highlight: var(--highlight-light);
    --gradient-primary: var(--gradient-primary-light);
    --gradient-accent: var(--gradient-accent-light);
}

.dark-theme {
    --primary: var(--info-light);
    --secondary: var(--secondary-dark);
    --background: var(--background-dark);
    --surface: var(--surface-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --border: var(--border-dark);
    --shadow: var(--shadow-dark);
    --hover: var(--hover-dark);
    --accent: var(--accent-dark);
    --editor-bg: #2d2d2d;
    --editor-text: #e6e6e6;
    --success: var(--success-dark);
    --warning: var(--warning-dark);
    --danger: var(--danger-dark);
    --info: var(--info-dark);
    --highlight: var(--highlight-dark);
    --gradient-primary: var(--gradient-primary-dark);
    --gradient-accent: var(--gradient-accent-dark);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal), transform var(--transition-normal);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    /* background: var(--gradient-primary); */
    background: var(--background-dark);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
    z-index: 10;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    font-size: 1.8rem;
    color: white;
    filter: drop-shadow(0 2px 4px var(--shadow));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

h1 {
    font-size: 1.6rem;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px var(--shadow);
}

.header-btns {
    display: flex;
    gap: 0.8rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    color: white;
    transition: all var(--transition-fast);
    backdrop-filter: blur(2px);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.btn i {
    font-size: 1.2rem;
}

.dark-theme .btn i.fa-save {
    color: var(--accent);
}

.dark-theme .btn i.fa-thumbtack {
    color: var(--text-secondary);
}

.dark-theme .btn i.fa-thumbtack[style*="var(--accent)"] {
    color: var(--accent) !important;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 5px var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-danger {
    color: var(--danger);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: white;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 320px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    overflow: hidden;
    box-shadow: 2px 0 5px var(--shadow);
    z-index: 5;
}

.search-bar {
    padding: 1.2rem;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.85rem 2.2rem 0.85rem 2.7rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--background);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 5px var(--shadow);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2), 0 4px 10px var(--shadow);
    transform: translateY(-2px);
}

.search-bar i {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

.note-actions {
    padding: 0.5rem 1.2rem 1.2rem;
}

.notes-categories {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.category {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 0 20px 20px 0;
    margin-right: 10px;
}

.category:hover {
    background-color: var(--hover);
    transform: translateX(5px);
}

.category.active {
    background: var(--gradient-primary);
    box-shadow: 0 2px 5px var(--shadow);
}

.category i {
    margin-right: 0.85rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.category.active i, .category.active span {
    color: white;
}

.note-count {
    margin-left: auto;
    background-color: var(--primary);
    color: white;
    border-radius: 10px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.category.active .note-count {
    background-color: rgba(255, 255, 255, 0.3);
}

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

.note-item {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-normal);
    animation: fadeIn var(--transition-normal);
    border-radius: 0 10px 10px 0;
    margin-right: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.note-item:hover {
    background-color: var(--hover);
    transform: translateX(5px);
}

.note-item.active {
    background-color: rgba(74, 111, 165, 0.15);
    border-left: 4px solid var(--primary);
}

.note-item.deleted {
    background-color: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger);
}

.note-item-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
}

.note-item-title i {
    color: var(--accent);
    transform: rotate(30deg);
}

.note-item-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.note-item-date {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.note-item-words {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--surface-variant);
    margin-left: 8px;
}

.note-item-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--error-container);
    color: var(--error);
    margin-left: auto;
}

/* Editor Container Styles */
.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--surface);
    overflow: hidden;
    position: relative;
}

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

#note-title {
    font-size: 1.3rem;
    font-weight: 500;
    border: none;
    background-color: transparent;
    color: var(--text-primary);
    width: 70%;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

#note-title:focus {
    outline: none;
    background-color: var(--background);
    box-shadow: 0 2px 5px var(--shadow);
}

.editor-actions {
    display: flex;
    gap: 0.7rem;
}

.editor-toolbar {
    padding: 0.8rem 1.2rem;
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#syntax-mode {
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: 0 1px 3px var(--shadow);
    cursor: pointer;
    transition: all var(--transition-fast);
}

#syntax-mode:hover, #highlight-color:hover {
    border-color: var(--primary);
}

#syntax-mode:focus, #highlight-color:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

.text-options {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.toolbar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.toolbar-btn:hover {
    background-color: var(--hover);
    color: var(--primary);
    transform: translateY(-2px);
}

.toolbar-btn.active {
    background-color: var(--primary);
    color: white;
}

#color-picker {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    background-color: transparent;
    transition: all var(--transition-fast);
}

#color-picker:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px var(--shadow);
}

#color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 3px var(--shadow);
}

#highlight-color {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

/* Editor Styles */
.editor {
    flex: 1;
    padding: 1.5rem;
    background-color: var(--editor-bg);
    color: var(--editor-text);
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.6;
    overflow-y: auto;
    min-height: 200px;
    border: none;
    outline: none;
    transition: all var(--transition-normal);
    box-shadow: inset 0 2px 5px var(--shadow);
}

.editor:focus {
    outline: none;
    box-shadow: inset 0 2px 8px var(--shadow);
}

/* Syntax Highlighting Classes */
.editor.html {
    background-color: #f8f8f8;
    color: #e34c26;
}

.editor.css {
    background-color: #f5f5f5;
    color: #264de4;
}

.editor.javascript {
    background-color: #f9f9f9;
    color: #f0db4f;
}

.editor.markdown {
    background-color: #f7f7f7;
    color: #4078c0;
}

.editor.json {
    background-color: #f6f6f6;
    color: #009688;
}

.dark-theme .editor.html {
    background-color: #262626;
    color: #ff6b6b;
}

.dark-theme .editor.css {
    background-color: #252525;
    color: #54a0ff;
}

.dark-theme .editor.javascript {
    background-color: #272727;
    color: #ffeaa7;
}

.dark-theme .editor.markdown {
    background-color: #242424;
    color: #74b9ff;
}

.dark-theme .editor.json {
    background-color: #232323;
    color: #00cec9;
}

.editor-footer {
    padding: 0.7rem 1.2rem;
    background-color: var(--background);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn var(--transition-fast);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: var(--surface);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow);
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    animation: slideIn var(--transition-normal);
}

@keyframes slideIn {
    from {
        transform: translateY(-70px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 1.7rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    z-index: 2;
}

.close-modal:hover {
    color: var(--accent);
    transform: scale(1.1);
}

#modal-title {
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    font-size: 1.4rem;
}

#modal-body {
    margin-top: 1.2rem;
}

.export-options, .trash-actions {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.export-options button, .trash-actions button {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1rem;
    font-weight: 500;
}

.export-options button:hover, .trash-actions button:hover {
    background-color: var(--hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px var(--shadow);
}

.export-options button i, .trash-actions button i {
    color: var(--primary);
    font-size: 1.1rem;
}

.trash-actions .btn-danger {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    color: var(--danger);
}

.trash-actions .btn-danger i {
    color: var(--danger);
}

.trash-actions .btn-danger:hover {
    background-color: var(--danger);
    color: white;
}

.trash-actions .btn-danger:hover i {
    color: white;
}

textarea.export-content {
    width: 100%;
    height: 200px;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--background);
    color: var(--text-primary);
    resize: none;
    font-family: 'Consolas', 'Courier New', monospace;
    margin-top: 1.2rem;
    box-shadow: inset 0 2px 4px var(--shadow);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .editor-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .text-options {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 1.2rem;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    /* Explicitly position elements in header for mobile */
    .logo-container {
        order: 1; /* Logo on the left */
        flex: 1;
    }
    
    .hamburger-menu {
        order: 3; /* Hamburger on the right */
        display: block !important; /* Force display on mobile */
        padding: 10px;
        background: rgba(255, 255, 255, 0.3);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        border-radius: 8px;
        transition: all var(--transition-fast);
        margin-left: auto; /* Push to the right */
        position: relative;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
        z-index: 100;
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hamburger-menu:hover {
        background: rgba(255, 255, 255, 0.4);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    }
    
    .hamburger-icon {
        width: 26px;
        height: 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
    }
    
    .hamburger-icon span {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background-color: white;
        border-radius: 3px;
        opacity: 1;
        transform: rotate(0deg);
        transition: .25s ease-in-out;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .header-btns {
        order: 2; /* Header buttons in the middle */
        display: none; /* Hide on mobile */
    }
    
    .main-content {
        flex-direction: column;
    }
    
    /* Hide sidebar completely in mobile view */
    .sidebar {
        display: none;
    }
    
    /* Make editor container full screen */
    .editor-container {
        flex: 1;
        width: 100%;
        height: calc(100vh - 58px); /* Account for header height */
        overflow: hidden;
        position: relative;
        padding-bottom: 70px; /* Extra space for mobile footer */
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .btn {
        width: 34px;
        height: 34px;
    }
    
    .category {
        padding: 0.7rem 1rem;
    }
    
    .note-item {
        padding: 0.7rem 1rem;
    }
    
    #note-title {
        font-size: 1.1rem;
        width: 60%;
    }
    
    .editor {
        font-size: 16px;
        line-height: 1.7;
        padding: 1rem;
        padding-bottom: 150px; /* Add significant bottom padding to ensure all content is visible */
        min-height: 70vh;
    }
    
    .editor-toolbar {
        padding: 0.6rem;
    }
    
    .editor-footer {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .hamburger-icon span:nth-child(1) {
        top: 0;
    }
    
    .hamburger-icon span:nth-child(2) {
        top: 10px;
    }
    
    .hamburger-icon span:nth-child(3) {
        top: 20px;
    }
}

@media (max-width: 480px) {
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    #note-title {
        width: 100%;
    }
    
    .editor-actions {
        align-self: flex-end;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 1s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 8px;
    border: 2px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Tooltip Styles */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--surface);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px var(--shadow);
    z-index: 10;
    pointer-events: none;
    animation: fadeIn 0.2s;
}

/* Extra Design Elements */
.btn::before, .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: inherit;
    pointer-events: none;
}

.btn:hover::before, .btn-primary:hover::before {
    opacity: 1;
}

.note-item.trashed {
    position: relative;
    overflow: hidden;
}

.note-item.trashed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(231, 76, 60, 0.05),
        rgba(231, 76, 60, 0.05) 10px,
        rgba(231, 76, 60, 0.1) 10px,
        rgba(231, 76, 60, 0.1) 20px
    );
    pointer-events: none;
}

/* Syntax highlighting colors */
.html-tag { color: #e34c26; }
.css-property { color: #264de4; }
.js-keyword { color: #f0db4f; }
.json-key { color: #009688; }
.markdown-heading { color: #4078c0; }

.dark-theme .html-tag { color: #ff6b6b; }
.dark-theme .css-property { color: #54a0ff; }
.dark-theme .js-keyword { color: #ffeaa7; }
.dark-theme .json-key { color: #00cec9; }
.dark-theme .markdown-heading { color: #74b9ff; }

/* Empty Message Styles */
.empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
    text-align: center;
    height: 100%;
}

.empty-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-message p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Notifications */
#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notification {
    display: flex;
    align-items: center;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    animation: slideInRight 0.3s, fadeOut 0.5s 2.5s forwards;
    overflow: hidden;
    border-left: 4px solid var(--primary);
}

.notification-icon {
    margin-right: 14px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.notification-message {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Import File Types List */
.import-file-types {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.import-file-types li {
    background-color: var(--background);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.import-file-types li:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px var(--shadow);
    border-color: var(--primary);
    color: var(--text-primary);
}

.import-file-types li i {
    color: var(--primary);
}

/* Code syntax styles for imported files */
pre {
    background-color: var(--editor-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    line-height: 1.5;
    border: 1px solid var(--border);
}

code {
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.dark-theme code {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Markdown specific styles */
.editor h1, .editor h2, .editor h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.editor a {
    color: var(--primary);
    text-decoration: none;
}

.editor a:hover {
    text-decoration: underline;
}

.editor ul, .editor ol {
    padding-left: 2rem;
    margin: 0.5rem 0;
}

.editor ul li, .editor ol li {
    margin-bottom: 0.25rem;
}

/* Hamburger Menu Styles */
.hamburger-menu {
    display: none; /* Initially hidden on desktop */
    cursor: pointer;
    z-index: 20;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 23px;
    height: 24px;
    position: relative;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    opacity: 1;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hamburger-icon span:nth-child(1) {
    top: 0;
}

.hamburger-icon span:nth-child(2) {
    top: 10px;
}

.hamburger-icon span:nth-child(3) {
    top: 20px;
}

/* Hamburger icon transform to X */
.hamburger-icon.open span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger-icon.open span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity 0.3s, visibility 0.3s;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background-color: var(--surface);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s;
    overflow-y: auto; /* Make the entire content scrollable */
    z-index: 101;
    /* Improve scrolling behavior */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.mobile-nav-overlay.open .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background-color: var(--surface);
    z-index: 5;
}

.mobile-nav-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.close-mobile-nav {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-mobile-nav:hover {
    color: var(--primary);
}

.mobile-nav-actions {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-btn {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    background-color: var(--background);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    gap: 0.8rem;
    text-align: left;
}

.mobile-nav-btn:hover {
    background-color: var(--hover);
    transform: translateY(-2px);
}

.mobile-nav-btn i {
    color: var(--primary);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.mobile-nav-categories {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background-color: var(--surface);
    z-index: 5;
}

.mobile-nav-categories h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.mobile-category {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    gap: 0.8rem;
    position: relative;
}

.mobile-category:hover {
    background-color: var(--hover);
}

.mobile-category.active {
    background-color: var(--primary);
    color: white;
}

.mobile-category.active i {
    color: white;
}

.mobile-category i {
    color: var(--primary);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.mobile-note-count {
    position: absolute;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background-color: var(--background);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

.mobile-category.active .mobile-note-count {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Mobile Notes Section */
.mobile-notes-section {
    padding: 1rem 0.5rem;
    border-top: 1px solid var(--border);
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: none; /* Remove height restriction to show all notes */
    overflow: visible; /* Allow contents to be fully visible */
}

.mobile-notes-section h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 1rem 0.5rem;
    font-weight: 500;
    padding: 0.5rem 0;
    background-color: var(--surface);
}

/* Mobile Notes List for Hamburger Menu */
.mobile-notes-list {
    flex: 1;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow-y: visible; /* Show all contents */
    max-height: none; /* Remove height restriction */
    -webkit-overflow-scrolling: touch;
}

.mobile-notes-list .note-item {
    margin: 0 1rem 0.8rem;
    border-radius: 8px;
    background-color: var(--background);
    border-left: 3px solid transparent;
    box-shadow: 0 1px 3px var(--shadow);
    padding: 1rem;
    /* Improve touch targets for mobile */
    min-height: 4.5rem;
    touch-action: pan-y; /* Allow vertical scrolling */
}

.mobile-notes-list .note-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px var(--shadow);
    background-color: var(--hover);
}

.mobile-notes-list .note-item.active {
    border-left: 4px solid var(--primary);
    background-color: rgba(74, 111, 165, 0.15);
}

.mobile-notes-list .empty-message {
    padding: 1rem;
    height: auto;
}

.mobile-notes-list .note-item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

.mobile-notes-list .note-item-preview {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    display: block;
    line-height: 1.4;
    overflow: hidden;
    max-height: none;
    white-space: pre-line;
}

.mobile-notes-list .note-item-date {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    border-top: 1px dashed var(--border);
    padding-top: 0.5rem;
}

.mobile-notes-list .note-item-date span {
    color: var(--text-secondary);
    opacity: 0.9;
}

.mobile-notes-list .note-item-words {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--surface-variant);
    color: var(--text-secondary);
}

.mobile-notes-list .note-item-words::before {
    content: '\f15c';
    font-family: 'Font Awesome 5 Free';
    margin-right: 4px;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Make sure mobile note count badges are visible */
.mobile-note-count {
    right: 12px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* About Popup Styles */
.about-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 200;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: fadeIn var(--transition-fast);
}

.about-card {
    background: linear-gradient(145deg, var(--surface), var(--background));
    border-radius: 16px;
    box-shadow: 0 15px 35px var(--shadow);
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    animation: slideInAndPulse 0.5s ease-out;
    border: 1px solid var(--primary);
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        rgba(74, 111, 165, 0.1), 
        transparent 30%
    );
    animation: rotate 6s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    100% { transform: rotate(1turn); }
}

@keyframes slideInAndPulse {
    0% {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    70% {
        transform: translateY(0) scale(1.03);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    color: var(--text-primary);
}

.about-content h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-align: center;
    text-shadow: 0 2px 3px var(--shadow);
    position: relative;
    padding-bottom: 0.8rem;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 10px;
}

.about-info {
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-info p {
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-info p strong {
    color: var(--primary);
    min-width: 110px;
    display: inline-block;
}

.about-links {
    margin: 1rem 0;
}

.about-links a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.about-links a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.social-links {
    margin-top: 1rem;
}

.social-links h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.nonestyle{
    text-decoration: none;
}

.manishinc{
    color: rgba(166, 166, 166, 0.444);
    justify-content: center;
    font-size: large;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 5px var(--shadow);
}

.social-icons a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px var(--shadow);
}

.social-icons a:nth-child(1) {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-icons a:nth-child(2) {
    background: linear-gradient(45deg, #3b5998, #2f55a4);
}

.social-icons a:nth-child(3) {
    background: linear-gradient(45deg, #0077b5, #00a0dc);
}

.social-icons a:nth-child(4) {
    background: linear-gradient(45deg, #000000, #333333);
}

.thank-you-btn {
    align-self: center;
    margin-top: 1rem;
    background: black;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    animation: pulse 2s infinite;
    /* box-shadow: 0 5px 15px rgba(132, 219, 60, 0.4); */
    transition: all 0.3s;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.thank-you-btn:hover {
    transform: translateY(-5px) scale(1.05);
    /* box-shadow: 0 8px 20px rgba(255, 112, 67, 0.6); */
}

.close-about {
    position: absolute;
    top: 1rem;
    right: 0.5rem;
    font-size: 2.7rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    z-index: 2;
    width: 36px;
    height: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
}

.close-about:hover {
    color: var(--accent);
    background-color: rgba(0, 0, 0, 0.2);
}

/* Media query adjustments for About popup */
@media (max-width: 768px) {
    .about-card {
        padding: 1.5rem;
        width: 95%;
    }
    
    .about-content h2 {
        font-size: 1.5rem;
    }
    
    .about-info p strong {
        min-width: 100px;
    }
}

/* Special styling for About button in mobile */
#mobile-about {
    background: linear-gradient(145deg, var(--background), var(--surface));
    border: 1px solid rgba(74, 111, 165, 0.2);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

#mobile-about::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

#mobile-about i {
    color: var(--accent);
}

.mobile-about-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    margin-left: 8px;
    cursor: pointer;
    animation: pulse 2s infinite;
    vertical-align: middle;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.mobile-about-badge i {
    font-size: 0.7rem;
}

.about-info p a {
    color: inherit;
    transition: color var(--transition-fast);
    margin-left: 5px;
}

.about-info p a i.fa-instagram {
    background: -webkit-linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
    vertical-align: middle;
}

.about-info p a:hover {
    opacity: 0.8;
} 

h3{
    text-align: center;
}

/* Mobile Footer Popup */
.mobile-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 0 1rem 1rem;
}

.mobile-footer-popup {
    background-color: var(--surface);
    border-radius: 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid var(--border);
    animation: slideUpFade 0.3s ease-out;
}

@keyframes slideUpFade {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-word-info, 
.mobile-timestamp-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mobile-word-info i,
.mobile-timestamp-info i {
    color: var(--primary);
    width: 18px;
    text-align: center;
}

#mobile-word-count {
    font-weight: 500;
}

@media (max-width: 768px) {
    .mobile-footer {
        display: block;
    }
    
    .editor-footer {
        display: none;
    }
}

.mobile-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.mobile-popup-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.close-mobile-footer {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-mobile-footer:hover {
    background-color: var(--hover);
    color: var(--text-primary);
}

/* Confirmation Dialog */
.confirm-modal {
    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;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.confirm-content {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: bounceIn 0.3s ease-out;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border);
}

.confirm-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.confirm-message i {
    color: var(--warning);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.confirm-message p {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@keyframes bounceIn {
    0% { 
        transform: scale(0.8);
        opacity: 0;
    }
    70% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

/* Make sure mobile content is scrollable when needed */
@media (max-height: 600px) {
    .mobile-notes-list {
        max-height: 40vh;
    }
}

/* Mobile menu hint */
.mobile-menu-hint {
    display: none;
    text-align: center;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-radius: 6px;
    margin: 0 1rem 0.8rem;
    background-color: var(--background);
    box-shadow: 0 1px 3px var(--shadow);
}

.mobile-menu-hint i {
    color: var(--primary);
}

/* Mobile Search Bar */
.mobile-search-bar {
    padding: 1rem 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.mobile-search-bar input {
    width: 100%;
    padding: 0.85rem 2.2rem 0.85rem 2.7rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--background);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 5px var(--shadow);
}

.mobile-search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2), 0 4px 10px var(--shadow);
    transform: translateY(-2px);
}

.mobile-search-bar i {
    position: absolute;
    left: 2.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Responsive adjustments for larger screens */
@media (min-width: 769px) {
    .mobile-nav-overlay {
        display: none !important;
    }
}

/* More fine-tuned responsive adjustments */
@media (max-width: 480px) {
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    #note-title {
        width: 100%;
    }
    
    .editor-actions {
        align-self: flex-end;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .editor-toolbar {
        padding: 0.6rem;
    }
    
    .text-options {
        gap: 0.3rem;
    }
    
    .toolbar-btn {
        width: 30px;
        height: 30px;
    }
    
    #syntax-mode, #highlight-color {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .import-file-types {
        flex-direction: column;
    }
    
    .import-file-types li {
        width: 100%;
    }
}

/* Ensure proper scrolling on tablets and phones */
@media (max-width: 768px) and (min-width: 481px) {
    .mobile-nav-content {
        width: 70%; /* Slightly narrower on tablets */
        max-width: 400px;
    }
    
    .mobile-notes-section {
        max-height: 70vh; /* Slightly larger area for tablets */
    }
    
    /* Prevent mobile nav from closing when selecting categories on tablets */
    .handleMobileCategory {
        transition-delay: 0.2s; /* Give time to see what's selected */
    }
}

/* Small phone optimizations */
@media (max-width: 360px) {
    .mobile-nav-content {
        width: 90%; /* Use more screen space on very small devices */
    }
    
    .mobile-notes-list .note-item {
        padding: 0.8rem;
        margin: 0 0.5rem 0.6rem;
    }
    
    .mobile-note-count {
        right: 8px;
        min-width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
}

/* Ensure all categories are visible */
.mobile-nav-categories {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    background-color: var(--surface);
    z-index: 5;
}

@media (max-width: 768px) {
    .mobile-nav-overlay.open {
        display: block;
    }
    
    .mobile-nav-content {
        display: flex !important;
        flex-direction: column;
        max-height: 100%;
    }
    
    /* Mobile nav structure adjustments */
    .mobile-nav-header,
    .mobile-search-bar,
    .mobile-nav-actions,
    .mobile-nav-categories {
        flex-shrink: 0; /* Don't allow these sections to shrink */
    }
    
    .mobile-notes-section {
        flex: 1;
        overflow-y: visible; /* Show all notes */
    }
    
    .mobile-notes-list {
        padding-bottom: 50px; /* Add padding at bottom to ensure all notes are visible */
    }
    
    /* Ensure list items are properly spaced */
    .mobile-notes-list .note-item {
        margin-bottom: 1rem;
    }
}

/* Imported HTML content styling */
.html-content {
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: var(--editor-bg);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    line-height: 1.5;
    tab-size: 2;
    color: var(--editor-text);
}

/* Ensure imported content doesn't break layout */
.editor pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.zoom-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background-color: var(--hover);
    color: var(--primary);
    transform: translateY(-2px);
}

.zoom-level {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
    user-select: none;
}

/* Zoom Effect Classes */
.editor.zoom-75 {
    font-size: 11.25px; /* 75% of default 15px */
}

.editor.zoom-90 {
    font-size: 13.5px; /* 90% of default 15px */
}

.editor.zoom-100 {
    font-size: 15px; /* Default size */
}

.editor.zoom-110 {
    font-size: 16.5px; /* 110% of default 15px */
}

.editor.zoom-125 {
    font-size: 18.75px; /* 125% of default 15px */
}

.editor.zoom-150 {
    font-size: 22.5px; /* 150% of default 15px */
}

.editor.zoom-175 {
    font-size: 26.25px; /* 175% of default 15px */
}

.editor.zoom-200 {
    font-size: 30px; /* 200% of default 15px */
}

/* Make sure mobile version has zoom controls too */
@media (max-width: 768px) {
    .zoom-controls {
        padding-left: 5px;
        gap: 4px;
    }
    
    .zoom-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .zoom-level {
        font-size: 0.75rem;
        min-width: 32px;
    }
}