/* Z2M Student Growth & Skill Reflection System - Styles */

:root {
    --primary: #4F46E5;
    --secondary: #22C55E;
    --accent: #F59E0B;
    --background: #F9FAFB;
    --text-dark: #111827;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
header {
    background: var(--white);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

header h1 {
    font-size: 24px;
    color: var(--primary);
    font-weight: 600;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-icon {
    font-size: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI Emoji', 'Segoe UI Symbol', 'Apple Color Emoji', 'Noto Color Emoji', 'EmojiOne Color', 'Android Emoji', 'Twemoji Mozilla', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Custom Language Selector */
.custom-language-selector {
    position: relative;
    min-width: 150px;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.select-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    width: 28px;
    height: 20px;
    position: relative;
    vertical-align: middle;
}

.flag-emoji {
    font-size: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI Emoji', 'Segoe UI Symbol', 'Apple Color Emoji', 'Noto Color Emoji', 'EmojiOne Color', 'Android Emoji', 'Twemoji Mozilla', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.flag-code {
    font-size: 9px;
    font-weight: bold;
    color: var(--text-dark);
    font-family: Arial, sans-serif;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

/* Show country code if emoji doesn't render (fallback) */
.select-flag:not(:has(.flag-emoji:not(:empty))) .flag-code,
.option-flag:not(:has(.flag-emoji:not(:empty))) .flag-code {
    opacity: 1;
}

.select-text {
    flex: 1;
    font-weight: 500;
}

.select-arrow {
    font-size: 10px;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.custom-select-trigger.active .select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.custom-select-option:hover {
    background-color: var(--background);
}

.custom-select-option.selected {
    background-color: #EEF2FF;
    color: var(--primary);
    font-weight: 500;
}

.option-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    min-width: 28px;
    height: 20px;
    position: relative;
    vertical-align: middle;
}

.option-flag .flag-emoji {
    font-size: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI Emoji', 'Segoe UI Symbol', 'Apple Color Emoji', 'Noto Color Emoji', 'EmojiOne Color', 'Android Emoji', 'Twemoji Mozilla', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.option-flag .flag-code {
    font-size: 9px;
    font-weight: bold;
    color: var(--text-dark);
    font-family: Arial, sans-serif;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.option-text {
    flex: 1;
}

/* Legacy select support (hidden) */
.language-selector select {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: var(--text-light);
    color: var(--white);
}

.btn-secondary:hover {
    background: #4B5563;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-delete {
    color: #EF4444;
    text-decoration: none;
    font-size: 14px;
}

.btn-delete:hover {
    text-decoration: underline;
}

/* Homepage */
.homepage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.welcome-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 16px var(--shadow);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.welcome-card h2 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 16px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.admin-link {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.admin-link a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
}

.admin-link a:hover {
    color: var(--primary);
}

/* Assessment */
.assessment-container {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px var(--shadow);
}

.assessment-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.assessment-header h2 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 10px;
}

.instruction-text {
    color: var(--text-light);
    margin-bottom: 15px;
}

.progress-indicator {
    font-size: 16px;
    color: var(--primary);
    font-weight: 500;
}

.questions-container {
    margin-bottom: 30px;
}

.questions-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    padding: 10px;
}

.subskill-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.subskill-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border);
}

.question-card-multi {
    background: var(--white);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 6px var(--shadow);
    transition: all 0.3s ease;
}

.question-card-multi:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.question-card-multi .question-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.question-card-multi .question-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Horizontal Scale */
.horizontal-scale-container {
    margin-top: 10px;
}

.scale-options {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

.scale-option-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scale-option-wrapper:hover .scale-circle {
    border-color: var(--primary);
    transform: scale(1.1);
}

.scale-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--white);
    transition: all 0.3s ease;
    position: relative;
}

.scale-circle.checked {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}

.scale-circle.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 14px;
    font-weight: bold;
}

.scale-option-label {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
}

.scale-option-wrapper:hover .scale-option-label {
    color: var(--primary);
}

.scale-label-true {
    color: var(--primary);
    font-weight: 600;
}

/* Domain colors for question cards */
.question-card-multi.domain-green {
    border-left-color: #22C55E;
}

