* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background: #000000;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border: 2px solid #000000;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

::-webkit-scrollbar-corner {
    background: #000000;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #333333 #000000;
}

.subtitle {
    font-size: 14px;
    opacity: 0.7;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1px;
    margin-bottom: 0;
    background: #333;
}

.project-card {
    background: #000000;
    padding: 16px;
    border: 1px solid #333;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-card:hover {
    background: #1a1a1a;
}

.project-card h2 {
    color: #ffffff;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 500;
}

.project-card h2 a {
    font-size: 16px;
    text-decoration: none;
    margin-left: 8px;
    color: #ffffff;
}

.project-card p {
    color: #999;
    margin-bottom: 12px;
    line-height: 1.4;
    font-size: 14px;
}

.project-card a {
    align-self: flex-start;
}
.project-card mark {
    display: inline-block;
    background: #ffffff;
    color: #000000;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    align-self: flex-start;
}


/* Button Styles */
.btn {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    border: 1px solid #ffffff;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #000000;
    color: white;
}

.btn-primary:hover {
    background: #ffffff;
    color: #000000;
}

.btn-success {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.btn-success:hover {
    background: #000000;
    color: #ffffff;
}

/* Header */
header {
    background: #000000;
    border-bottom: 1px solid #333;
    position: relative;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header h1 {
    text-align: center;
    font-size: 18px;
}

.back-btn {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 12px;
    transition: opacity 0.2s;
}

.back-btn:hover {
    opacity: 0.7;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
    color:#999;
}

.stat-value {
    font-weight: 500;
    background: #ffffff;
    color: #000000;
    padding: 0 4px;
}

.stat-value.correct {
    background: #ffffff;
    color: #000000;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.toggle-sidebar-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background: #000000;
    color: #ffffff;
    border: 1px solid #333;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-sidebar-btn:hover {
    background: #1a1a1a;
    border-color: #ffffff;
}

/* Question List (Nav) */
.question-list {
    background: #000000;
    width: 250px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid #333;
}

.question-list h3, .question-list>a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #333;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-list.hidden {
    display: none;
}

#questionNav {
    display: flex;
    flex-direction: column;
}

.question-nav-item {
    background: #000000;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    height: 40px;
    max-width: 394px;
    display: flex;
    align-items: center;
    /* justify-content: center; */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 12px;
}

.question-nav-item:hover {
    background: #1a1a1a;
}

.question-nav-item.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.question-nav-item.correct {
    background: #1a1a1a;
    border-color: #4a4a4a;
    color:#0f0;
}

.question-nav-item.incorrect {
    background: #1a1a1a;
    border-color: #666;
    color:#f00;
}

.question-nav-item.marked::after {
    content: " •";
}

/* Question Content (Main) */
main {
    background: #000000;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.question-content>* {
    padding: 16px;
}

.loading {
    text-align: center;
    color: #999;
    font-size: 14px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    height: 50px;
}

.question-number {
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mark-btn {
    background: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 32px;
}

.mark-btn:hover {
    background: #ffffff;
    color: #000000;
}

.mark-btn.marked {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000;
}

.question-text {
    font-size: 16px;
    line-height: 1.5;
    color: #ffffff;
    white-space: pre-wrap;
}

.embedded-image {
    text-align: center;
    background: #000000;
    border: 1px solid #333;
}

.embedded-image img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    transition: opacity 0.2s ease;
    display: block;
}

.embedded-image img:hover {
    opacity: 0.8;
}

.answer-text {
    display: inline-block;
}

.answer-option .embedded-image {
    max-width: 300px;
}

.answers-container {
    flex: 1;
}

.answer-option {
    display: flex;
    align-items: center;
    background: #000000;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
    padding: 0 .5rem;
    gap: 1rem;
}

.answer-option:hover {
    background: #1a1a1a;
}

.answer-option.selected {
    background: #1a1a1a;
    border-color: #ffffff;
}

.answer-option.correct-answer {
    background: #1a1a1a;
    border-color: #4a4a4a;
}

.answer-option.wrong-answer {
    background: #1a1a1a;
    border-color: #666;
}

.answer-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.answer-label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.answer-key {
    font-weight: bold;
    color: #ffffff;
}

.answer-actions {
    display: flex;
    gap: 8px;
    height: 60px;
    align-items: center;
}

.feedback {
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #333;
    height: 50px;
    display: flex;
    align-items: center;
}

.feedback.correct {
    background: #000000;
    color: #ffffff;
    border-color: #4a4a4a;
}

.feedback.incorrect {
    background: #000000;
    color: #ffffff;
    border-color: #666;
}

/* Footer */
footer {
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    padding: .5rem;
}


/* Responsive Design */
@media (max-width: 768px) {
    .question-list {
        position: absolute;
        left: 0;
        top: 80px;
        width: 250px;
        height: calc(100vh - 140px);
        z-index: 50;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.5);
    }

    .question-list.hidden {
        display: block;
    }

    .toggle-sidebar-btn {
        display: flex;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 20px;
    }

    .stats-bar {
        gap: 16px;
    }
}