/* ==========================================================================
   MargDarshani- Government Theme Stylesheet
   ========================================================================== */

/* --- General & Scrollbar --- */
body {
    color: #212529; /* Darker text for better contrast */
    font-family: 'Roboto', 'Inter', sans-serif; /* Prioritizing a more standard font */
    /* --- New Background Image --- */
    background-image: url('https://images.unsplash.com/photo-1549880338-65ddcdfd017b?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

body.dark {
    background-color: #0f172a;
    color: #f1f5f9;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #e9ecef;
}

::-webkit-scrollbar-thumb {
    background: #0d6efd; /* Primary blue for scrollbar */
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7; /* Darker blue on hover */
}

.hidden {
    display: none;
}

/* --- Navigation --- */
.nav-link {
    position: relative;
    padding: 0.25rem 0;
    color: #495057;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0d6efd;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0d6efd;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-out;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #343a40;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
    background-color: #e7f1ff;
    color: #0a58ca;
}

/* --- Buttons --- */
.auth-button,
.primary-button,
.logout-button,
.google-signin-button {
    border-radius: 0.375rem; /* Less rounded corners */
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.07);
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

.auth-button:hover,
.primary-button:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.auth-button:active,
.primary-button:active {
    transform: scale(0.98);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.auth-button,
.primary-button {
    background-color: #0d6efd; /* Solid blue background */
    color: white;
    padding: 0.75rem 2rem;
    border-color: #0d6efd;
}

.auth-button:hover,
.primary-button:hover {
    background-color: #0b5ed7; /* Darker blue on hover */
    border-color: #0a58ca;
}

.google-signin-button {
    width: 100%;
    background-color: white;
    border: 1px solid #ced4da;
    color: #495057;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    gap: 1rem;
}

.google-signin-button:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
}

.logout-button {
    background-color: #6c757d; /* Muted grey for logout */
    border-color: #6c757d;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.logout-button:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

/* --- Cards & Layout --- */
.feature-card {
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent background */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    padding: 1.5rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease-in-out;
}

.feature-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-4px);
    border-color: #0d6efd;
}

.feature-icon {
    height: 3rem;
    width: 3rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.main-content-card {
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent background */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 2rem;
    border: 1px solid #dee2e6;
}

/* --- Typography --- */
.section-title {
    font-size: 2rem;
    font-weight: 700; /* Slightly less bold */
    text-align: center;
    margin-bottom: 0.5rem;
    color: #003366; /* Official dark blue */
}

.section-subtitle {
    text-align: center;
    color: #343a40; /* Darker text for readability on image */
    margin-bottom: 2rem;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

/* --- Forms & Inputs --- */
.filter-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da; /* Standard input border */
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #86b7fe; /* Lighter blue focus ring */
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
}

/* --- Aptitude Test Enhancements --- */
.quiz-question-container {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s ease-out forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-option {
    display: block;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.quiz-option:hover {
    background-color: #e7f1ff;
    border-color: #0d6efd;
}

.quiz-option input[type="radio"] {
    display: none;
}

.quiz-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #0d6efd;
}

.quiz-option-selected {
    background-color: #e7f1ff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
    position: relative;
}

.quiz-option-selected::after {
    content: '✔';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #0d6efd;
    font-weight: bold;
    font-size: 1.25rem;
    transition: opacity 0.3s ease;
    area-hidden: true;
}

/* --- Login Page Enhancements --- */
.login-card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    max-width: 28rem;
    margin: 0 auto;
}

.google-signin-button img {
    height: 1.5rem;
    width: 1.5rem;
    transition: transform 0.3s ease;
}

.google-signin-button:hover img {
    transform: rotate(-15deg) scale(1.1);
}

.back-link {
    color: #6c757d;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    text-align: center;
    width: 100%;
    justify-content: center;
}

.back-link:hover {
    color: #0d6efd;
}

/* --- Admin Panel Styles --- */
.admin-card {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border: 1px solid #dee2e6;
    padding: 3rem;
}

#admin-container .form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

#admin-container .form-input {
    display: block;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#admin-container .form-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
}

.admin-list-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}