/* Enhanced subject page styles with quiz type options */
.subject-header-section {
    margin-bottom: 2rem;
}

.subject-info {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.subject-info h1 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.subject-info .class-badge {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.chapters-section h2 {
    color: white;
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.chapter-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    color: white;
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-card:nth-child(2n) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.chapter-card:nth-child(3n) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.chapter-card:nth-child(4n) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.chapter-card:nth-child(5n) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.chapter-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.chapter-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.chapter-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chapter-content {
    flex-grow: 1;
}

.chapter-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.chapter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.difficulty-badge {
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.duration-info,
.questions-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.quiz-options {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.quiz-options h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    font-weight: 600;
}

.quiz-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.quiz-type-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.8rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    text-align: center;
}

.quiz-type-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.quiz-type-icon {
    font-size: 0.9rem;
}

/* Ad integration for subject page */
.ad-container-chapter {
    margin: 2rem 0;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .chapter-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .chapter-number {
        margin-bottom: 0.5rem;
    }
    
    .quiz-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .subject-info h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .chapter-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .quiz-buttons {
        grid-template-columns: 1fr;
    }
    
    .chapter-card {
        padding: 1.5rem;
        min-height: 250px;
    }
}
