* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.header-content h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header-content p {
    font-size: 1.1em;
    opacity: 0.95;
    font-weight: 300;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    padding: 0;
    gap: 0;
}

.nav-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #495057;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.nav-btn:hover {
    background: #e9ecef;
    color: #667eea;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f0f3ff;
}

/* Content */
.content {
    padding: 40px;
}

.category-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.category-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section > h2 {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 30px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

/* Question Card */
.question-card {
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.question-header {
    padding: 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.question-header:hover {
    background: #f0f3ff;
}

.question-header h3 {
    font-size: 1.2em;
    color: #212529;
    flex: 1;
    margin: 0;
}

.toggle-icon {
    font-size: 1.5em;
    color: #667eea;
    font-weight: bold;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.question-header.expanded .toggle-icon {
    transform: rotate(45deg);
}

.question-content {
    padding: 25px;
    border-top: 1px solid #e9ecef;
    line-height: 1.8;
}

/* Question Items */
.problem-statement {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.qa-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.qa-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.qa-item h4 {
    color: #667eea;
    font-size: 1.05em;
    margin-bottom: 12px;
    margin-top: 15px;
}

.qa-item p {
    margin-bottom: 12px;
    color: #495057;
}

.qa-item strong {
    color: #212529;
}

.qa-item code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #764ba2;
    font-weight: 500;
}

.qa-item ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.qa-item li {
    margin-bottom: 8px;
    color: #495057;
}

.qa-item li strong {
    color: #667eea;
}

/* Code Blocks */
pre {
    background: #282c34;
    color: #abb2bf;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
    font-size: 0.9em;
}

pre code {
    color: inherit;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Syntax highlighting colors */
.hljs-string { color: #98c379; }
.hljs-number { color: #d19a66; }
.hljs-literal { color: #56b6c2; }
.hljs-attr { color: #e06c75; }
.hljs-built_in { color: #e06c75; }
.hljs-function { color: #61afef; }
.hljs-keyword { color: #c678dd; }
.hljs-class { color: #e5c07b; }
.hljs-title { color: #61afef; }
.hljs-comment { color: #5c6370; font-style: italic; }
.hljs-tag { color: #e06c75; }
.hljs-attr { color: #d19a66; }

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.8em;
    }

    .nav-tabs {
        gap: 5px;
    }

    .nav-btn {
        min-width: 100px;
        padding: 12px 10px;
        font-size: 0.9em;
    }

    .content {
        padding: 20px;
    }

    .question-header h3 {
        font-size: 1em;
    }

    .toggle-icon {
        font-size: 1.2em;
    }

    pre {
        font-size: 0.8em;
        padding: 10px;
    }

    .category-section > h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .checklist-stats {
        gap: 15px;
    }

    .stat-card {
        min-width: 120px;
        padding: 15px 20px;
    }

    .stat-number {
        font-size: 2em;
    }

    .checklist-category {
        padding: 20px;
    }

    .category-title {
        font-size: 1.3em;
    }

    .subcategory {
        padding: 12px;
    }

    .checklist-item {
        padding: 8px;
    }

    .checklist-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .checklist-item span {
        font-size: 0.95em;
    }

    .checklist-actions {
        flex-direction: column;
    }

    .reset-btn, .export-btn {
        width: 100%;
    }
}

/* Smooth transitions */
button, .question-header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibility */
.question-header:focus {
    outline: 2px solid #667eea;
    outline-offset: -2px;
}

/* Extra styling for better readability */
.qa-item pre {
    margin: 10px 0;
    padding: 12px;
}

/* Success and error styling */
.success-note {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.warning-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.error-note {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Checklist Styles */
.checklist-header {
    margin-bottom: 40px;
    text-align: center;
}

.checklist-header h2 {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 30px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

.checklist-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 150px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.progress-bar-container {
    width: 100%;
    max-width: 600px;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin: 20px auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#checklist-progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.checklist-category {
    margin-bottom: 50px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
}

.category-title {
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.subcategory {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.subcategory h4 {
    color: #764ba2;
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease;
    user-select: none;
}

.checklist-item:hover {
    background: #f0f3ff;
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.checklist-item input[type="checkbox"]:checked + span {
    color: #28a745;
    text-decoration: line-through;
}

.checklist-item span {
    color: #212529;
    font-size: 1em;
    line-height: 1.5;
}

.checklist-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.reset-btn, .export-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn {
    background: #6c757d;
    color: white;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.export-btn {
    background: #28a745;
    color: white;
}

.export-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}
