@import url('./colors.css');

/* --- Unified Pro Color Palette for Sidebar Filters & App --- */
:root {
    --color-bg: #f6f9fc;
    --color-sidebar: #183153;
    --color-sidebar-text: #f6f9fc;
    --color-sidebar-hover: #223e6a;
    --color-sidebar-active: #2a4d7a;
    --color-card-bg: #fff;
    --color-table-bg: #f7fbff;
    --color-table-header-bg: #eaf3fa;
    --color-table-row-hover: #e0f0ff;
    --color-table-border: #e0e6ed;
    --color-text: #1a2a3a;
    --color-text-secondary: #5a6b7b;
    --color-tag-bg: #eaf3fa;
    --color-tag-text: #1766a6;
    --color-tag-bg-selected: #1766a6;
    --color-tag-text-selected: #fff;
    --color-tag-border-selected: #3fa7f7;
    --color-date-badge-bg: #e0f0ff;
    --color-date-badge-text: #1766a6;
    --color-time-badge-bg: #f7fbff;
    --color-time-badge-text: #183153;
}

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --transition-duration: 0.3s;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

/* Base Styles */
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 
                 'Helvetica Neue', Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove space between sidebar and main menu bar */
.sidebar {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}
.sidebar__header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}
.layout {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
body {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Layout */
.layout {
    display: flex;
    height: auto;
    align-items: flex-start;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(120deg, #fafdff 60%, #e0f0ff 100%) !important;
    color: #1766a6 !important;
    border-right: 2px solid #e0f0ff;
    box-shadow: 0 4px 24px 0 rgba(23,102,166,0.08);
    border-radius: 0;
    padding: 0 0 1rem 0;
    width: var(--sidebar-width);
    height: calc(100vh - 52px);
    min-height: calc(100vh - 52px);
    max-height: calc(100vh - 52px);
    flex-shrink: 0;
    align-self: flex-start;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    /* Remove scrollbars unless needed */
    scrollbar-width: thin;
    scrollbar-color: #e0e6ed #f7fbff;
    position: fixed;
    z-index: 10;
    top: 52px; /* Height of the navbar */
}

.sidebar__header {
    background: transparent;
    border-bottom: 1.5px solid #e0f0ff;
    padding: 1rem 1.5rem 0.75rem 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0;
}

.sidebar__logo {
    font-size: 1.7rem;
    font-weight: 900;
    color: #1766a6 !important;
    text-shadow: 0 2px 8px #e0f0ff, 0 2px 8px #18315344;
    letter-spacing: 1.5px;
}

.sidebar nav {
    order: 2;
    margin-top: 0.25rem;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar__nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #1766a6;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    font-weight: 700;
    transition: all 0.25s ease;
    margin-bottom: 0.4rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
    padding: 0.7rem 1rem;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 8px rgba(23, 102, 166, 0.05);
}

.sidebar__nav-item:hover, .sidebar__nav-item.active {
    background: #fff;
    color: #1766a6 !important;
    box-shadow: 0 4px 20px 0 rgba(63, 167, 247, 0.2);
    font-weight: 800;
    border-left: 4px solid #3fa7f7;
    transform: translateX(5px);
}

.sidebar__nav-icon {
    font-size: 1.35rem;
    width: 1.7rem;
    display: inline-flex;
    justify-content: center;
    color: #3fa7f7;
    filter: drop-shadow(0 2px 8px #3fa7f7aa);
    transition: all 0.25s ease;
}

.sidebar__nav-item:hover .sidebar__nav-icon,
.sidebar__nav-item.active .sidebar__nav-icon {
    color: #1766a6;
    transform: scale(1.1);
}

.sidebar__filters {
    order: 0;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding: 0 1.5rem 0.5rem 1.5rem !important;
    border-radius: 0;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1rem min(5vw, 2rem);
    padding-bottom: 1rem;
    background: var(--color-bg);
    min-width: 0;
    transition: all var(--transition-duration) ease;
    margin-left: var(--sidebar-width);
    margin-top: 52px; /* Height of the navbar */
}

/* Full width content (no sidebar) */
.main-content.full-width {
    margin-left: 0;
    padding: 1rem min(8vw, 3rem);
    max-width: 100%;
}

/* Pro Columns Layout */
.pro-columns {
    display: flex;
    gap: 2rem;
    width: 100%;
    margin: 0 auto;
}

.pro-column {
    flex: 1;
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Responsive adjustments for pro columns */
@media (max-width: 1024px) {
    .pro-columns {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .pro-column {
        width: 100%;
    }
}

/* --- Unified Pro Navbar Styles for ALL pages --- */
.main-navbar, .pro-navbar {
    background: linear-gradient(90deg, #fafdff 70%, #e0f0ff 100%);
    box-shadow: 0 4px 24px 0 rgba(23,102,166,0.10);
    border-bottom: 1.5px solid #e0f0ff;
    padding: 0.7rem 0 0.7rem 0;
    margin-bottom: 0 !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
    font-size: 1.13rem;
    height: 52px;
    box-sizing: border-box;
}
.main-navbar__logo {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1766a6;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 2.2rem;
    text-shadow: 0 2px 8px #e0f0ff;
}
.main-navbar__logo span {
    font-size: 1.13rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #1766a6;
}
.main-navbar__nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-end;
    padding-right: 2.2rem;
}
.main-navbar__nav-item {
    color: #1766a6;
    font-weight: 700;
    font-size: 1.08rem;
    padding: 0.45rem 1.2rem;
    border-radius: 7px;
    transition: background 0.18s, color 0.18s;
    text-decoration: none;
    letter-spacing: 0.01em;
    background: none;
    border: none;
    outline: none;
}
.main-navbar__nav-item.active, .main-navbar__nav-item:hover {
    background: #e0f0ff;
    color: #1e88e5;
}

@media (max-width: 700px) {
    .main-navbar, .pro-navbar {
        flex-direction: column;
        padding: 0.5rem 0;
    }
    .main-navbar__logo {
        font-size: 1.1rem;
        padding-left: 1rem;
    }
    .main-navbar__nav {
        gap: 0.5rem;
        padding-right: 1rem;
    }
    .main-navbar__nav-item {
        font-size: 1rem;
        padding: 0.35rem 0.7rem;
    }
}

/* Cards */
.card {
    background: var(--color-card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card--no-padding {
    padding: 0;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.filters__title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 600;
}

/* Pro Filters Card */
.filters--pro {
    border-radius: 1rem !important;
    padding: 1.5rem !important;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    border: none !important; /* Remove the border */
    background: transparent !important; /* Make background transparent */
    box-shadow: none !important; /* Remove any box shadow */
}

.filters__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-sidebar-text);
    display: inline-block; /* Allow elements to be in the same row */
}

.filters__group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    width: 90%; /* Reduce width of the entire filter group */
}

/* Filters fields: match sidebar background */
.filters__field {
    display: flex;
    align-items: center;
    background: rgba(34, 62, 106, 0.7) !important;
    box-shadow: none;
    border-radius: 1.2rem;
    border: 1px solid rgba(63, 167, 247, 0.3) !important;
    padding: 0.25rem 1rem;
    gap: 0.5rem;
    min-width: 180px;
    transition: box-shadow 0.2s;
    color: var(--color-sidebar-text);
}

.filters__icon {
    color: #1766a6 !important;
    opacity: 0.85;
}

.filters__input,
.filter-select {
    color: #1766a6 !important;
    background: transparent !important;
    font-weight: 600;
    border: none;
    outline: none;
    font-size: 1rem;
    width: 100%;
}

.filters__input:focus,
.filter-select:focus {
    background: #e0f0ff !important;
    color: #1766a6 !important;
    border-radius: 1.2rem;
}

.filters__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    margin-top: 1.5rem;
}

.filters__action {
    background: linear-gradient(90deg, #223e6a 60%, #3fa7f7 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(23,102,166,0.10);
    border-radius: 2rem;
    border: none !important;
    font-weight: 700;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

/* --- Pro Sidebar and Filters Panel Styling --- */
.sidebar {
    background: linear-gradient(120deg, #fafdff 60%, #e0f0ff 100%) !important;
    color: #1766a6 !important;
    border-right: 2px solid #e0f0ff;
    box-shadow: 0 4px 24px 0 rgba(23,102,166,0.08);
    border-radius: 0;
    height: calc(100vh - 52px);
}

.sidebar__header {
    background: transparent;
    border-bottom: 1.5px solid #e0f0ff;
    padding: 2rem 2rem 1rem 2rem;
    margin-bottom: 2.5rem;
}

.sidebar__logo {
    font-size: 1.7rem;
    font-weight: 900;
    color: #1766a6 !important;
    text-shadow: 0 2px 8px #e0f0ff, 0 2px 8px #18315344;
    letter-spacing: 1.5px;
}

.sidebar__nav-item {
    color: #1766a6;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1.2rem;
    font-weight: 700;
    transition: all 0.25s ease;
    padding: 0.8rem 1.2rem;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 8px rgba(23, 102, 166, 0.05);
}

.sidebar__nav-item:hover, .sidebar__nav-item.active {
    background: #fff;
    color: #1766a6 !important;
    box-shadow: 0 4px 20px 0 rgba(63, 167, 247, 0.2);
    font-weight: 800;
    border-left: 4px solid #3fa7f7;
    transform: translateX(5px);
}

/* Filters Panel - Pro Look */
/* .filters, .filters--pro, .filters--active {
    /* background: linear-gradient(120deg, #fafdff 60%, #e0f0ff 100%) !important;
    color: #1766a6 !important;
    border-radius: 1.2rem !important;
    box-shadow: 0 4px 24px 0 rgba(23,102,166,0.10);
    border: 1.5px solid #e0f0ff !important;
    padding: 1.2rem 1.5rem !important;
    margin-bottom: 1rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s; */
/* }  */

.filters__title {
    color: #1766a6 !important;
    font-weight: 900;
    letter-spacing: 0.03em;
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
    display: inline-block; /* Allow elements to be in the same row */
    margin-right: 1rem; /* Add space between title and button */
}

.filters__field {
    background: #fff !important;
    color: #1766a6 !important;
    border: 1.5px solid #e0f0ff !important;
    border-radius: 0.9rem;
    box-shadow: 0 1px 6px 0 rgba(224, 240, 255, 0.5);
    padding: 0.2rem 0.8rem;
    gap: 0.4rem;
    min-width: 180px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-bottom: 0.4rem;
}

.filters__icon {
    color: #1766a6 !important;
    opacity: 0.85;
    font-size: 1rem;
}

.filters__input, .filter-select {
    color: #1766a6 !important;
    background: transparent !important;
    font-weight: 600;
    border: none;
    outline: none;
    font-size: 0.95rem;
    width: 100%;
    padding: 0.4rem 0;
}

.filters__input:focus, .filter-select:focus {
    background: #e0f0ff !important;
    color: #1766a6 !important;
    border-radius: 1.2rem;
    box-shadow: 0 2px 8px #3fa7f733;
}

/* Pro Button Colors for Filters Actions */
.filters__action.filters__switch {
    background: #fff !important;
    color: #1766a6 !important;
    border: 1.5px solid #e0f0ff !important;
    border-radius: 1.2rem;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 6px 0 #e0f0ff;
    padding: 0.7rem 1.5rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s;
    outline: none;
    white-space: nowrap; /* Prevent text wrapping */
    display: flex; /* Use flexbox for better content alignment */
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
}

.filters__action.filters__switch:hover, .filters__action.filters__switch:focus {
    background: #f7fbff !important;
    color: #1766a6 !important;
    border-left: 4px solid #3fa7f7 !important;
    box-shadow: 0 4px 20px 0 rgba(63, 167, 247, 0.2);
    transform: translateX(5px);
}

.filters__action.filters__clear {
    background: #fff !important;
    color: #ff6b6b !important;
    border: 1.5px solid #ffb199 !important;
    border-radius: 1.2rem;
    font-weight: 700;
    box-shadow: 0 1px 6px 0 rgba(255,107,107,0.10);
    padding: 0.7rem 1.5rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s;
}

.filters__action.filters__clear:hover, .filters__action.filters__clear:focus {
    background: #fff9f9 !important;
    color: #ff6b6b !important;
    border-left: 4px solid #ff6b6b !important;
    box-shadow: 0 4px 20px 0 rgba(255, 107, 107, 0.2);
    transform: translateX(5px);
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
}

.notes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-table-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.notes-table th,
.notes-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-table-border);
    text-align: left;
}

.notes-table th {
    background: var(--color-table-header-bg);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
}

.notes-table tr:last-child td {
    border-bottom: none;
}

.notes-table tbody tr {
    background: var(--color-card-bg, #fff);
    border-radius: var(--border-radius);
    transition: 
        box-shadow 0.4s cubic-bezier(0.4,0,0.2,1),
        background 0.4s cubic-bezier(0.4,0,0.2,1),
        transform 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
    position: relative;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.notes-table tbody tr:hover {
    background: var(--color-table-row-hover, #f5f8fc);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.notes-table tbody tr::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
    border-radius: var(--border-radius);
    z-index: 0;
}

.notes-table tbody tr:hover::after {
    opacity: 1;
}

.notes-table td {
    transition: background-color 0.4s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    z-index: 1;
}

.notes-table__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--color-text);
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    border: none;
    transition: none;
    text-align: left;
    width: 100%;
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    background: var(--color-tag-bg);
    color: var(--color-tag-text);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tag--selected {
    background: var(--color-tag-bg-selected);
    color: var(--color-tag-text-selected);
    border-color: var(--color-tag-border-selected);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.badge--category {
    background: #e0f0ff;
    color: #1766a6;
    border: 1px solid #b3d8f7;
}

.badge--difficulty {
    background: #f7fbff;
    color: #183153;
    border: 1px solid #e0e6ed;
}

.badge--easy {
    background: #e3f7e3;
    color: #217a21;
    border: 1px solid #b6e6b6;
}
.badge--medium {
    background: #fffacc;
    color: #b89c00;
    border: 1px solid #fff3b3;
}
.badge--hard, .badge--difficult {
    background: #ffd6d6;
    color: #b80000;
    border: 1px solid #ffb3b3;
}

/* Date & Time */
.date-badge {
    background: var(--color-date-badge-bg);
    color: var(--color-date-badge-text);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin-right: 0.5rem;
}

.time-badge {
    background: var(--color-time-badge-bg);
    color: var(--color-time-badge-text);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    font-family: 'Roboto Mono', monospace;
}

/* Revision time formatting */
.revision-badge {
    display: inline-block;
    background: #e3e9f7;
    color: #2c3e50;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.92rem;
    padding: 0.25rem 0.85rem;
    border-radius: 0.5rem;
    font-weight: 600;
    margin-right: 0.5rem;
    letter-spacing: 0.03em;
    box-shadow: none;
}
.revision-badge--time {
    background: #2c3e50;
    color: #fff;
    margin-left: 0.25rem;
    box-shadow: none;
}


/* Professional dropdown styling */
select.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231766a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select option {
    background: #ffffff;
    color: #1766a6;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(224, 240, 255, 0.5);
    transition: all 0.2s ease;
}

.filter-select option:checked {
    background: linear-gradient(90deg, #e0f0ff 0%, #fafdff 100%);
    color: #1766a6;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(23, 102, 166, 0.08);
}

.filter-select option:hover {
    background: #e0f0ff;
}

/* For Chrome/Edge: style the dropdown popup */
.filter-select:focus {
    outline: none;
    border: 1.5px solid #3fa7f7;
    box-shadow: 0 4px 12px rgba(63, 167, 247, 0.15);
}

/* For Firefox: style the dropdown popup */
@-moz-document url-prefix() {
  .filter-select {
    scrollbar-color: #3fa7f7 #fafdff;
    scrollbar-width: thin;
  }
  .filter-select option {
    padding: 0.6rem 1rem;
  }
}

/* Dropdown field styling when focused */
.filters__field:has(select:focus) {
    border: 1.5px solid #3fa7f7 !important;
    box-shadow: 0 4px 16px rgba(63, 167, 247, 0.15) !important;
    background: #ffffff !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
        padding: 1rem 0.5rem;
    }
    
    .sidebar__logo-text {
        display: none;
    }
    
    .sidebar__nav-item-text {
        display: none;
    }
    
    .sidebar__nav-item {
        justify-content: center;
        padding: 0.75rem;
        border-left: none;
        border-bottom: 4px solid transparent;
    }
    
    .sidebar__nav-item:hover,
    .sidebar__nav-item.active {
        border-left: none;
        border-bottom: 4px solid #3fa7f7;
        transform: translateY(3px);
    }
    
    .main-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        padding: 0.5rem 1rem;
    }
    
    .sidebar__header {
        width: auto;
        margin-bottom: 0;
        margin-right: auto;
    }
    
    .sidebar nav {
        display: flex;
        gap: 0.5rem;
    }
    
    .sidebar__nav-item {
        margin-bottom: 0;
        padding: 0.6rem 1rem;
        border-left: none;
        border-bottom: 4px solid transparent;
    }
    
    .sidebar__nav-item:hover,
    .sidebar__nav-item.active {
        border-left: none;
        border-bottom: 4px solid #3fa7f7;
        transform: translateY(3px);
    }
    
    .filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ============================== */
/* MOBILE-ONLY RESPONSIVE STYLES */
/* ============================== */

/* Ensure mobile elements are hidden on desktop */
@media (min-width: 769px) {
    .hamburger-menu,
    .mobile-sidebar-toggle,
    .mobile-sidebar-overlay,
    .notes-cards-container {
        display: none !important;
    }
}

/* Mobile styles - only apply to screens 768px and below */
@media (max-width: 768px) {
    /* Hide desktop table on mobile */
    .notes-table table {
        display: none !important;
    }
    
    /* Show mobile card grid */
    .notes-cards-container {
        display: block !important;
    }
    
    /* Hamburger menu styling */
    .hamburger-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 1001;
        transition: all 0.3s ease;
    }
    
    .hamburger-line {
        width: 100%;
        height: 2px;
        background: var(--color-text);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Mobile navigation */
    .main-navbar__nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #183153 0%, #223e6a 100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        transition: left 0.3s ease;
        padding-top: 80px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .main-navbar__nav.active {
        left: 0;
    }
    
    .main-navbar__nav-item {
        padding: 1rem 2rem;
        color: #f6f9fc;
        text-decoration: none;
        font-weight: 600;
        border-bottom: 1px solid rgba(246, 249, 252, 0.1);
        transition: all 0.3s ease;
    }
    
    .main-navbar__nav-item:hover {
        background: rgba(246, 249, 252, 0.1);
        padding-left: 2.5rem;
    }
    
    /* Mobile sidebar toggle */
    .mobile-sidebar-toggle {
        display: block !important;
        position: fixed;
        top: 100px;
        right: 20px;
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        z-index: 1002;
        box-shadow: 0 4px 12px rgba(23, 102, 166, 0.3);
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(23, 102, 166, 0.4);
    }
    
    /* Mobile overlay */
    .mobile-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile sidebar positioning */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: var(--color-bg);
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 90px 20px 20px;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Adjust layout for mobile */
    .layout {
        flex-direction: column;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 0 0 0;
    }
    
    /* Mobile card grid styles */
    .notes-cards-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 20px;
        background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
        min-height: calc(100vh - 80px);
    }
    
    /* Individual note card styling */
    .note-card {
        background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
        border-radius: 16px;
        padding: 20px;
        box-shadow: 
            0 8px 24px rgba(23, 102, 166, 0.1),
            0 4px 12px rgba(0, 0, 0, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(23, 102, 166, 0.08);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        position: relative;
        overflow: hidden;
    }
    
    .note-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #1766a6 0%, #3fa7f7 50%, #22c55e 100%);
        border-radius: 16px 16px 0 0;
    }
    
    .note-card:hover {
        transform: translateY(-4px);
        box-shadow: 
            0 16px 32px rgba(23, 102, 166, 0.15),
            0 8px 16px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    
    .note-card:active {
        transform: translateY(-2px);
    }
    
    /* Card title */
    .note-card-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1766a6;
        margin: 0 0 12px 0;
        line-height: 1.3;
        text-shadow: 0 1px 2px rgba(23, 102, 166, 0.1);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Card metadata container */
    .note-card-meta {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }
    
    /* Card badges */
    .note-card-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    /* Difficulty badges */
    .note-card-badge.difficulty-easy {
        background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
        color: #15803d;
        border: 1px solid rgba(34, 197, 94, 0.2);
    }
    
    .note-card-badge.difficulty-medium {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        color: #d97706;
        border: 1px solid rgba(245, 158, 11, 0.2);
    }
    
    .note-card-badge.difficulty-difficult {
        background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
        color: #dc2626;
        border: 1px solid rgba(239, 68, 68, 0.2);
    }
    
    /* Category and tag badges */
    .note-card-badge.category {
        background: linear-gradient(135deg, #e0f0ff 0%, #cce7ff 100%);
        color: #1766a6;
        border: 1px solid rgba(23, 102, 166, 0.2);
    }
    
    .note-card-badge.tag {
        background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
        color: #7c3aed;
        border: 1px solid rgba(124, 58, 237, 0.2);
    }
    
    /* Revision time */
    .note-card-time {
        font-size: 0.7rem;
        color: #64748b;
        margin-top: 8px;
        padding: 4px 8px;
        background: rgba(100, 116, 139, 0.1);
        border-radius: 6px;
        text-align: center;
        font-weight: 500;
    }
    
    /* Empty state for mobile */
    .mobile-empty-state {
        grid-column: 1 / -1;
        padding: 3rem 1rem;
        text-align: center;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 251, 255, 0.8) 100%);
        border-radius: 20px;
        border: 2px dashed rgba(23, 102, 166, 0.2);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .mobile-empty-state-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.6;
    }
    
    .mobile-empty-state-text {
        color: #64748b;
        font-size: 1rem;
        font-weight: 500;
        margin: 0;
    }
}

/* Very small screens - single column cards */
@media (max-width: 480px) {
    .notes-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
    
    .note-card {
        padding: 16px;
    }
    
    .mobile-sidebar-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        right: 16px;
        top: 90px;
    }
    
    .sidebar {
        width: 280px;
        padding: 80px 16px 16px;
    }
    
    .main-navbar__nav {
        width: 260px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Highlight active filter controls */
.filters__input--active {
    border: 2px solid #3fa7f7 !important;
    background: rgba(63,167,247,0.10) !important;
    color: #fff;
    box-shadow: 0 4px 16px 0 #183153, 0 2px 8px 0 rgba(23,102,166,0.10);
    font-weight: 700;
    outline: none;
    transition: border 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
    border-radius: 1.5rem;
    filter: drop-shadow(0 2px 8px #e0f0ff);
    letter-spacing: 0.02em;
}

.filters__input--active:focus {
    background: rgba(63,167,247,0.18) !important;
    border-color: #fff !important;
}

.filters__input--active::placeholder {
    color: #3fa7f7;
    opacity: 0.7;
    font-weight: 500;
}

.filters__switch--active {
    background: #e0f0ff !important;
    color: #1766a6 !important;
    border: 1.5px solid #3fa7f7 !important;
    border-left: 4px solid #3fa7f7 !important;
    box-shadow: 0 4px 20px 0 rgba(63, 167, 247, 0.2);
    font-weight: 800;
}

/* --- Pro Active State for Filters (Distinct Visual) --- */
.filters--active {
    border: 2.5px solid #1766a6 !important;
    border-left: 7px solid #3fa7f7 !important;
    box-shadow: 0 0 0 7px #e0f6ff, 0 8px 32px rgba(23,102,166,0.18);
    background: linear-gradient(120deg, #fafdff 40%, #e0f6ff 100%) !important;
    transition: border 0.2s, box-shadow 0.2s, background 0.2s, transform 0.18s;
    padding: 2.2rem 2.5rem 2.2rem 2.2rem !important;
    margin-bottom: 2.5rem !important;
    border-radius: 1.7rem !important;
    position: relative;
}

.filters--active:hover {
    transform: translateY(-2px) scale(1.012);
    box-shadow: 0 0 0 9px #e0f6ff, 0 12px 40px rgba(23,102,166,0.22);
}

.filters--active .filters__field {
    background: #fafdff !important;
    color: #1766a6 !important;
    border: 2px solid #3fa7f7 !important;
    box-shadow: 0 2px 12px #e0f0ff;
    padding: 0.6rem 1.5rem;
    margin-right: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 1.3rem;
    font-weight: 600;
}

.filters--active .filters__input:focus,
.filters--active .filters__input:not([value=""]) {
    border: 2px solid #1766a6 !important;
    background: #fff !important;
    color: #1766a6 !important;
    box-shadow: 0 2px 12px #3fa7f733;
    font-weight: 700;
    outline: none;
    border-radius: 1.3rem;
    padding: 0.6rem 1.5rem;
    letter-spacing: 0.01em;
}

.filters--active .filters__switch.active,
.filters--active .filters__switch--active {
    background: #e0f0ff !important;
    color: #1766a6 !important;
    font-weight: 800;
    border: 1.5px solid #3fa7f7 !important;
    border-left: 4px solid #3fa7f7 !important;
    box-shadow: 0 4px 20px 0 rgba(63, 167, 247, 0.2);
    letter-spacing: 0.03em;
    padding: 0.8rem 1.5rem; /* Reduced horizontal padding */
    margin-right: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 1.2rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.filters--active .filters__action.filters__clear {
    background: #fff !important;
    color: #ff6b6b !important;
    border: 1.5px solid #ffb199 !important;
    border-left: 4px solid #ff6b6b !important;
    border-radius: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 20px 0 rgba(255, 107, 107, 0.2);
    padding: 0.8rem 2.2rem;
    margin-right: 1.2rem;
    margin-bottom: 1.2rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

/* Professional empty state styling */
.empty-state-row,
.filter-empty-state-row {
    background: transparent !important;
    border: none !important;
}

.empty-state-container {
    padding: 4rem 2rem !important;
    text-align: center !important;
    border: none !important;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%) !important;
    border-radius: 16px;
    margin: 1rem;
    box-shadow: 0 4px 20px rgba(23, 102, 166, 0.06);
    border: 2px dashed rgba(23, 102, 166, 0.15) !important;
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 3.5rem;
    opacity: 0.8;
}

.empty-state-title {
    color: #1766a6;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.empty-state-message {
    color: #5a6b7b;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 102, 166, 0.2);
}

.empty-state-action:hover {
    background: linear-gradient(135deg, #0f4c75 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 102, 166, 0.3);
    color: white;
    text-decoration: none;
}

.action-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Responsive empty states */
@media (max-width: 768px) {
    .empty-state-container {
        padding: 3rem 1.5rem !important;
        margin: 0.5rem;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
    
    .empty-state-title {
        font-size: 1.3rem;
    }
    
    .empty-state-message {
        font-size: 1rem;
    }
    
    .empty-state-action {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .empty-state-container {
        padding: 2.5rem 1rem !important;
        margin: 0.25rem;
    }
    
    .empty-state-content {
        gap: 1.2rem;
    }
    
    .empty-state-icon {
        font-size: 2.5rem;
    }
    
    .empty-state-title {
        font-size: 1.2rem;
    }
    
    .empty-state-message {
        font-size: 0.95rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(24, 49, 83, 0.85) 0%, rgba(23, 102, 166, 0.75) 100%);
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    opacity: 1;
    overflow: hidden;
}

/* Prevent body scroll when modal is open - improved to preserve scroll position */
body.modal-open {
    overflow: hidden !important;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(23, 102, 166, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 2px solid rgba(23, 102, 166, 0.15);
    position: relative;
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid rgba(23, 102, 166, 0.1);
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4ff 100%);
    border-radius: 20px 20px 0 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(23, 102, 166, 0.08);
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(23, 102, 166, 0.3), transparent);
}

.modal-header h2 {
    margin: 0;
    color: #1766a6;
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(23, 102, 166, 0.1);
}

.close-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(23, 102, 166, 0.1);
    font-size: 1.8rem;
    color: #1766a6;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(10px);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(23, 102, 166, 0.1);
}

.close-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
    color: #dc2626;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.2);
}

.modal-body {
    padding: 0;
    height: calc(90vh - 140px);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.note-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(23, 102, 166, 0.08);
    color: #1a2a3a;
    line-height: 1.6;
    font-size: 1.05rem;
    white-space: pre-wrap;
    border: 1px solid #e0f0ff;
}

.difficulty-selection h3 {
    color: #1766a6;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.difficulty-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1.5px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.difficulty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.difficulty-btn.active {
    transform: translateY(-3px);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.difficulty-btn.easy {
    background: #e3f7e3;
    color: #217a21;
    border-color: #b6e6b6;
}

.difficulty-btn.easy:hover {
    background: #d0f0d0;
    border-color: #217a21;
    box-shadow: 0 6px 16px rgba(33, 122, 33, 0.15);
}

.difficulty-btn.easy.active {
    background: linear-gradient(to bottom right, #d0f0d0, #b6e6b6);
    border-color: #217a21;
    box-shadow: 0 8px 20px rgba(33, 122, 33, 0.2), 0 0 0 2px rgba(33, 122, 33, 0.1);
}

.difficulty-btn.easy.active::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #217a21;
    opacity: 0.7;
}

.difficulty-btn.medium {
    background: #fffacc;
    color: #b89c00;
    border-color: #fff3b3;
}

.difficulty-btn.medium:hover {
    background: #fff5a3;
    border-color: #b89c00;
    box-shadow: 0 6px 16px rgba(184, 156, 0, 0.15);
}

.difficulty-btn.medium.active {
    background: linear-gradient(to bottom right, #fff5a3, #fff3b3);
    border-color: #b89c00;
    box-shadow: 0 8px 20px rgba(184, 156, 0, 0.2), 0 0 0 2px rgba(184, 156, 0, 0.1);
}

.difficulty-btn.medium.active::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #b89c00;
    opacity: 0.7;
}

.difficulty-btn.hard {
    background: #ffd6d6;
    color: #b80000;
    border-color: #ffb3b3;
}

.difficulty-btn.hard:hover {
    background: #ffbdbd;
    border-color: #b80000;
    box-shadow: 0 6px 16px rgba(184, 0, 0, 0.15);
}

.difficulty-btn.hard.active {
    background: linear-gradient(to bottom right, #ffbdbd, #ffb3b3);
    border-color: #b80000;
    box-shadow: 0 8px 20px rgba(184, 0, 0, 0.2), 0 0 0 2px rgba(184, 0, 0, 0.1);
}

.difficulty-btn.hard.active::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #b80000;
    opacity: 0.7;
}

/* Add a subtle glow animation for active buttons */
@keyframes subtle-glow {
    0% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(0, 0, 0, 0.15); }
    100% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(0, 0, 0, 0.1); }
}

.difficulty-btn.active {
    animation: subtle-glow 2s infinite ease-in-out;
}

.difficulty-btn.easy.active {
    animation-name: easy-glow;
}

@keyframes easy-glow {
    0% { box-shadow: 0 8px 20px rgba(33, 122, 33, 0.2), 0 0 0 2px rgba(33, 122, 33, 0.1); }
    50% { box-shadow: 0 8px 25px rgba(33, 122, 33, 0.25), 0 0 0 3px rgba(33, 122, 33, 0.15); }
    100% { box-shadow: 0 8px 20px rgba(33, 122, 33, 0.2), 0 0 0 2px rgba(33, 122, 33, 0.1); }
}

.difficulty-btn.medium.active {
    animation-name: medium-glow;
}

@keyframes medium-glow {
    0% { box-shadow: 0 8px 20px rgba(184, 156, 0, 0.2), 0 0 0 2px rgba(184, 156, 0, 0.1); }
    50% { box-shadow: 0 8px 25px rgba(184, 156, 0, 0.25), 0 0 0 3px rgba(184, 156, 0, 0.15); }
    100% { box-shadow: 0 8px 20px rgba(184, 156, 0, 0.2), 0 0 0 2px rgba(184, 156, 0, 0.1); }
}

.difficulty-btn.hard.active {
    animation-name: hard-glow;
}

@keyframes hard-glow {
    0% { box-shadow: 0 8px 20px rgba(184, 0, 0, 0.2), 0 0 0 2px rgba(184, 0, 0, 0.1); }
    50% { box-shadow: 0 8px 25px rgba(184, 0, 0, 0.25), 0 0 0 3px rgba(184, 0, 0, 0.15); }
    100% { box-shadow: 0 8px 20px rgba(184, 0, 0, 0.2), 0 0 0 2px rgba(184, 0, 0, 0.1); }
}

/* Make note rows clickable with visual feedback */
.notes-table tbody tr {
    cursor: pointer;
}

.notes-table tbody tr:hover .note-title {
    color: #1766a6;
    text-decoration: underline;
    text-decoration-color: #3fa7f7;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Professional Modal Enhancements */
.modal-content--pro {
    max-width: 1400px;
    width: 98%;
    height: 85vh;
    max-height: 85vh;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 50%, #f0f7ff 100%);
    border: 2px solid rgba(23, 102, 166, 0.1);
    box-shadow: 
        0 25px 60px rgba(23, 102, 166, 0.2),
        0 10px 30px rgba(23, 102, 166, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
    border-radius: 20px;
    position: relative;
}

.modal-content--pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(23, 102, 166, 0.1));
    border-radius: 20px;
    pointer-events: none;
}

.modal-header--pro {
    padding: 2rem 2.5rem 1.5rem;
    background: linear-gradient(145deg, #f7fbff 0%, #e8f4ff 50%, #ddeeff 100%);
    border-bottom: 2px solid rgba(23, 102, 166, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.modal-header--pro::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(23, 102, 166, 0.2), transparent);
}

.modal-title-section {
    flex: 1;
}

.modal-title--pro {
    color: #1766a6;
    font-weight: 800;
    font-size: 2rem;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(23, 102, 166, 0.1);
    background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn--pro {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 247, 255, 0.8));
    border: 2px solid rgba(23, 102, 166, 0.1);
    color: #1766a6;
    font-size: 1.6rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(23, 102, 166, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn--pro:hover {
    background: linear-gradient(145deg, rgba(23, 102, 166, 0.1), rgba(63, 167, 247, 0.1));
    border-color: rgba(23, 102, 166, 0.3);
    transform: rotate(90deg) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(23, 102, 166, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-body--pro {
    padding: 0;
    height: calc(85vh - 120px);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-layout {
    display: flex;
    height: 100%;
    flex: 1;
    position: relative;
}

.modal-left-column {
    width: 420px;
    padding: 2rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f0f7ff 50%, #e8f4ff 100%);
    border-right: 2px solid rgba(23, 102, 166, 0.12);
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-shrink: 0;
    position: relative;
    box-shadow: inset -2px 0 8px rgba(23, 102, 166, 0.05);
    min-height: 0;
    justify-content: flex-start;
}

.modal-left-column::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(23, 102, 166, 0.2), transparent);
}

.modal-right-column {
    flex: 1;
    padding: 0; /* Remove padding to give content full space */
    background: #ffffff;
    overflow: hidden; /* Let content handle its own scrolling */
    display: flex;
    flex-direction: column;
    /* animation: slideInRight 0.4s cubic-bezier(0.4,0,0.2,1); */
    align-items: center;
    justify-content: center;
    min-height: 100%; /* Full height */
    height: 100%;
    color: #5a6b7b;
    text-align: center;
    flex: 1;
    padding: 2.5rem; /* Match content padding */
    box-sizing: border-box;
}

.note-content--pro .content-text{
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    flex-shrink: 0;
    justify-content: flex-start;
}

/* Improve paragraph spacing in content */
.note-content--pro .content-text p {
    margin: 0 0 1.5rem; /* Increased paragraph spacing */
    line-height: 1.9; /* Better line height for readability */
    text-align: justify; /* Justify text for professional look */
    text-justify: inter-word;
}

.note-content--
    .modal-left-column {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid rgba(23, 102, 166, 0.12);
        padding: 1.5rem;
        overflow: visible;
    }
    
    .modal-right-column {
        min-height: 0;
        flex: 1;
        padding: 1.5rem;
    }
    
    .modal-actions {
        gap: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .action-btn {
        height: 45px;
        font-size: 0.9rem;
    }
    
    .action-btn .btn-icon {
        font-size: 1rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.85rem;
    }


@media (max-width: 768px) {
    .modal-header {
        padding: 1.5rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modal-left-column,
    .modal-right-column {
        padding: 1.2rem;
    }
    
    /* Override right column padding for content-first design */
    .modal-right-column {
        padding: 0;
    }
    
    .note-content--pro {
        padding: 1.8rem; /* Reduced padding for mobile */
        font-size: 1.1rem; /* Slightly smaller font on mobile */
        border-radius: 0;
    }
    
    .close-btn {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }
    
    .modal-actions {
        gap: 0.6rem;
        margin-top: 0.5rem;
    }
    
    .action-btn {
        height: 42px;
        font-size: 0.85rem;
    }
    
    .action-btn .btn-icon {
        font-size: 0.95rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.8rem;
    }
    
    .show-content-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .difficulty-selection--pro {
        padding: 1.2rem;
    }
    
    .difficulty-btn--pro {
        min-height: 60px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        height: 95vh;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-left-column {
        padding: 1rem;
        gap: 1.2rem;
    }
    
    .modal-right-column {
        padding: 0; /* Override for content-first design */
    }
    
    .note-content--pro {
        padding: 1.5rem; /* Reduced padding for small screens */
        font-size: 1.05rem; /* Smaller font for small screens */
        border-radius: 0;
    }
    
    .close-btn {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
    
    .modal-actions {
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .action-btn {
        height: 38px;
        font-size: 0.8rem;
    }
    
    .action-btn .btn-icon {
        font-size: 0.9rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.75rem;
    }
}

/* Position restoration highlight effect */
table tbody tr[data-note-id] {
    position: relative;
    transition: all 0.3s ease;
}

table tbody tr[data-note-id]:hover {
    background-color: rgba(63, 167, 247, 0.05) !important;
    cursor: pointer;
}

/* Update highlight effect for when notes are modified */
.note-updated-highlight {
    background-color: rgba(34, 197, 94, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4) !important;
    transition: all 0.3s ease !important;
}

/* Professional Empty State Styling */
.empty-state-row,
.filter-empty-state-row {
    background: transparent !important;
    border: none !important;
}

.empty-state-container {
    padding: 4rem 2rem !important;
    text-align: center !important;
    border: none !important;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%) !important;
    border-radius: 16px;
    margin: 1rem;
    box-shadow: 0 4px 20px rgba(23, 102, 166, 0.06);
    border: 2px dashed rgba(23, 102, 166, 0.15) !important;
}

/* ============================== */
/* MOBILE-ONLY RESPONSIVE STYLES */
/* ============================== */

/* Ensure mobile elements are hidden on desktop */
@media (min-width: 769px) {
    .hamburger-menu,
    .mobile-sidebar-toggle,
    .mobile-sidebar-overlay,
    .notes-cards-container {
        display: none !important;
    }
}

/* Mobile styles - only apply to screens 768px and below */
@media (max-width: 768px) {
    /* Hide desktop table on mobile */
    .notes-table table {
        display: none !important;
    }
    
    /* Show mobile card grid */
    .notes-cards-container {
        display: block !important;
    }
    
    /* Hamburger menu styling */
    .hamburger-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 1001;
        transition: all 0.3s ease;
    }
    
    .hamburger-line {
        width: 100%;
        height: 2px;
        background: var(--color-text);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Mobile navigation */
    .main-navbar__nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #183153 0%, #223e6a 100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        transition: left 0.3s ease;
        padding-top: 80px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .main-navbar__nav.active {
        left: 0;
    }
    
    .main-navbar__nav-item {
        padding: 1rem 2rem;
        color: #f6f9fc;
        text-decoration: none;
        font-weight: 600;
        border-bottom: 1px solid rgba(246, 249, 252, 0.1);
        transition: all 0.3s ease;
    }
    
    .main-navbar__nav-item:hover {
        background: rgba(246, 249, 252, 0.1);
        padding-left: 2.5rem;
    }
    
    /* Mobile sidebar toggle */
    .mobile-sidebar-toggle {
        display: block !important;
        position: fixed;
        top: 100px;
        right: 20px;
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        z-index: 1002;
        box-shadow: 0 4px 12px rgba(23, 102, 166, 0.3);
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(23, 102, 166, 0.4);
    }
    
    /* Mobile overlay */
    .mobile-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile sidebar positioning */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: var(--color-bg);
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 90px 20px 20px;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Adjust layout for mobile */
    .layout {
        flex-direction: column;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 0 0 0;
    }
    
    /* Mobile card grid styles */
    .notes-cards-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 20px;
        background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
        min-height: calc(100vh - 80px);
    }
    
    /* Individual note card styling */
    .note-card {
        background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
        border-radius: 16px;
        padding: 20px;
        box-shadow: 
            0 8px 24px rgba(23, 102, 166, 0.1),
            0 4px 12px rgba(0, 0, 0, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(23, 102, 166, 0.08);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        position: relative;
        overflow: hidden;
    }
    
    .note-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #1766a6 0%, #3fa7f7 50%, #22c55e 100%);
        border-radius: 16px 16px 0 0;
    }
    
    .note-card:hover {
        transform: translateY(-4px);
        box-shadow: 
            0 16px 32px rgba(23, 102, 166, 0.15),
            0 8px 16px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    
    .note-card:active {
        transform: translateY(-2px);
    }
    
    /* Card title */
    .note-card-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1766a6;
        margin: 0 0 12px 0;
        line-height: 1.3;
        text-shadow: 0 1px 2px rgba(23, 102, 166, 0.1);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Card metadata container */
    .note-card-meta {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }
    
    /* Card badges */
    .note-card-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    /* Difficulty badges */
    .note-card-badge.difficulty-easy {
        background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
        color: #15803d;
        border: 1px solid rgba(34, 197, 94, 0.2);
    }
    
    .note-card-badge.difficulty-medium {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        color: #d97706;
        border: 1px solid rgba(245, 158, 11, 0.2);
    }
    
    .note-card-badge.difficulty-difficult {
        background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
        color: #dc2626;
        border: 1px solid rgba(239, 68, 68, 0.2);
    }
    
    /* Category and tag badges */
    .note-card-badge.category {
        background: linear-gradient(135deg, #e0f0ff 0%, #cce7ff 100%);
        color: #1766a6;
        border: 1px solid rgba(23, 102, 166, 0.2);
    }
    
    .note-card-badge.tag {
        background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
        color: #7c3aed;
        border: 1px solid rgba(124, 58, 237, 0.2);
    }
    
    /* Revision time */
    .note-card-time {
        font-size: 0.7rem;
        color: #64748b;
        margin-top: 8px;
        padding: 4px 8px;
        background: rgba(100, 116, 139, 0.1);
        border-radius: 6px;
        text-align: center;
        font-weight: 500;
    }
    
    /* Empty state for mobile */
    .mobile-empty-state {
        grid-column: 1 / -1;
        padding: 3rem 1rem;
        text-align: center;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 251, 255, 0.8) 100%);
        border-radius: 20px;
        border: 2px dashed rgba(23, 102, 166, 0.2);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .mobile-empty-state-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.6;
    }
    
    .mobile-empty-state-text {
        color: #64748b;
        font-size: 1rem;
        font-weight: 500;
        margin: 0;
    }
}

/* Very small screens - single column cards */
@media (max-width: 480px) {
    .notes-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
    
    .note-card {
        padding: 16px;
    }
    
    .mobile-sidebar-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        right: 16px;
        top: 90px;
    }
    
    .sidebar {
        width: 280px;
        padding: 80px 16px 16px;
    }
    
    .main-navbar__nav {
        width: 260px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Highlight active filter controls */
.filters__input--active {
    border: 2px solid #3fa7f7 !important;
    background: rgba(63,167,247,0.10) !important;
    color: #fff;
    box-shadow: 0 4px 16px 0 #183153, 0 2px 8px 0 rgba(23,102,166,0.10);
    font-weight: 700;
    outline: none;
    transition: border 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
    border-radius: 1.5rem;
    filter: drop-shadow(0 2px 8px #e0f0ff);
    letter-spacing: 0.02em;
}

.filters__input--active:focus {
    background: rgba(63,167,247,0.18) !important;
    border-color: #fff !important;
}

.filters__input--active::placeholder {
    color: #3fa7f7;
    opacity: 0.7;
    font-weight: 500;
}

.filters__switch--active {
    background: #e0f0ff !important;
    color: #1766a6 !important;
    border: 1.5px solid #3fa7f7 !important;
    border-left: 4px solid #3fa7f7 !important;
    box-shadow: 0 4px 20px 0 rgba(63, 167, 247, 0.2);
    font-weight: 800;
}

/* --- Pro Active State for Filters (Distinct Visual) --- */
.filters--active {
    border: 2.5px solid #1766a6 !important;
    border-left: 7px solid #3fa7f7 !important;
    box-shadow: 0 0 0 7px #e0f6ff, 0 8px 32px rgba(23,102,166,0.18);
    background: linear-gradient(120deg, #fafdff 40%, #e0f6ff 100%) !important;
    transition: border 0.2s, box-shadow 0.2s, background 0.2s, transform 0.18s;
    padding: 2.2rem 2.5rem 2.2rem 2.2rem !important;
    margin-bottom: 2.5rem !important;
    border-radius: 1.7rem !important;
    position: relative;
}

.filters--active:hover {
    transform: translateY(-2px) scale(1.012);
    box-shadow: 0 0 0 9px #e0f6ff, 0 12px 40px rgba(23,102,166,0.22);
}

.filters--active .filters__field {
    background: #fafdff !important;
    color: #1766a6 !important;
    border: 2px solid #3fa7f7 !important;
    box-shadow: 0 2px 12px #e0f0ff;
    padding: 0.6rem 1.5rem;
    margin-right: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 1.3rem;
    font-weight: 600;
}

.filters--active .filters__input:focus,
.filters--active .filters__input:not([value=""]) {
    border: 2px solid #1766a6 !important;
    background: #fff !important;
    color: #1766a6 !important;
    box-shadow: 0 2px 12px #3fa7f733;
    font-weight: 700;
    outline: none;
    border-radius: 1.3rem;
    padding: 0.6rem 1.5rem;
    letter-spacing: 0.01em;
}

.filters--active .filters__switch.active,
.filters--active .filters__switch--active {
    background: #e0f0ff !important;
    color: #1766a6 !important;
    font-weight: 800;
    border: 1.5px solid #3fa7f7 !important;
    border-left: 4px solid #3fa7f7 !important;
    box-shadow: 0 4px 20px 0 rgba(63, 167, 247, 0.2);
    letter-spacing: 0.03em;
    padding: 0.8rem 1.5rem; /* Reduced horizontal padding */
    margin-right: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 1.2rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.filters--active .filters__action.filters__clear {
    background: #fff !important;
    color: #ff6b6b !important;
    border: 1.5px solid #ffb199 !important;
    border-left: 4px solid #ff6b6b !important;
    border-radius: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 20px 0 rgba(255, 107, 107, 0.2);
    padding: 0.8rem 2.2rem;
    margin-right: 1.2rem;
    margin-bottom: 1.2rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

/* Professional empty state styling */
.empty-state-row,
.filter-empty-state-row {
    background: transparent !important;
    border: none !important;
}

.empty-state-container {
    padding: 4rem 2rem !important;
    text-align: center !important;
    border: none !important;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%) !important;
    border-radius: 16px;
    margin: 1rem;
    box-shadow: 0 4px 20px rgba(23, 102, 166, 0.06);
    border: 2px dashed rgba(23, 102, 166, 0.15) !important;
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 3.5rem;
    opacity: 0.8;
}

.empty-state-title {
    color: #1766a6;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.empty-state-message {
    color: #5a6b7b;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 102, 166, 0.2);
}

.empty-state-action:hover {
    background: linear-gradient(135deg, #0f4c75 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 102, 166, 0.3);
    color: white;
    text-decoration: none;
}

.action-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Responsive empty states */
@media (max-width: 768px) {
    .empty-state-container {
        padding: 3rem 1.5rem !important;
        margin: 0.5rem;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
    
    .empty-state-title {
        font-size: 1.3rem;
    }
    
    .empty-state-message {
        font-size: 1rem;
    }
    
    .empty-state-action {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .empty-state-container {
        padding: 2.5rem 1rem !important;
        margin: 0.25rem;
    }
    
    .empty-state-content {
        gap: 1.2rem;
    }
    
    .empty-state-icon {
        font-size: 2.5rem;
    }
    
    .empty-state-title {
        font-size: 1.2rem;
    }
    
    .empty-state-message {
        font-size: 0.95rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(24, 49, 83, 0.85) 0%, rgba(23, 102, 166, 0.75) 100%);
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    opacity: 1;
    overflow: hidden;
}

/* Prevent body scroll when modal is open - improved to preserve scroll position */
body.modal-open {
    overflow: hidden !important;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(23, 102, 166, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 2px solid rgba(23, 102, 166, 0.15);
    position: relative;
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid rgba(23, 102, 166, 0.1);
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4ff 100%);
    border-radius: 20px 20px 0 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(23, 102, 166, 0.08);
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(23, 102, 166, 0.3), transparent);
}

.modal-header h2 {
    margin: 0;
    color: #1766a6;
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(23, 102, 166, 0.1);
}

.close-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(23, 102, 166, 0.1);
    font-size: 1.8rem;
    color: #1766a6;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(10px);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(23, 102, 166, 0.1);
}

.close-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
    color: #dc2626;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.2);
}

.modal-body {
    padding: 0;
    height: calc(90vh - 140px);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.note-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(23, 102, 166, 0.08);
    color: #1a2a3a;
    line-height: 1.6;
    font-size: 1.05rem;
    white-space: pre-wrap;
    border: 1px solid #e0f0ff;
}

.difficulty-selection h3 {
    color: #1766a6;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.difficulty-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1.5px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.difficulty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.difficulty-btn.active {
    transform: translateY(-3px);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.difficulty-btn.easy {
    background: #e3f7e3;
    color: #217a21;
    border-color: #b6e6b6;
}

.difficulty-btn.easy:hover {
    background: #d0f0d0;
    border-color: #217a21;
    box-shadow: 0 6px 16px rgba(33, 122, 33, 0.15);
}

.difficulty-btn.easy.active {
    background: linear-gradient(to bottom right, #d0f0d0, #b6e6b6);
    border-color: #217a21;
    box-shadow: 0 8px 20px rgba(33, 122, 33, 0.2), 0 0 0 2px rgba(33, 122, 33, 0.1);
}

.difficulty-btn.easy.active::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #217a21;
    opacity: 0.7;
}

.difficulty-btn.medium {
    background: #fffacc;
    color: #b89c00;
    border-color: #fff3b3;
}

.difficulty-btn.medium:hover {
    background: #fff5a3;
    border-color: #b89c00;
    box-shadow: 0 6px 16px rgba(184, 156, 0, 0.15);
}

.difficulty-btn.medium.active {
    background: linear-gradient(to bottom right, #fff5a3, #fff3b3);
    border-color: #b89c00;
    box-shadow: 0 8px 20px rgba(184, 156, 0, 0.2), 0 0 0 2px rgba(184, 156, 0, 0.1);
}

.difficulty-btn.medium.active::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #b89c00;
    opacity: 0.7;
}

.difficulty-btn.hard {
    background: #ffd6d6;
    color: #b80000;
    border-color: #ffb3b3;
}

.difficulty-btn.hard:hover {
    background: #ffbdbd;
    border-color: #b80000;
    box-shadow: 0 6px 16px rgba(184, 0, 0, 0.15);
}

.difficulty-btn.hard.active {
    background: linear-gradient(to bottom right, #ffbdbd, #ffb3b3);
    border-color: #b80000;
    box-shadow: 0 8px 20px rgba(184, 0, 0, 0.2), 0 0 0 2px rgba(184, 0, 0, 0.1);
}

.difficulty-btn.hard.active::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #b80000;
    opacity: 0.7;
}

/* Add a subtle glow animation for active buttons */
@keyframes subtle-glow {
    0% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(0, 0, 0, 0.15); }
    100% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(0, 0, 0, 0.1); }
}

.difficulty-btn.active {
    animation: subtle-glow 2s infinite ease-in-out;
}

.difficulty-btn.easy.active {
    animation-name: easy-glow;
}

@keyframes easy-glow {
    0% { box-shadow: 0 8px 20px rgba(33, 122, 33, 0.2), 0 0 0 2px rgba(33, 122, 33, 0.1); }
    50% { box-shadow: 0 8px 25px rgba(33, 122, 33, 0.25), 0 0 0 3px rgba(33, 122, 33, 0.15); }
    100% { box-shadow: 0 8px 20px rgba(33, 122, 33, 0.2), 0 0 0 2px rgba(33, 122, 33, 0.1); }
}

.difficulty-btn.medium.active {
    animation-name: medium-glow;
}

@keyframes medium-glow {
    0% { box-shadow: 0 8px 20px rgba(184, 156, 0, 0.2), 0 0 0 2px rgba(184, 156, 0, 0.1); }
    50% { box-shadow: 0 8px 25px rgba(184, 156, 0, 0.25), 0 0 0 3px rgba(184, 156, 0, 0.15); }
    100% { box-shadow: 0 8px 20px rgba(184, 156, 0, 0.2), 0 0 0 2px rgba(184, 156, 0, 0.1); }
}

.difficulty-btn.hard.active {
    animation-name: hard-glow;
}

@keyframes hard-glow {
    0% { box-shadow: 0 8px 20px rgba(184, 0, 0, 0.2), 0 0 0 2px rgba(184, 0, 0, 0.1); }
    50% { box-shadow: 0 8px 25px rgba(184, 0, 0, 0.25), 0 0 0 3px rgba(184, 0, 0, 0.15); }
    100% { box-shadow: 0 8px 20px rgba(184, 0, 0, 0.2), 0 0 0 2px rgba(184, 0, 0, 0.1); }
}

/* Make note rows clickable with visual feedback */
.notes-table tbody tr {
    cursor: pointer;
}

.notes-table tbody tr:hover .note-title {
    color: #1766a6;
    text-decoration: underline;
    text-decoration-color: #3fa7f7;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Professional Modal Enhancements */
.modal-content--pro {
    max-width: 1400px;
    width: 98%;
    height: 85vh;
    max-height: 85vh;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 50%, #f0f7ff 100%);
    border: 2px solid rgba(23, 102, 166, 0.1);
    box-shadow: 
        0 25px 60px rgba(23, 102, 166, 0.2),
        0 10px 30px rgba(23, 102, 166, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
    border-radius: 20px;
    position: relative;
}

.modal-content--pro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(23, 102, 166, 0.1));
    border-radius: 20px;
    pointer-events: none;
}

.modal-header--pro {
    padding: 2rem 2.5rem 1.5rem;
    background: linear-gradient(145deg, #f7fbff 0%, #e8f4ff 50%, #ddeeff 100%);
    border-bottom: 2px solid rgba(23, 102, 166, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.modal-header--pro::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(23, 102, 166, 0.2), transparent);
}

.modal-title-section {
    flex: 1;
}

.modal-title--pro {
    color: #1766a6;
    font-weight: 800;
    font-size: 2rem;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(23, 102, 166, 0.1);
    background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn--pro {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(240, 247, 255, 0.8));
    border: 2px solid rgba(23, 102, 166, 0.1);
    color: #1766a6;
    font-size: 1.6rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(23, 102, 166, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn--pro:hover {
    background: linear-gradient(145deg, rgba(23, 102, 166, 0.1), rgba(63, 167, 247, 0.1));
    border-color: rgba(23, 102, 166, 0.3);
    transform: rotate(90deg) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(23, 102, 166, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-body--pro {
    padding: 0;
    height: calc(85vh - 120px);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-layout {
    display: flex;
    height: 100%;
    flex: 1;
    position: relative;
}

.modal-left-column {
    width: 420px;
    padding: 2rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f0f7ff 50%, #e8f4ff 100%);
    border-right: 2px solid rgba(23, 102, 166, 0.12);
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-shrink: 0;
    position: relative;
    box-shadow: inset -2px 0 8px rgba(23, 102, 166, 0.05);
    min-height: 0;
    justify-content: flex-start;
}

.modal-left-column::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(23, 102, 166, 0.2), transparent);
}

.modal-right-column {
    flex: 1;
    padding: 0; /* Remove padding to give content full space */
    background: #ffffff;
    overflow: hidden; /* Let content handle its own scrolling */
    display: flex;
    flex-direction: column;
    /* animation: slideInRight 0.4s cubic-bezier(0.4,0,0.2,1); */
    align-items: center;
    justify-content: center;
    min-height: 100%; /* Full height */
    height: 100%;
    color: #5a6b7b;
    text-align: center;
    flex: 1;
    padding: 2.5rem; /* Match content padding */
    box-sizing: border-box;
}

.note-content--pro .content-text{
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    flex-shrink: 0;
    justify-content: flex-start;
}

/* Improve paragraph spacing in content */
.note-content--pro .content-text p {
    margin: 0 0 1.5rem; /* Increased paragraph spacing */
    line-height: 1.9; /* Better line height for readability */
    text-align: justify; /* Justify text for professional look */
    text-justify: inter-word;
}

.note-content--
    .modal-left-column {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid rgba(23, 102, 166, 0.12);
        padding: 1.5rem;
        overflow: visible;
    }
    
    .modal-right-column {
        min-height: 0;
        flex: 1;
        padding: 1.5rem;
    }
    
    .modal-actions {
        gap: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .action-btn {
        height: 45px;
        font-size: 0.9rem;
    }
    
    .action-btn .btn-icon {
        font-size: 1rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.85rem;
    }


@media (max-width: 768px) {
    .modal-header {
        padding: 1.5rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modal-left-column,
    .modal-right-column {
        padding: 1.2rem;
    }
    
    /* Override right column padding for content-first design */
    .modal-right-column {
        padding: 0;
    }
    
    .note-content--pro {
        padding: 1.8rem; /* Reduced padding for mobile */
        font-size: 1.1rem; /* Slightly smaller font on mobile */
        border-radius: 0;
    }
    
    .close-btn {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }
    
    .modal-actions {
        gap: 0.6rem;
        margin-top: 0.5rem;
    }
    
    .action-btn {
        height: 42px;
        font-size: 0.85rem;
    }
    
    .action-btn .btn-icon {
        font-size: 0.95rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.8rem;
    }
    
    .show-content-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .difficulty-selection--pro {
        padding: 1.2rem;
    }
    
    .difficulty-btn--pro {
        min-height: 60px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        height: 95vh;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-left-column {
        padding: 1rem;
        gap: 1.2rem;
    }
    
    .modal-right-column {
        padding: 0; /* Override for content-first design */
    }
    
    .note-content--pro {
        padding: 1.5rem; /* Reduced padding for small screens */
        font-size: 1.05rem; /* Smaller font for small screens */
        border-radius: 0;
    }
    
    .close-btn {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
    
    .modal-actions {
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .action-btn {
        height: 38px;
        font-size: 0.8rem;
    }
    
    .action-btn .btn-icon {
        font-size: 0.9rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.75rem;
    }
}

/* Position restoration highlight effect */
table tbody tr[data-note-id] {
    position: relative;
    transition: all 0.3s ease;
}

table tbody tr[data-note-id]:hover {
    background-color: rgba(63, 167, 247, 0.05) !important;
    cursor: pointer;
}

/* Update highlight effect for when notes are modified */
.note-updated-highlight {
    background-color: rgba(34, 197, 94, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4) !important;
    transition: all 0.3s ease !important;
}

/* Professional Empty State Styling */
.empty-state-row,
.filter-empty-state-row {
    background: transparent !important;
    border: none !important;
}

.empty-state-container {
    padding: 4rem 2rem !important;
    text-align: center !important;
    border: none !important;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%) !important;
    border-radius: 16px;
    margin: 1rem;
    box-shadow: 0 4px 20px rgba(23, 102, 166, 0.06);
    border: 2px dashed rgba(23, 102, 166, 0.15) !important;
}

/* ============================== */
/* MOBILE-ONLY RESPONSIVE STYLES */
/* ============================== */

/* Ensure mobile elements are hidden on desktop */
@media (min-width: 769px) {
    .hamburger-menu,
    .mobile-sidebar-toggle,
    .mobile-sidebar-overlay,
    .notes-cards-container {
        display: none !important;
    }
}

/* Mobile styles - only apply to screens 768px and below */
@media (max-width: 768px) {
    /* Hide desktop table on mobile */
    .notes-table table {
        display: none !important;
    }
    
    /* Show mobile card grid */
    .notes-cards-container {
        display: block !important;
    }
    
    /* Hamburger menu styling */
    .hamburger-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 1001;
        transition: all 0.3s ease;
    }
    
    .hamburger-line {
        width: 100%;
        height: 2px;
        background: var(--color-text);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Mobile navigation */
    .main-navbar__nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #183153 0%, #223e6a 100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        transition: left 0.3s ease;
        padding-top: 80px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .main-navbar__nav.active {
        left: 0;
    }
    
    .main-navbar__nav-item {
        padding: 1rem 2rem;
        color: #f6f9fc;
        text-decoration: none;
        font-weight: 600;
        border-bottom: 1px solid rgba(246, 249, 252, 0.1);
        transition: all 0.3s ease;
    }
    
    .main-navbar__nav-item:hover {
        background: rgba(246, 249, 252, 0.1);
        padding-left: 2.5rem;
    }
    
    /* Mobile sidebar toggle */
    .mobile-sidebar-toggle {
        display: block !important;
        position: fixed;
        top: 100px;
        right: 20px;
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #1766a6 0%, #3fa7f7 100%);
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        z-index: 1002;
        box-shadow: 0 4px 12px rgba(23, 102, 166, 0.3);
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(23, 102, 166, 0.4);
    }
    
    /* Mobile overlay */
    .mobile-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile sidebar positioning */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: var(--color-bg);
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 90px 20px 20px;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Adjust layout for mobile */
    .layout {
        flex-direction: column;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 0 0 0;
    }
    
    /* Mobile card grid styles */
    .notes-cards-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 20px;
        background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
        min-height: calc(100vh - 80px);
    }
    
    /* Individual note card styling */
    .note-card {
        background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
        border-radius: 16px;
        padding: 20px;
        box-shadow: 
            0 8px 24px rgba(23, 102, 166, 0.1),
            0 4px 12px rgba(0, 0, 0, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(23, 102, 166, 0.08);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        position: relative;
        overflow: hidden;
    }
    
    .note-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #1766a6 0%, #3fa7f7 50%, #22c55e 100%);
        border-radius: 16px 16px 0 0;
    }
    
    .note-card:hover {
        transform: translateY(-4px);
        box-shadow: 
            0 16px 32px rgba(23, 102, 166, 0.15),
            0 8px 16px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    
    .note-card:active {
        transform: translateY(-2px);
    }
    
    /* Card title */
    .note-card-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1766a6;
        margin: 0 0 12px 0;
        line-height: 1.3;
        text-shadow: 0 1px 2px rgba(23, 102, 166, 0.1);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Card metadata container */
    .note-card-meta {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }
    
    /* Card badges */
    .note-card-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    /* Difficulty badges */
    .note-card-badge.difficulty-easy {
        background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
        color: #15803d;
        border: 1px solid rgba(34, 197, 94, 0.2);
    }
    
    .note-card-badge.difficulty-medium {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        color: #d97706;
        border: 1px solid rgba(245, 158, 11, 0.2);
    }
    
    .note-card-badge.difficulty-difficult {
        background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
        color: #dc2626;
        border: 1px solid rgba(239, 68, 68, 0.2);
    }
    
    /* Category and tag badges */
    .note-card-badge.category {
        background: linear-gradient(135deg, #e0f0ff 0%, #cce7ff 100%);
        color: #1766a6;
        border: 1px solid rgba(23, 102, 166, 0.2);
    }
    
    .note-card-badge.tag {
        background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
        color: #7c3aed;
        border: 1px solid rgba(124, 58, 237, 0.2);
    }
    
    /* Revision time */
    .note-card-time {
        font-size: 0.7rem;
        color: #64748b;
        margin-top: 8px;
        padding: 4px 8px;
        background: rgba(100, 116, 139, 0.1);
        border-radius: 6px;
        text-align: center;
        font-weight: 500;
    }
    
    /* Empty state for mobile */
    .mobile-empty-state {
        grid-column: 1 / -1;
        padding: 3rem 1rem;
        text-align: center;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 251, 255, 0.8) 100%);
        border-radius: 20px;
        border: 2px dashed rgba(23, 102, 166, 0.2);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .mobile-empty-state-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.6;
    }
    
    .mobile-empty-state-text {
        color: #64748b;
        font-size: 1rem;
        font-weight: 500;
        margin: 0;
    }
}

/* Very small screens - single column cards */
@media (max-width: 480px) {
    .notes-cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
    
    .note-card {
        padding: 16px;
    }
    
    .mobile-sidebar-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        right: 16px;
        top: 90px;
    }
    
    .sidebar {
        width: 280px;
        padding: 80px 16px 16px;
    }
    
    .main-navbar__nav {
        width: 260px;
    }
}
