/**
 * =====================================================
 * QUIZ PAGE STYLES
 * =====================================================
 */

/* Hero Section */
.quiz-hero {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.15), var(--bg-primary));
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40" opacity="0.1">📝</text></svg>');
    padding: 60px 50px 5px;
    margin-top: 70px;
    margin-bottom: 0;
    position: relative;
}

.quiz-hero h1 {
    background: linear-gradient(135deg, #e50914, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px; /* ✅ Minskar avstånd efter titel */
}

.quiz-hero p {
    margin-bottom: 15px; /* ✅ Minskar avstånd efter beskrivning */
}

/* ✅ Kompakt hero-stats */
.quiz-hero .hero-stats {
    margin-top: 15px; /* ✅ Mindre margin ovan */
    margin-bottom: 0; /* ✅ Ingen margin under */
    padding-bottom: 0; /* ✅ Ingen padding under */
}

.quiz-hero .stat-item {
    padding: 8px 15px; /* ✅ Mindre padding */
}

/* ✅ Minskar avstånd mellan hero och content ÄNNU MER */
.content {
    margin-top: -40px;
    padding-top: 10px; /* ✅ Mindre padding ovan content */
}

/* Filters */
.quiz-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: var(--glass-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-select {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #e50914;
    background: rgba(255, 255, 255, 0.08);
}

/* Quiz Grid */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Quiz Card */
.quiz-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.quiz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(229, 9, 20, 0.15);
    border-color: rgba(229, 9, 20, 0.4);
}

/* Quiz Header */
.quiz-card-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.1), rgba(255, 107, 53, 0.1));
    position: relative;
}

.quiz-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-standalone {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.badge-video {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.quiz-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.quiz-card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Quiz Body */
.quiz-card-body {
    padding: 20px;
}

.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.quiz-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.quiz-meta-item span:first-child {
    font-size: 16px;
}

/* Difficulty Badge */
.difficulty-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.difficulty-beginner {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.difficulty-intermediate {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.difficulty-advanced {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Quiz Stats */
.quiz-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.quiz-stat {
    text-align: center;
}

.quiz-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #e50914;
}

.quiz-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(229, 9, 20, 0.2);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .quiz-hero {
        padding: 40px 20px 15px;
        margin-top: 60px;
    }
    
    .quiz-filters {
        padding: 15px;
        gap: 15px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Light Mode */
body.light-mode .quiz-hero {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.08), #ffffff);
}

body.light-mode .quiz-filters {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .filter-select {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .quiz-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-mode .quiz-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}