.question-card-multi.domain-blue {
    border-left-color: #3B82F6;
}

.question-card-multi.domain-orange {
    border-left-color: #F59E0B;
}

.question-card-multi.domain-yellow {
    border-left-color: #EAB308;
}

.question-card {
    background: var(--background);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: 0 2px 8px var(--shadow);
}

.question-card-single {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    border-left: 8px solid var(--primary);
    box-shadow: 0 4px 16px var(--shadow);
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.question-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.question-topic {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-light);
}

.topic-label {
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-separator {
    color: var(--text-light);
    font-weight: 300;
}

.topic-skill {
    color: var(--text-dark);
    font-weight: 600;
    display: inline-block;
}

.topic-prefix {
    font-weight: 700;
    margin-right: 5px;
    font-size: 14px;
    display: inline-block;
}

.question-text {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.6;
}

.question-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.option-label input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-label input[type="radio"]:checked + .option-text {
    color: var(--primary);
    font-weight: 500;
}

.option-label:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.option-text {
    flex: 1;
    font-size: 15px;
    color: var(--text-dark);
}

.assessment-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

/* Results */
.results-container {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px var(--shadow);
}

.result-id-card {
    background: linear-gradient(135deg, var(--primary), #4338CA);
    color: var(--white);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 30px;
}

.result-id-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.result-id-display {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    margin: 15px 0;
}

.save-id-message {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 10px;
}

.results-content h2 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 25px;
    text-align: center;
}

.chart-container {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 30px;
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.score-item {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.score-label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.score-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.insight-card {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border);
}

.insight-card.strength {
    border-left: 4px solid var(--secondary);
}

.insight-card.focus {
    border-left: 4px solid var(--accent);
}

.insight-icon {
    font-size: 32px;
}

.insight-content h4 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insight-content p {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.result-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

/* View Result */
.view-result-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.result-form-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 16px var(--shadow);
    max-width: 500px;
    width: 100%;
}

.result-form-card h2 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 10px;
    text-align: center;
}

.form-description {
    color: var(--text-light);
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.back-link {
    margin-top: 20px;
    text-align: center;
}

.back-link a {
    color: var(--text-light);
    text-decoration: none;
}

.back-link a:hover {
    color: var(--primary);
}

/* Admin Panel */
.admin-panel {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 16px var(--shadow);
}

.filters-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border);
}

.filters-section h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 20px;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.results-section {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 22px;
    color: var(--primary);
}

.results-table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.results-table thead {
    background: var(--background);
}

.results-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border);
    font-size: 14px;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.results-table tbody tr:hover {
    background: var(--background);
}

.results-table a {
    color: var(--primary);
    text-decoration: none;
}

.results-table a:hover {
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 16px var(--shadow);
    max-width: 400px;
    width: 100%;
}

.login-card h2 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 25px;
    text-align: center;
}

.error-message {
    background: #FEE2E2;
    color: #DC2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-footer a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
}

.login-footer a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .welcome-card,
    .result-form-card,
    .login-card {
        padding: 25px;
    }

    .assessment-container,
    .results-container,
    .admin-panel {
        padding: 20px;
    }

    .scores-grid {
        grid-template-columns: 1fr;
    }

    .insights {
        grid-template-columns: 1fr;
    }

    .filters-form {
        grid-template-columns: 1fr;
    }

    .results-table {
        font-size: 12px;
    }

    .results-table th,
    .results-table td {
        padding: 8px;
    }
}

/* Topic Progress Cards */
.topics-progress-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1024px) {
    .topics-progress-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .topics-progress-container {
        grid-template-columns: 1fr;
    }
}

.topic-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 16px var(--shadow);
    border: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

.topic-card.completed {
    border-color: var(--secondary);
    background: linear-gradient(135deg, var(--white) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.topic-card[data-color="green"] {
    border-left: 5px solid #22C55E;
}

.topic-card[data-color="blue"] {
    border-left: 5px solid #3B82F6;
}

.topic-card[data-color="orange"] {
    border-left: 5px solid #F59E0B;
}

.topic-card[data-color="yellow"] {
    border-left: 5px solid #EAB308;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.topic-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}


.topic-progress-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 15px 0;
    justify-content: center;
    align-items: center;
}

.topic-checklist-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.topic-checklist-circle:hover {
    border-color: var(--primary);
    transform: scale(1.2);
}

.topic-checklist-circle.checked {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.topic-checklist-circle.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 10px;
    font-weight: bold;
}

.topic-checkbox {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 15px;
}

.topic-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--secondary);
}

