/* --- Quiz Page Specific Styles --- */

/* --- Hero Section --- */
.quiz-hero {
    background: linear-gradient(rgba(9, 46, 32, 0.85), rgba(9, 46, 32, 0.85)), url('https://source.unsplash.com/random/1600x900/?learning,quiz') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.quiz-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.quiz-hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* --- Main Page Container --- */
.quiz-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem 1rem;
}

.quiz-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
}

.dark-mode .section-title {
    color: #8db8a2;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* --- Completed Quizzes Section --- */
.completed-quizzes-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.completed-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 5px solid transparent; /* For hover effect */
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    gap: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
}

.completed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-left-color: var(--accent-color);
}

.completed-quiz-info {
    flex-grow: 1;
}

.completed-card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.completed-card-score {
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.score-pass {
    background-color: rgba(76, 175, 80, 0.15);
    color: #388E3C;
}

.score-fail {
    background-color: rgba(244, 67, 54, 0.15);
    color: #D32F2F;
}

.completed-date {
    font-size: 0.9rem;
    color: #888;
}
.dark-mode .completed-date { color: #aaa; }

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-left: auto; /* Pushes buttons to the right */
}

.action-btn {
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.action-btn:only-child {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}
.action-btn:only-child:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

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

.pay-btn:hover {
    background-color: #FFC107;
    border-color: #FFC107;
    color: #fff;
}

.view-btn:hover {
    background-color: #2196F3;
    border-color: #2196F3;
    color: #fff;
}

.verify-btn:hover {
    background-color: #9C27B0;
    border-color: #9C27B0;
    color: #fff;
}

.linkedin-btn:hover {
    background-color: #0077B5;
    border-color: #0077B5;
    color: #fff;
}

.no-completed-message {
    background-color: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    color: #888;
}

.dark-mode .no-completed-message { color: #aaa; }

.no-completed-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.no-completed-message p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --- Available Quizzes Section --- */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.quiz-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.quiz-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.quiz-card-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.easy-icon { background-color: rgba(76, 175, 80, 0.1); color: #4CAF50; }
.medium-icon { background-color: rgba(255, 152, 0, 0.1); color: #FF9800; }
.hard-icon { background-color: rgba(244, 67, 54, 0.1); color: #F44336; }

.quiz-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}
.dark-mode .quiz-card h3 { color: #8db8a2; }

.quiz-description {
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.quiz-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}
.dark-mode .quiz-meta { color: #aaa; }

.quiz-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-start-btn {
    width: 100%;
    text-align: center;
    background-color: var(--main-btn-bg);
}

.quiz-start-btn:hover {
    background-color: #54b858;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .quiz-hero-content h1 { font-size: 2.5rem; }
    .completed-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .card-actions {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .quiz-hero { padding: 3rem 1rem; }
    .quiz-hero-content h1 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
}
