/* ================================================
   VIOEDU QUESTION BANK - CSS STYLES
   Thiết kế cho học sinh lớp 1
   ================================================ */

/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Màu sắc tươi sáng cho trẻ em */
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;

    --secondary-color: #2196F3;
    --secondary-dark: #1976D2;
    --secondary-light: #BBDEFB;

    --accent-color: #FF9800;
    --accent-dark: #F57C00;
    --accent-light: #FFE0B2;

    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FF9800;

    --background-color: #F5F5F5;
    --card-background: #FFFFFF;
    --text-color: #333333;
    --text-light: #757575;

    /* Font sizes lớn, rõ ràng */
    --font-size-xs: 14px;
    --font-size-sm: 16px;
    --font-size-md: 18px;
    --font-size-lg: 22px;
    --font-size-xl: 28px;
    --font-size-xxl: 36px;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
}

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    font-size: var(--font-size-md);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* ================================================
   SCREENS
   ================================================ */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* ================================================
   HOME SCREEN
   ================================================ */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    font-size: var(--font-size-xxl);
}

.logo h1 {
    font-size: var(--font-size-xl);
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.logo p {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin: 0;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background-color: var(--card-background);
    margin: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    min-width: 100px;
}

.stat-icon {
    font-size: var(--font-size-xl);
}

.stat-value {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

/* Main Content */
.main-content {
    padding: var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
}

.main-content h2 {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-sm);
    border-left: 4px solid var(--primary-color);
}

/* Subject Filters */
.subject-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 15px 30px;
    font-size: 20px;
    font-weight: 800;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.filter-btn.math {
    background: #4CAF50;
    color: white;
}

.filter-btn.tv {
    background: #E91E63;
    color: white;
}

.filter-btn.mathen {
    background: #FF5722;
    color: white;
}

/* NEW STYLE */

.filter-btn:hover {
    transform: scale(1.05);
}

.filter-btn.active {
    outline: 4px solid #FFEB3B;
}

/* Skill Section */
.skill-section {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: var(--radius-lg);
}

.skill-section h2 {
    color: #1976D2;
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-sm);
    border-left: 4px solid #1976D2;
}

.skill-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-sm);
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #9C27B0;
}

.skill-item:hover {
    background: #f3e5f5;
    transform: translateX(5px);
    border-left-color: #7B1FA2;
}

.skill-item.start-btn {
    background: linear-gradient(135deg, #1976D2 0%, #42A5F5 100%);
    color: white;
    border-left: none;
    font-weight: 700;
}

.skill-item.start-btn:hover {
    background: linear-gradient(135deg, #1565C0 0%, #1976D2 100%);
    transform: scale(1.02);
}

.skill-count {
    background: #9C27B0;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.skill-item.start-btn .skill-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Topic List */
.topic-section {
    margin-bottom: var(--spacing-xl);
}

.topic-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-sm);
}

.topic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-background);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.topic-item:hover {
    background: var(--primary-light);
    transform: translateX(5px);
}

.topic-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.topic-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 700;
}

/* Quick Start Button */
.quick-start {
    text-align: center;
    margin: var(--spacing-xl) 0;
}

.btn-start-random {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border: none;
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-size-lg);
    font-weight: 700;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.4);
}

.btn-start-random:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

/* ================================================
   QUIZ SCREEN
   ================================================ */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-background);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: var(--font-size-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: background 0.3s ease;
    border: 1px solid #ddd;
}

.btn-back:hover {
    background: var(--background-color);
}

.quiz-progress {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary-color);
}

.quiz-score {
    font-size: var(--font-size-md);
    font-weight: 600;
    background: var(--success-color);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
}

/* Quiz Content */
.quiz-content {
    padding: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.question-card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.question-number {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
}

.question-images {
    margin-bottom: var(--spacing-lg);
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.question-images img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--background-color);
    border-radius: var(--radius-md);
}

.question-text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.option-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--card-background);
    border: 3px solid #E0E0E0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: var(--font-size-md);
}