.topic-checkbox input[type="checkbox"]:checked {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.topic-card.completed .topic-checkbox input[type="checkbox"] {
    accent-color: #22C55E;
}

/* Topic Progress Cards */
.topics-progress-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.topic-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 16px var(--shadow);
    border: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

.topic-card.completed {
    border-color: var(--secondary);
    background: linear-gradient(135deg, var(--white) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.topic-card[data-color="green"] {
    border-left: 5px solid #22C55E;
}

.topic-card[data-color="blue"] {
    border-left: 5px solid #3B82F6;
}

.topic-card[data-color="orange"] {
    border-left: 5px solid #F59E0B;
}

.topic-card[data-color="yellow"] {
    border-left: 5px solid #EAB308;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.topic-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}


.topic-subskills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subskill-tag {
    font-size: 12px;
    padding: 6px 12px;
    background: var(--background);
    border-radius: 12px;
    color: var(--text-light);
    font-weight: 500;
}

/* Domain Colors */
.domain-green .topic-prefix,
.domain-green .topic-label {
    color: #22C55E;
}

.domain-blue .topic-prefix,
.domain-blue .topic-label {
    color: #3B82F6;
}

.domain-orange .topic-prefix,
.domain-orange .topic-label {
    color: #F59E0B;
}

.domain-yellow .topic-prefix,
.domain-yellow .topic-label {
    color: #EAB308;
}

.question-card-single.domain-green {
    border-left: 8px solid #22C55E;
}

.question-card-single.domain-blue {
    border-left: 8px solid #3B82F6;
}

.question-card-single.domain-orange {
    border-left: 8px solid #F59E0B;
}

.question-card-single.domain-yellow {
    border-left: 8px solid #EAB308;
}

.topic-prefix {
    font-weight: 700;
    margin-right: 5px;
    font-size: 14px;
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.popup-content h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 24px;
}

.popup-content p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.popup-content .btn {
    min-width: 200px;
    padding: 12px 30px;
    font-size: 16px;
}

/* Topic Progress Cards */
.topics-progress-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.topic-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 16px var(--shadow);
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

.topic-card.completed {
    border-color: var(--secondary);
    background: linear-gradient(135deg, var(--white) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.topic-card[data-color="green"] {
    border-left: 5px solid #22C55E;
}

.topic-card[data-color="blue"] {
    border-left: 5px solid #3B82F6;
}

.topic-card[data-color="orange"] {
    border-left: 5px solid #F59E0B;
}

.topic-card[data-color="yellow"] {
    border-left: 5px solid #EAB308;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.topic-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}


.topic-subskills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subskill-tag {
    font-size: 12px;
    padding: 6px 12px;
    background: var(--background);
    border-radius: 12px;
    color: var(--text-light);
    font-weight: 500;
}

/* Domain Colors */
.domain-green .topic-prefix,
.domain-green .topic-label {
    color: #22C55E;
}

.domain-blue .topic-prefix,
.domain-blue .topic-label {
    color: #3B82F6;
}

.domain-orange .topic-prefix,
.domain-orange .topic-label {
    color: #F59E0B;
}

.domain-yellow .topic-prefix,
.domain-yellow .topic-label {
    color: #EAB308;
}

.question-card-single.domain-green {
    border-left: 8px solid #22C55E;
}

.question-card-single.domain-blue {
    border-left: 8px solid #3B82F6;
}

.question-card-single.domain-orange {
    border-left: 8px solid #F59E0B;
}

.question-card-single.domain-yellow {
    border-left: 8px solid #EAB308;
}

.topic-prefix {
    font-weight: 700;
    margin-right: 5px;
    font-size: 14px;
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.popup-content h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 24px;
}

.popup-content p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.popup-content .btn {
    min-width: 200px;
    padding: 12px 30px;
    font-size: 16px;
}

