:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --text-color: #212529;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

[data-bs-theme="dark"] {
    --primary-bg: #212529;
    --secondary-bg: #343a40;
    --text-color: #f8f9fa;
    --border-color: #495057;
    --card-bg: #343a40;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
}

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.most-recent-note {
    padding: 1rem;
    background-color: var(--secondary-bg);
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

.most-recent-note .note-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    margin: 1rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Dark mode toggle button styling */
#darkModeToggle {
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#darkModeToggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

/* Smooth transitions for all elements */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Custom dark mode styles for specific components */
[data-bs-theme="dark"] .navbar {
    background-color: #1a1d20 !important;
}

[data-bs-theme="dark"] .table {
    color: var(--text-color);
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--secondary-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--secondary-bg);
    border-color: #0d6efd;
    color: var(--text-color);
}

[data-bs-theme="dark"] .modal-content {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: var(--border-color);
}