.option-btn:hover:not(.disabled) {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.option-btn.correct {
    border-color: var(--success-color);
    background: #E8F5E9;
}

.option-btn.wrong {
    border-color: var(--error-color);
    background: #FFEBEE;
}

.option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 700;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
}

/* Feedback */
.feedback-container {
    margin-top: 0;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: var(--font-size-lg);
    font-weight: 700;
    width: 100%;
    box-sizing: border-box;
}

.feedback-container.correct {
    background: #E8F5E9;
    color: var(--success-color);
}

.feedback-container.wrong {
    background: #FFEBEE;
    color: var(--error-color);
}

.feedback-container img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* Quiz Footer */
.quiz-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--card-background);
    position: sticky;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 90;
}

.btn-prev,
.btn-next,
.btn-submit {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-md);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.btn-prev {
    background: var(--text-light);
    color: white;
}

.btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit {
    background: var(--primary-color);
    color: white;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.btn-next {
    background: var(--secondary-color);
    color: white;
}

.btn-next:hover {
    background: var(--secondary-dark);
}

/* ================================================
   RESULT SCREEN
   ================================================ */
#result-screen {
    display: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

#result-screen.active {
    display: flex;
}

.result-container {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    max-width: 500px;
    width: 90%;
    margin: var(--spacing-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.result-header {
    margin-bottom: var(--spacing-xl);
}

.result-header .result-icon {
    font-size: 80px;
    margin-bottom: var(--spacing-md);
}

.result-header h2 {
    font-size: var(--font-size-xl);
    color: var(--primary-color);
}

.result-stats {
    margin-bottom: var(--spacing-xl);
}

.result-score {
    font-size: var(--font-size-xxl);
    font-weight: 800;
    color: var(--primary-color);
}

.score-max {
    color: var(--text-light);
    font-weight: 600;
}

.result-percentage {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--accent-color);
    margin-top: var(--spacing-sm);
}

.result-details {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.result-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-md);
}

.result-item.correct .result-icon {
    color: var(--success-color);
}

.result-item.wrong .result-icon {
    color: var(--error-color);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn-retry,
.btn-home {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-md);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry {
    background: var(--primary-color);
    color: white;
}

.btn-retry:hover {
    background: var(--primary-dark);
}

.btn-home {
    background: var(--text-light);
    color: white;
}

.btn-home:hover {
    background: var(--text-color);
}

/* ================================================
   LOADING OVERLAY
   ================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--primary-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-lg);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    font-size: var(--font-size-lg);
    color: var(--text-color);
    font-weight: 600;
}

/* SORTABLE LIST STYLES (Type 5) */
#sortable-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sort-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    user-select: none;
    font-size: 18px;
    font-weight: 600;
    color: #444;
}

.sort-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.15);
}

.sort-item:active {
    cursor: grabbing;
}

.sort-item.dragging {
    opacity: 0.5;
    background: #e3f2fd;
    border: 2px dashed var(--secondary-color);
}

.sort-item::before {
    content: "⠿";
    /* Grip dots icon */
    color: #bdbdbd;
    font-size: 20px;
    cursor: grab;
}

/* Auto Numbering Counter */
#sortable-list {
    counter-reset: sort-counter;
}

/* MATCHING STYLES (Type 30) */
.match-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8fbfd;
    border-radius: 15px;
}

.col-left,
.col-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
    /* Ensure above SVG line */
}

.match-item {
    background: white;
    border: 2px solid #b3e5fc;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    color: #0277bd;
    transition: 0.2s;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 3px 0 #b3e5fc;
}

.match-item:hover {
    background: #e1f5fe;
    transform: translateY(-2px);
}

.match-item.selected {
    background: #0288d1;
    color: white;
    border-color: #01579b;
    box-shadow: 0 3px 0 #01579b;
}

/* HIGHLIGHT STYLES (Type 28) */
.highlight-area {
    line-height: 2.2;
    font-size: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eee;
}

