/* Quiz System Styles */

/* Layout */
.quiz-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.main-content {
    flex: 1;
    overflow-y: auto;
}

/* Sidebar Styles */
.sidebar-header {
    padding: 1rem 0;
    text-align: center;
}

.sidebar .logo {
    max-width: 120px;
    margin-bottom: 1rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    margin: 0.2rem 0;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

/* Quiz Cards */
.quiz-card {
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

.quiz-card .difficulty {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.difficulty.easy { background-color: #28a745; color: white; }
.difficulty.medium { background-color: #ffc107; color: black; }
.difficulty.hard { background-color: #dc3545; color: white; }

/* Quiz Progress */
.quiz-progress {
    margin-bottom: 1.5rem;
}

.progress {
    height: 0.5rem;
    border-radius: 1rem;
}

/* Question Styles */
.question-container {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.question-text {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.options-list {
    list-style: none;
    padding: 0;
}

.option-item {
    padding: 1rem;
    margin: 0.5rem 0;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    background-color: #e9ecef;
}

.option-item.selected {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.option-item.correct {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.option-item.incorrect {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Results Section */
.results-summary {
    text-align: center;
    padding: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 10px solid #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.score-value {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Leaderboard */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
}

.rank.top-1 { background-color: #ffd700; color: black; }
.rank.top-2 { background-color: #c0c0c0; color: black; }
.rank.top-3 { background-color: #cd7f32; color: white; }

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        bottom: 0;
        z-index: 1000;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }
}

/* Toast Notifications */
.toast {
    position: relative;
    z-index: 1100;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Practice Mode */
.practice-card {
    height: 100%;
    transition: transform 0.3s ease;
}

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

/* Timer Styles */
.timer {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0d6efd;
}

.timer.warning {
    color: #ffc107;
}

.timer.danger {
    color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Code Question Styles */
.code-block {
    background-color: #282c34;
    color: #abb2bf;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', Courier, monospace;
    margin: 1rem 0;
    overflow-x: auto;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
