/* /css/quizzes.css
    Digital Junction Cymru - Knowledge Center Styles
    Theme: High-Contrast Light-on-Dark Gallery
*/

/* --- Main Container --- */
#main {
    min-height: 80vh;
}

/* --- Hero Section & Custom Gradients --- */
.hero-gradient {
    background: linear-gradient(135deg, #0b0b0b 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.hero-gradient h1 {
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.2);
}

/* --- Community CTA Banner --- */
.cta-banner {
    border-left: 5px solid var(--bs-primary) !important;
    background: #ffffff !important; /* High contrast white */
    border: none;
}

.cta-banner h4 {
    color: #212529; /* Dark text for light banner */
}

/* --- Quiz Card Design --- */
.quiz-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff !important; /* Restored White Cards */
    border: none !important;
}

/* Hover Effect: Lift + Strong Shadow */
.quiz-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.4) !important;
}

/* --- Image Handling --- */
.quiz-card-img-container {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.quiz-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.quiz-card:hover .quiz-card-img {
    transform: scale(1.08);
}

/* --- Floating Difficulty Badge --- */
.difficulty-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    color: white;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* --- Typography & Content --- */
.quiz-card .card-title {
    color: #212529; /* Standard dark text */
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    min-height: 2.8rem;
    color: #6c757d; 
}

/* --- Button Grouping (Practice/Start) --- */
.btn-practice {
    border-radius: 8px 0 0 8px !important;
    border-right: none !important;
}

.btn-exam {
    border-radius: 0 8px 8px 0 !important;
}

/* --- Badges --- */
.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #343a40 !important;
    border: 1px solid #dee2e6 !important;
}

/* --- Loader Animation --- */
.spinner-grow {
    box-shadow: 0 0 15px rgba(13, 110, 253, 0.5);
}

/* --- User Setup Bar --- */
#user-setup-card {
    transition: all 0.3s ease;
}

.user-avatar-circle {
    width: 45px;
    height: 45px;
    background: var(--bs-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.4);
}

#username-input:focus, #player-name-input:focus {
    background-color: #ffffff !important;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    color: #212529 !important;
}

/* Ensure all inputs and selects remain light and crisp */
#quiz-search, #filter-category, #filter-genre, #filter-difficulty, #username-input, #player-name-input {
    background-color: #ffffff !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px;
}

#quiz-search:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border-color: var(--bs-primary) !important;
}

.input-group-text {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

#btn-reset-filters {
    background-color: #ffffff !important;
    border: 1px solid #ffc107 !important; /* Warning/Gold accent to match your theme */
    color: #0b0b0b !important;
    height: 38px; /* Match Bootstrap standard input height */
    transition: all 0.2s ease;
}

#btn-reset-filters:hover {
    background-color: #dc3545 !important; /* Switch to red on hover for "danger/clear" signal */
    color: #ffffff !important;
    border-color: #dc3545 !important;
}