.word-span {
    padding: 2px 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 2px solid transparent;
}

.word-span:hover {
    background: #f5f5f5;
    border-bottom-color: #ccc;
}

.word-span.highlighted {
    background: #fff9c4;
    /* Yellow highlight */
    border-bottom: 2px solid #fbc02d;
    font-weight: bold;
    color: #f57f17;
}

/* GAP FILL STYLES */
.gap-input {
    border: none;
    border-bottom: 2px solid #aaa;
    width: 100px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #1a73e8;
    background: transparent;
    outline: none;
    transition: 0.3s;
}

.gap-input:focus {
    border-bottom-color: #1a73e8;
    width: 120px;
}

.gap-select {
    padding: 5px 10px;
    border-radius: 6px;
    border: 2px solid #aaa;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    color: #444;
    cursor: pointer;
    background: white;
}

.gap-select:focus {
    border-color: #1a73e8;
}

/* Custom Dropdown for HTML Content (Type 7) */
.custom-dropdown {
    display: inline-block;
    position: relative;
    min-width: 60px;
    vertical-align: middle;
    margin: 0 5px;
}

.custom-dropdown-selected {
    padding: 5px 25px 5px 10px;
    border: 2px solid #1a73e8;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    position: relative;
    white-space: nowrap;
}

.custom-dropdown-selected::after {
    content: "▼";
    position: absolute;
    right: 10px;
    font-size: 10px;
    color: #1a73e8;
}

.custom-dropdown.open .custom-dropdown-selected::after {
    content: "▲";
}

.custom-dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 80px;
    background: white;
    border: 2px solid #1a73e8;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-dropdown.open .custom-dropdown-options {
    display: block;
}

.custom-option {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: #e3f2fd;
}

.custom-option p {
    margin: 0;
}

.custom-option .math-tex,
.custom-option span {
    font-weight: bold;
}

/* ================================================
   SKILL SELECT MODAL
   ================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.skill-select-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.modal-header-bar h2 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    border: none;
    padding: 0;
    color: white;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.modal-subtitle {
    padding: 12px 25px;
    margin: 0;
    font-size: 14px;
    color: #666;
    background: #f0f4f8;
    border-bottom: 1px solid #e0e0e0;
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.modal-ctrl-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-ctrl-btn:hover {
    background: #e3f2fd;
    border-color: var(--secondary-color);
}

.modal-counter {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 20px;
}

.modal-counter.at-limit {
    color: #E91E63;
    background: #FCE4EC;
}

.skill-select-list {
    overflow-y: auto;
    padding: 15px 25px;
    flex: 1;
    min-height: 200px;
    max-height: 50vh;
}

.skill-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.skill-select-item:hover:not(.disabled) {
    border-color: var(--secondary-color);
    background: #f0f8ff;
}

.skill-select-item.selected {
    border-color: var(--primary-color);
    background: #E8F5E9;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.skill-select-item.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #fafafa;
}

.skill-select-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.skill-select-item.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.skill-select-name {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.skill-select-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.skill-select-count.empty {
    background: #bdbdbd;
}

.modal-footer-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 25px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.modal-btn-cancel {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid #ccc;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.modal-btn-cancel:hover {
    background: #f5f5f5;
    border-color: #999;
}

.modal-btn-start {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.modal-btn-start:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .stats-bar {
        flex-direction: row;
        justify-content: space-around;
    }

    .subject-cards {
        grid-template-columns: 1fr;
    }

    .round-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .topic-list {
        grid-template-columns: 1fr;
    }

    .quiz-footer {
        flex-wrap: wrap;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        flex: 1;
        min-width: 120px;
    }

    .skill-select-modal-content {
        max-height: 90vh;
        border-radius: 16px;
    }

    .modal-header-bar h2 {
        font-size: 17px;
    }

    .modal-footer-bar {
        flex-direction: column;
    }

    .modal-btn-cancel,
    .modal-btn-start {
        width: 100%;
        text-align: center;
    }
}