html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Dark theme styles */
[data-bs-theme="dark"] {
    color-scheme: dark;
}

[data-bs-theme="dark"] body {
    background-color: #212529;
    color: #dee2e6;
}

[data-bs-theme="dark"] .navbar {
    background-color: #212529;
    border-bottom: 1px solid #2d2d2d;
}

[data-bs-theme="dark"] .footer {
    background-color: #212529 !important;
    border-top: 1px solid #2d2d2d;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #212529;
    border-color: #2d2d2d;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #dee2e6;
}

    [data-bs-theme="dark"] .dropdown-item:hover {
        background-color: #2d2d2d;
        color: #dee2e6;
    }

[data-bs-theme="dark"] .btn-link {
    color: #dee2e6;
}

    [data-bs-theme="dark"] .btn-link:hover {
        color: #dee2e6;
        opacity: 0.8;
    }

[data-bs-theme="dark"] .modal-content {
    background-color: #212529;
    border-color: #2d2d2d;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #2d2d2d;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #2d2d2d;
}

[data-bs-theme="dark"] .form-control {
    background-color: #212529;
    border-color: #2d2d2d;
    color: #dee2e6;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #212529;
    border-color: #0d6efd;
    color: #dee2e6;
}

[data-bs-theme="dark"] .form-select {
background-color: #212529;
border-color: #2d2d2d;
color: #dee2e6;
}

[data-bs-theme="dark"] .form-select:focus {
    background-color: #212529;
    border-color: #0d6efd;
    color: #dee2e6;
}

    [data-bs-theme="dark"] .text-muted {
        color: #adb5bd !important;
    }

    [data-bs-theme="dark"] .nav-link {
        color: #dee2e6;
    }

        [data-bs-theme="dark"] .nav-link:hover {
            color: #fff;
        }

    [data-bs-theme="dark"] .btn-outline-primary {
        color: #0d6efd;
        border-color: #0d6efd;
    }

        [data-bs-theme="dark"] .btn-outline-primary:hover {
            color: #fff;
            background-color: #0d6efd;
            border-color: #0d6efd;
        }

    [data-bs-theme="dark"] .btn-primary {
        color: #fff;
        background-color: #0d6efd;
        border-color: #0d6efd;
    }

        [data-bs-theme="dark"] .btn-primary:hover {
            color: #fff;
            background-color: #0b5ed7;
            border-color: #0a58ca;
        }

    [data-bs-theme="dark"] h1, 
    [data-bs-theme="dark"] h2, 
    [data-bs-theme="dark"] h3, 
    [data-bs-theme="dark"] h4, 
    [data-bs-theme="dark"] h5
    {
        color: #c7cbe0 !important;
    }

