/* Root Variables for Light and Dark Mode */
:root {
    --background-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f8f9fa;
    --footer-bg: #f1f1f1;
    --link-color: #0066cc;
    --link-hover-color: #004499;
    --accent-color: #5b79f8;
    --gradient-start: #5b79f8;
    --gradient-end: #6875f5;
    --card-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] {
    --background-color: #121212;
    --text-color: #e4e4e4;
    --card-bg: #1e1e1e;
    --footer-bg: #1f1f1f;
    --link-color: #66b2ff;
    --link-hover-color: #3399ff;
    --accent-color: #72aaff;
    --gradient-start: #3949ab;
    --gradient-end: #5c84f7;
    --card-shadow: 0px 5px 15px rgba(0, 0, 0, 0.4);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--link-hover-color);
}

.card {
    background-color: var(--card-bg);
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

footer {
    background-color: var(--footer-bg);
    text-align: center;
    padding: 1rem;
}

.icon {
    font-size: 1.2rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.input-group-text .icon {
    color: #6c757d;
}
[data-bs-theme="dark"] .input-group-text .icon {
    color: #adb5bd;
}

/* Ensure subtitle is visible in both light and dark modes */
.login-subtitle {
    color: var(--text-color); /* Default for light mode */
    opacity: 0.9; /* Subtle transparency to blend nicely */
    font-size: 1rem;
    transition: color 0.3s ease, opacity 0.3s ease;
}

[data-bs-theme="dark"] .login-subtitle {
    color: #ccd6f6 !important; /* Ensure visibility with a lighter color in dark mode */
    opacity: 1; /* Full opacity for better contrast */
}

/* Stylish Login Enhancements */
.background-gradient {
    background: linear-gradient(to bottom right, var(--gradient-start), var(--gradient-end));
    color: var(--text-color);
    background-attachment: fixed;
}

.login-heading {
    color: var(--accent-color);
}

/* Gradient Button */
.btn-gradient {
    background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    font-weight: bold;
    border: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, var(--gradient-end), var(--gradient-start));
    transform: scale(1.02);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Animated Card */
.animated-card {
    animation: fadeIn 1s ease-out;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.text-accent {
    color: var(--link-color);
}

/* Footer Text */
footer p {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Label Styling */
form label {
    font-weight: 500;
    font-size: 0.925rem;
    color: #6c757d; /* Muted Bootstrap gray */
    margin-bottom: 0.4rem;
}

    /* Remember-me checkbox label: stay readable on both light and dark cards
   (the muted gray above is too low-contrast on the dark card background) */
.form-check-label {
    color: var(--text-color);
}

/* Input Styling */
form .form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
    padding: 0.75rem;
    transition: all 0.3s ease-in-out;
}

/* Focus Effect */
form .form-control:focus {
    border-color: #5cb85c; /* Matches success button color */
    box-shadow: 0 0 0 0.2rem rgba(92, 184, 92, 0.25); /* Light green shadow */
}

/* Register Button Styling */
.btn-success {
    background-color: #5cb85c;
    border-color: #5cb85c;
    font-weight: 600;
    letter-spacing: 0.05rem; /* Slightly spaced letters */
}

.btn-success:hover {
    background-color: #4cae4c;
    border-color: #449d44;
}

.oauth-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    border: none;
    font-weight: bold;
}

/* GitHub Button */
.oauth-buttons .btn[href="/oauth2/authorization/github"] {
    background-color: #24292e; /* GitHub background color */
    color: #ffffff; /* White text */
}

.oauth-buttons .btn[href="/oauth2/authorization/github"]:hover {
    background-color: #394049; /* Slightly lighter for hover */
}

/* Google Button */
/* Google Button Styling */
.oauth-buttons .btn[href="/oauth2/authorization/google"] {
    background-color: #db4437; /* Google branding red */
    color: #ffffff; /* White text for readability */
}

.oauth-buttons .btn[href="/oauth2/authorization/google"]:hover {
    background-color: #c33d2e; /* Slightly darker red for hover */
}

/* SVG Styling (Icons) */
.oauth-buttons .btn svg {
    width: 1.5em; /* Icon size */
    height: 1.5em;
}

/* Accessibility Styles */
.oauth-buttons .btn:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); /* Focus indicator */
}

/* Toast container positioning */
.toast-container {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1050;
    padding: 0 15px;
}

/* Ensure toast appears above other content */
.toast-container .toast {
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    animation: slideInDown 0.4s ease-out;
}

/* Toast slide-in animation */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive toast width */
@media (max-width: 768px) {
    .toast-container {
        padding: 0 10px;
    }

    .toast-container .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Ensure proper spacing from top on mobile */
@media (max-width: 576px) {
    .toast-container {
        top: 10px;
    }
}

