body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.header {
    background-color: #f8f9fa;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 1s ease;
    padding: 20px;
}

.header:hover {
    background-color: #e9ecef;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.header, .navbar .nav-link, .navbar-toggler {
    color: #333333 !important;
}

.navbar .nav-link {
    font-size: 1.1rem;
}

.navbar .nav-link[aria-current="page"] {
    font-weight: bold;
    border-bottom: 2px solid #007bff;
    background-color: #f1f1f1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(5px);
    }
    75% {
        transform: translateX(-5px);
    }
}

.header .logo {
    display: flex;
    align-items: center;
}

.header .logo .logo-img {
    max-height: 80px;
    width: auto;
    transition: transform 0.3s ease;
}

.header .logo .logo-img:hover {
    transform: scale(1.1) rotate(5deg);
}

.navbar {
    display: flex;
    justify-content: center;
    background-color: #ffffff;
    padding: 0 1rem;
}

.navbar .nav-link {
    color: #495057;
    font-weight: 500;
    padding: 10px 15px;
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
    display: block;
    animation: slideInLeft 1s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #007bff;
    background-color: #f8f9fa;
    text-shadow: 1px 1px 5px rgba(0, 123, 255, 0.5);
    transform: scale(1.1);
}

.navbar .nav-item {
    animation: slideInRight 1s ease;
}

.navbar-toggler {
    border: none;
    background-color: transparent;
    font-size: 1.5rem;
    color: #495057;
    transition: color 0.3s ease, transform 0.3s ease;
}

.account-menu .btn {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #dee2e6;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    animation: fadeIn 1.2s ease;
}

.account-menu .btn:hover {
    background: #f1f1f1;
    border-color: #cccccc;
    transform: scale(1.05);
}

.account-menu .btn img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.account-menu .btn img:hover {
    transform: scale(1.1) rotate(-5deg);
}

.dropdown-menu {
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
    background-color: #ffffff;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInDropdown 0.5s ease;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #007bff;
    color: #ffffff;
    animation: shake 0.5s ease;
}

@media (max-width: 992px) {
    .navbar-nav {
        flex-direction: column;
    }
    .header .logo .logo-img {
        max-height: 70px;
    }
    .account-menu .btn {
        font-size: 0.8rem;
    }
    .navbar-toggler {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header .logo .logo-img {
        max-height: 60px;
    }
    .account-menu .btn {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .header .logo .logo-img {
        max-height: 50px;
    }
    .account-menu .btn {
        font-size: 0.7rem;
    }
}

@media (prefers-contrast: high) {
    body {
        background-color: #000000;
        color: #ffffff;
    }
    .navbar, .navbar .nav-link {
        background-color: #333333;
        color: #ffffff;
    }
    .navbar .nav-link:hover {
        background-color: #555555;
        color: #007bff;
    }
    .header .logo .logo-img {
        border: 2px solid #ffffff;
    }
}

body.high-contrast {
    background-color: #000000;
    color: #ffffff;
}

body.high-contrast .header {
    background-color: #000000;
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

body.high-contrast .navbar .nav-link {
    color: #ffffff !important;
    background-color: #000000 !important;
}

body.high-contrast .navbar .nav-link:hover,
body.high-contrast .navbar .nav-link:focus {
    background-color: #555555 !important;
}

body.high-contrast .form-control {
    background-color: #333333;
    color: #ffffff;
    border: 1px solid #ffffff;
}

body.high-contrast .btn-outline-success {
    color: #ffffff;
    border-color: #ffffff;
}

body.high-contrast .btn-outline-success:hover {
    background-color: #ffffff;
    color: #000000;
}

body.high-contrast .dropdown-menu {
    background-color: #000000;
    color: #ffffff;
}

.modal-content {
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-header {
    background-color: #343a40;
    color: #ffffff;
    border-bottom: 2px solid #dc3545;
    border-radius: 10px 10px 0 0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.modal-body {
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    justify-content: space-between;
}

.modal-footer .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.modal-footer .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.5);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-footer .btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.modal-footer .btn-primary:focus {
    outline: none;
    box-shadow: 0 0 5px 2px rgba(0, 123, 255, 0.5);
}

.modal-footer .btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 5px 2px rgba(108, 117, 125, 0.5);
}

@media (max-width: 576px) {
    .modal-dialog {
        max-width: 90%;
    }

    .modal-body {
        font-size: 0.9rem;
    }

    .modal-header .modal-title {
        font-size: 1.2rem;
    }

    .modal-footer .btn-primary, .modal-footer .btn-secondary {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}