/* Custom element styles */
.custom-element {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

/* Dark theme styles for home menu */
[data-bs-theme="dark"] .home-menu {
    background-color: #1a1d20;
}

[data-bs-theme="dark"] .menu-card {
    background: #23272b !important;
    border: 1px solid #343a40 !important;
    color: #f8f9fa !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] .menu-card h4,
[data-bs-theme="dark"] .menu-card p {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .menu-card a {
    color: inherit;
    text-decoration: none;
}

[data-bs-theme="dark"] .menu-card-icon {
    color: #a970ff !important;
}

[data-bs-theme="dark"] .menu-card-icon i {
    color: #a970ff !important;
}

[data-bs-theme="dark"] .menu-card:hover {
    background: #181a1b !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
}

[data-bs-theme="dark"] .main-section {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .main-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

[data-bs-theme="dark"] .main-section p {
    color: #adb5bd !important;
    font-size: 1.1rem;
}

.main-section p {
    font-size: 1.1rem;
}

.main-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

[data-bs-theme="dark"] .alert {
    background-color: #2c3034;
    border: 1px solid #373b3e;
    color: #fff;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: #2c2a00;
    border-color: #3d3a00;
    color: #ffd43b;
}

[data-bs-theme="dark"] .alert-success {
    background-color: #0f2e1d;
    border-color: #1a3d28;
    color: #75b798;
}

[data-bs-theme="dark"] .alert i {
    color: inherit;
}

/* Dark mode for profile dropdown/sidebar */
[data-bs-theme="dark"] .side-menu {
    background: #23272b !important;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
}

[data-bs-theme="dark"] .widget-body,
[data-bs-theme="dark"] .option-card {
    background: #23272b !important;
    color: #c7cbe0 !important;
}


[data-bs-theme="dark"] .profile-header,
[data-bs-theme="dark"] .profile-part span,
[data-bs-theme="dark"] .profile-part label {
    color: #c7cbe0 !important;
    font-weight: 500;
}

[data-bs-theme="dark"] .profile-image {
    background: #343a40 !important;
    color: #fff !important;
    border: 2px solid #444a57;
}

[data-bs-theme="dark"] .user-email,
[data-bs-theme="dark"] .profile-part .fw-bold {
    color: #bfc6d1 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] input[type="text"] {
    background: #181a1b !important;
    color: #e0e6f0 !important;
    border: 1px solid #444a57 !important;
}

    [data-bs-theme="dark"] .form-control:focus,
    [data-bs-theme="dark"] input[type="email"]:focus,
    [data-bs-theme="dark"] input[type="text"]:focus {
        background: #23272b !important;
        color: #fff !important;
        border: 1.5px solid #0d6efd !important;
    }

[data-bs-theme="dark"] .btn,
[data-bs-theme="dark"] .btn-outline-success,
[data-bs-theme="dark"] .btn-outline-primary {
    color: #e0e6f0 !important;
    border-color: #444a57 !important;
    background: #23272b !important;
}

[data-bs-theme="dark"] .btn-primary {
    background: #0d6efd !important;
    color: #fff !important;
    border: none;
}

[data-bs-theme="dark"] .btn-danger {
    background: #dc3545 !important;
    color: #fff !important;
    border: none;
}

[data-bs-theme="dark"] .btn-link {
    color: #7abaff !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background: #23272b !important;
    color: #e0e6f0 !important;
    border: 1px solid #444a57;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e0e6f0 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background: #181a1b !important;
    color: #fff !important;
}

[data-bs-theme="dark"] hr {
    border-color: #444a57 !important;
}

[data-bs-theme="dark"] .table-cell-merger-dark {
    background-color: #c7cbe0 !important;
}

.table-cell-merger-dark {
    background-color: #212529 !important;
}


/* Profile menu alignment improvements */
.side-menu {
    min-width: 320px;
    right: -820px;
    top: 0;
    border-radius: 16px;
    padding: 1.5rem 1.25rem 1.25rem 1.25rem;
}

.profile-part {
    margin-bottom: 1rem;
}

.profile-part .mb-1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem !important;
}

.profile-part .ms-4 {
    margin-left: 1rem !important;
}

.profile-part input.form-control {
    margin-bottom: 0.5rem;
    width: 80%;
    display: inline-block;
}

.profile-part button.btn {
    margin-left: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
}

.profile-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 0.95rem;
    font-weight: 400;
}

.logout-btn {
    margin-top: 1rem;
    font-weight: 500;
}
.alert-login {
    position: absolute;
    top: -40px;
    left: 40%;
    padding: 12px 16px;
}
@media only screen and (max-width: 800px) {
    .alert-login {
        left: 20%;
    }
}
.border-none {
    border: none !important;
}


.feedback-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    display: flex; 
    align-items: center;
}

#backToTopBtn {
    height: 37px;
    width: 37px;
    transition: all 0.3s ease;
}
#backToTopBtn, .feedback-btn {
    background: #5e17eb;
    color: white;
    border: none;
    border-radius: 8px;
}

    .feedback-btn {
        padding: 8px 20px;
        font-size: 14px;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .feedback-btn:hover, #backToTopBtn:hover {
        background: #3730a3;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    }

.feedback-widget {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 340px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateX(100%) scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

    .feedback-widget.show {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

.btn-cancel {
    opacity: 1;
}


.widget-header {
    background: linear-gradient(135deg, #5e17eb, #7c3aed);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .widget-header h5 {
        margin: 0;
        font-weight: 600;
    }

.close-btn, .btn-cancel {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

    .close-btn:hover, .btn-cancel:hover {
        opacity: 1;
    }

.widget-body {
    padding: 24px;
}

.feedback-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

.option-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #334155;
}

    .option-card:hover {
        background: #f1f5f9;
        border-color: #4f46e5;
        transform: translateY(-2px);
        color: #4f46e5;
    }

.option-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.bug-icon {
    color: #ef4444;
}

.idea-icon {
    color: #f59e0b;
}

.other-icon {
    color: #6b7280;
}

.option-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.feedback-form {
    display: none;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    transition: border-color 0.2s;
}

    .form-control:focus {
        border-color: #4f46e5;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

    .form-control::placeholder {
        color: #9ca3af;
    }

.btn-submit {
    background: linear-gradient(135deg, #5e17eb, #7c3aed);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s;
}

    .btn-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    }

.back-btn {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s;
    display: none !important;
}

    .back-btn:hover {
        background: #e5e7eb;
        color: #374151;
    }

@media (max-width: 480px) {
    .feedback-widget {
        width: calc(100vw - 40px);
        right: 20px;
    }
}