/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
    line-height: 1.6;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
.dashboard-header {
    background-color: #343a40;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    margin: 0 auto;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.sidebar-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

.dashboard-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    margin-left: 0;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.user-name {
    font-weight: 500;
}

.user-avatar {
    font-size: 2rem;
    color: #adb5bd;
}

/* User Info Dropdown Styles */
.user-info {
    position: relative;
}

.user-info-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.user-info-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: #adb5bd;
    transition: transform 0.3s;
}

.dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    background-color: #343a40;
    border: 1px solid #495057;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-top: 0.5rem;
    min-width: 200px;
}

.dropdown-item {
    color: #adb5bd;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.dropdown-item:hover {
    background-color: #495057;
    color: white;
    text-decoration: none;
}

.dropdown-item i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    border-color: #495057;
    margin: 0.5rem 0;
}

/* Main Content Area */
.dashboard-main {
    display: flex;
    flex: 1;
}

/* Sidebar Styles */
.dashboard-sidebar {
    background-color: #343a40;
    color: white;
    width: 250px;
    min-height: calc(100vh - 80px);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 1.5rem 1rem 1rem;
    border-bottom: 1px solid #495057;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-item {
    margin: 0.25rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background-color: #495057;
    color: white;
    text-decoration: none;
}

.sidebar-item.active .sidebar-link {
    background-color: #495057;
    color: white;
    border-left-color: #007bff;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Sidebar Children Styles */
.sidebar-children {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #2c3136;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.sidebar-item.has-children.open .sidebar-children {
    max-height: 300px;
}

.sidebar-children .sidebar-item {
    margin: 0;
}

.sidebar-children .sidebar-link {
    padding: 0.5rem 1rem 0.5rem 3rem;
    font-size: 0.9rem;
    color: #adb5bd;
    border-left: none;
}

.sidebar-children .sidebar-link:hover {
    background-color: #495057;
    color: white;
}

.sidebar-children .sidebar-link i {
    font-size: 0.9rem;
    width: 16px;
}

.sidebar-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.sidebar-item.has-children.open .sidebar-arrow {
    transform: rotate(180deg);
}

.sidebar-toggle {
    cursor: pointer;
}

/* Main Content */
.dashboard-content {
    flex: 1;
    padding: 2rem;
    background-color: #f8f9fa;
    overflow-y: auto;
}

.content-wrapper {
    margin: 0 auto;
}

/* Content Sections */
.content-section {
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #343a40;
}

.section-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Cards */
.content-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.content-card h4 {
    color: #343a40;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-icon {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #343a40;
    margin: 0;
    line-height: 1;
}

.stat-label {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.activity-item:hover {
    background-color: #e9ecef;
}

.activity-icon {
    background-color: #007bff;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.activity-content p {
    margin: 0;
    font-weight: 500;
    color: #343a40;
}

.activity-content small {
    color: #6c757d;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Chart Placeholder */
.chart-placeholder {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Stats */
.user-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.stat-item .stat-label {
    font-weight: 500;
    color: #6c757d;
}

.stat-item .stat-value {
    font-weight: 700;
    color: #343a40;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .dashboard-sidebar {
        position: fixed;
        left: -250px;
        top: 80px;
        height: calc(100vh - 80px);
        z-index: 999;
    }

    .dashboard-sidebar.show {
        transform: translateX(250px);
    }

    .dashboard-content {
        padding: 1rem;
    }

    .header-content {
        padding: 0 1rem;
    }

    .dashboard-title {
        font-size: 1.25rem;
    }

    /* Hide dashboard title on small screens */
    .dashboard-title {
        display: none;
    }

    /* Adjust header layout for mobile */
    .header-left {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .dashboard-content {
        padding: 0.75rem;
    }

    .content-card {
        padding: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .header-content {
        flex-direction: row;
        gap: 0;
        text-align: left;
    }

    .header-left {
        justify-content: flex-start;
    }

    .header-right {
        justify-content: flex-end;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .activity-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Utility Classes */
.text-muted {
    color: #6c757d !important;
}

/* Custom Scrollbar */
.dashboard-content::-webkit-scrollbar {
    width: 6px;
}

.dashboard-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for content sections */
.content-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quiz Styles */
.quiz-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.quiz-info h3 {
    margin: 0 0 0.5rem 0;
    color: #343a40;
    font-size: 1.5rem;
}

.quiz-info p {
    margin: 0;
    color: #6c757d;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: #dc3545;
}

.quiz-timer i {
    font-size: 1.2rem;
}

.quiz-progress {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: #6c757d;
}

.quiz-question {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.question-number {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

.question-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.question-content h4 {
    margin-bottom: 1rem;
    color: #343a40;
    font-size: 1.2rem;
}

.question-text {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
}

.option-item input[type="radio"] {
    display: none;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.option-label:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.option-item input[type="radio"]:checked + .option-label {
    border-color: #667eea;
    background-color: #e3f2fd;
}

.option-letter {
    width: 30px;
    height: 30px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.option-text {
    font-size: 1.1rem;
    color: #343a40;
    font-weight: 500;
}

.quiz-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quiz-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flag-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.flag-btn:hover {
    background: #ffc107;
    color: #343a40;
    border-color: #ffc107;
    transform: translateY(-1px);
}

.submit-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.quiz-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.question-palette, .quiz-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.question-palette h5, .quiz-summary h5 {
    margin-bottom: 1rem;
    color: #343a40;
    font-size: 1.1rem;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.palette-item {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.palette-item:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
    transform: translateY(-1px);
}

.palette-item.current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.palette-item.answered {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.palette-item.flagged {
    background: #ffc107;
    color: #343a40;
    border-color: #ffc107;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: #6c757d;
    font-weight: 500;
}

.summary-value {
    color: #343a40;
    font-weight: 600;
}

/* Responsive Quiz */
@media (max-width: 1200px) {
    .quiz-container {
        grid-template-columns: 1fr;
    }
    
    .quiz-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .quiz-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .quiz-actions {
        width: 100%;
        justify-content: center;
    }
    
    .palette-grid {
        grid-template-columns: repeat(5, 1fr);
    }
} 