/* Main Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    transition: background-color 0.3s, color 0.3s;
}

main {
    flex: 1;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
}

/* Quiz Cards */
.quiz-card {
    transition: transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quiz-card:hover {
    transform: translateY(-5px);
}

.quiz-card .card-img-top {
    height: 160px;
    object-fit: cover;
}

/* Dark Mode */
.dark-mode {
    background-color: #121212;
    color: #e1e1e1;
}

.dark-mode .card {
    background-color: #1e1e1e;
    border-color: #333;
    color: #e1e1e1;
}

.dark-mode .card-title,
.dark-mode .card-text {
    color: #e1e1e1;
}

.dark-mode .card-footer {
    background-color: #252525;
    border-top-color: #333;
}

.dark-mode .navbar {
    background-color: #0a4b9c !important;
}

.dark-mode footer {
    background-color: #1e1e1e !important;
    color: #e1e1e1;
}

.dark-mode footer a {
    color: #6ea8fe;
}

.dark-mode footer a:hover {
    color: #9ec5fe;
}

.dark-mode .text-muted {
    color: #adb5bd !important;
}

.dark-mode h1, 
.dark-mode h2, 
.dark-mode h3, 
.dark-mode h4, 
.dark-mode h5, 
.dark-mode h6 {
    color: #e1e1e1;
}

.dark-mode p {
    color: #e1e1e1;
}

.dark-mode a:not(.btn) {
    color: #6ea8fe;
}

.dark-mode a:hover:not(.btn) {
    color: #9ec5fe;
}

.dark-mode .alert-info {
    background-color: #0d3a58;
    border-color: #0c5460;
    color: #d1ecf1;
}

.dark-mode .form-control {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e1e1e1;
}

.dark-mode .form-control:focus {
    background-color: #2d2d2d;
    color: #e1e1e1;
}

.dark-mode .form-label,
.dark-mode .form-check-label,
.dark-mode .form-text,
.dark-mode label {
    color: #e1e1e1;
}

.dark-mode .input-group-text {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e1e1e1;
}

.dark-mode .dropdown-menu {
    background-color: #2d2d2d;
    border-color: #444;
}

.dark-mode .dropdown-item {
    color: #e1e1e1;
}

.dark-mode .dropdown-item:hover {
    background-color: #3d3d3d;
    color: #fff;
}

.dark-mode .modal-content {
    background-color: #1e1e1e;
    color: #e1e1e1;
    border-color: #444;
}

.dark-mode .modal-header,
.dark-mode .modal-footer {
    border-color: #444;
}

.dark-mode .close {
    color: #e1e1e1;
}

/* Quiz Taking */
.answer-option {
    transition: background-color 0.2s;
}

.answer-option:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

.answer-option input[type="radio"]:checked + label {
    font-weight: bold;
}

/* Progress Bar */
.progress {
    height: 10px;
    border-radius: 5px;
}

/* Timer */
#quiz-timer {
    font-size: 1.2rem;
}

/* Auth Pages */
.auth-card {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.auth-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-weight: 600;
    color: var(--primary-color);
}

.auth-header p {
    color: var(--secondary-color);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--secondary-color);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.auth-divider span {
    padding: 0 1rem;
}

.social-login-buttons {
    margin-bottom: 1.5rem;
}

.social-login-button {
    width: 100%;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.social-login-button i {
    margin-right: 0.5rem;
}

.social-login-button.google {
    background-color: #fff;
    color: #757575;
    border: 1px solid #ddd;
}

.social-login-button.facebook {
    background-color: #3b5998;
    color: white;
    border: none;
}

.social-login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-floating > label {
    color: var(--secondary-color);
}

.form-check-label {
    color: var(--secondary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--secondary-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Password strength meter */
.password-strength-meter {
    height: 5px;
    margin-top: 5px;
    margin-bottom: 15px;
    background-color: #eee;
    border-radius: 3px;
    position: relative;
}

.password-strength-meter-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

.strength-weak .password-strength-meter-fill {
    background-color: #ff4136;
    width: 25%;
}

.strength-fair .password-strength-meter-fill {
    background-color: #ffdc00;
    width: 50%;
}

.strength-good .password-strength-meter-fill {
    background-color: #0074d9;
    width: 75%;
}

.strength-strong .password-strength-meter-fill {
    background-color: #2ecc40;
    width: 100%;
}

/* Dark mode auth adjustments */
.dark-mode .auth-card {
    background-color: #2d2d2d;
    border-color: #444;
}

.dark-mode .auth-header h1 {
    color: #6ea8fe;
}

.dark-mode .auth-header p,
.dark-mode .auth-divider,
.dark-mode .form-check-label,
.dark-mode .auth-footer {
    color: #e1e1e1;
}

.dark-mode .auth-footer a {
    color: #6ea8fe;
}

.dark-mode .auth-divider::before,
.dark-mode .auth-divider::after {
    border-bottom: 1px solid #444;
}

.dark-mode .social-login-button.google {
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
}

/* Dark mode password strength meter */
.dark-mode .password-strength-meter {
    background-color: #444;
}

.dark-mode .strength-weak .password-strength-meter-fill {
    background-color: #ff4136;
}

.dark-mode .strength-fair .password-strength-meter-fill {
    background-color: #ffdc00;
}

.dark-mode .strength-good .password-strength-meter-fill {
    background-color: #0074d9;
}

.dark-mode .strength-strong .password-strength-meter-fill {
    background-color: #2ecc40;
}

/* Dark mode form validation */
.dark-mode .invalid-feedback {
    color: #ff6b6b;
}

.dark-mode .form-control.is-invalid {
    border-color: #ff6b6b;
}

.dark-mode .valid-feedback {
    color: #2ecc40;
}

.dark-mode .form-control.is-valid {
    border-color: #2ecc40;
}

/* Dark mode table styling */
.dark-mode .table {
    color: #e1e1e1;
    border-color: #444;
}

.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .table-hover > tbody > tr:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

.dark-mode .table thead th {
    border-bottom-color: #444;
}

.dark-mode .table td, 
.dark-mode .table th {
    border-color: #444;
}

/* Dark mode list groups */
.dark-mode .list-group-item {
    background-color: #1e1e1e;
    border-color: #444;
    color: #e1e1e1;
}

.dark-mode .list-group-item-action:hover {
    background-color: #2d2d2d;
    color: #e1e1e1;
}

.dark-mode .list-group-item-action:active {
    background-color: #3d3d3d;
    color: #e1e1e1;
}

/* Dark mode badges */
.dark-mode .badge.bg-secondary {
    background-color: #495057 !important;
}

.dark-mode .badge.bg-light {
    background-color: #343a40 !important;
    color: #e1e1e1 !important;
}

.dark-mode .badge.text-dark {
    color: #e1e1e1 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
}