/* Main Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
}

/* SEO Header Styles cho OnThiGPLX */
.seo-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.3);
}

.seo-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.seo-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto 20px auto;
    opacity: 0.95;
}

.seo-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.keyword-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.keyword-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .seo-header h1 {
        font-size: 1.8rem;
    }
    
    .seo-description {
        font-size: 1rem;
    }
    
    .seo-header {
        padding: 30px 15px;
    }
    
    .keyword-tag {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Header */
.app-header {
    background: #1e3a8a;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #3b82f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Feature Cards Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 30px 0;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: white;
    font-weight: bold;
}

.feature-icon.blue { background: #3b82f6; }
.feature-icon.green { background: #10b981; }
.feature-icon.purple { background: #8b5cf6; }
.feature-icon.orange { background: #f59e0b; }
.feature-icon.red { background: #ef4444; }
.feature-icon.teal { background: #14b8a6; }
.feature-icon.yellow { background: #eab308; }

.feature-card h3 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.95em;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

/* Loading Screen */
#loading-screen {
    background: #1e3a8a;
    color: white;
    text-align: center;
}

.loader h1 {
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* License Selection */
#license-selection-screen {
    background: #f5f7fa;
    padding: 30px 0;
    min-height: 100vh;
}

#license-selection-screen h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #1e293b;
    font-weight: 700;
}

/* License Tabs */
.license-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 20px;
}

.license-tab {
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 20px 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.license-tab:hover {
    background: #f8fafc;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.license-tab.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.tab-icon {
    font-size: 1.5em;
    margin-bottom: 8px;
}

.tab-title {
    font-weight: 600;
    font-size: 1.1em;
}

/* License Content */
.license-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.license-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.license-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.license-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 3;
}

.license-item:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.license-code {
    background: #3b82f6;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.license-info {
    flex: 1;
}

.license-info h3 {
    font-size: 1.3em;
    margin-bottom: 8px;
    color: #1e293b;
    font-weight: 600;
}

.license-info p {
    font-size: 1em;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #64748b;
}

.license-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.license-details span {
    font-size: 0.9em;
    opacity: 0.8;
    color: #E8F4FD;
}

/* Old license grid styles - keep for compatibility but hide */
.license-grid {
    display: none;
}

/* Exam Type Selection */
#exam-type-selection-screen {
    background: #f5f7fa;
    padding: 30px 0;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

#exam-type-selection-screen h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #1e293b;
    font-weight: 700;
}

.exam-type-info {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 40px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #1e293b;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

/* Back Button */
.back-btn {
    background: #64748b !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1em !important;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block !important;
    margin: 30px auto 0;
    position: relative !important;
    z-index: 12 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.back-btn:hover {
    background: #475569 !important;
    transform: translateY(-1px);
}

/* Navigation buttons container */
.navigation-buttons {
    display: flex !important;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    position: relative !important;
    z-index: 10 !important;
    clear: both !important;
    padding: 20px 0;
    background: transparent;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 60px;
}

.navigation-buttons .nav-btn {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    position: relative !important;
    z-index: 11 !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.navigation-buttons .nav-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085) !important;
    transform: translateY(-2px);
}

/* Exam Type Selection specific styles với !important để override */
#exam-type-selection-screen .license-content {
    position: relative !important;
    z-index: 1 !important;
    min-height: 300px !important;
    margin-bottom: 80px !important;
    overflow: visible !important;
    clear: both !important;
}

#exam-type-selection-screen .license-list {
    margin-bottom: 60px !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 2 !important;
}

#exam-type-selection-screen .license-item {
    min-height: 120px !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 3 !important;
    margin-bottom: 20px !important;
}

#exam-type-selection-screen .container {
    padding-bottom: 120px !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Force navigation buttons to be always visible */
#exam-type-selection-screen .navigation-buttons {
    position: relative !important;
    z-index: 100 !important;
    background: #f5f7fa !important;
    padding: 30px 20px !important;
    margin-top: 40px !important;
    clear: both !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#exam-type-selection-screen .back-btn,
#exam-type-selection-screen .nav-btn {
    position: relative !important;
    z-index: 101 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
}

/* Home Screen */
#home-screen {
    background: #f5f7fa;
    align-items: flex-start;
    padding-top: 0;
}

/* Home Header */
.home-header {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.current-settings {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px;
}

.setting-label {
    font-size: 1em;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    min-width: 85px;
}

.setting-value {
    font-size: 1.2em;
    color: #1e293b;
    font-weight: 700;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.settings-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.settings-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.settings-icon {
    font-size: 1.1em;
}

.settings-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.settings-btn.danger {
    background: #ef4444;
}

.settings-btn.danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.settings-icon {
    font-size: 1.1em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.feature-card.important {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
}

.feature-card button {
    background: none;
    border: none;
    padding: 30px 25px;
    width: 100%;
    text-align: center;
    cursor: pointer;
    color: inherit;
}

.feature-card .icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.95em;
    opacity: 0.8;
    line-height: 1.4;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    margin: auto;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Enhanced modal centering */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    margin: auto;
    position: relative;
    transform: translateX(0) translateY(0);
}

.modal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    line-height: 1;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    text-align: left;
}

.modal-body p {
    margin-bottom: 20px;
    color: #666;
    text-align: center;
}

.scoring-mode-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scoring-option {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.scoring-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.option-icon {
    font-size: 24px;
    background: #667eea;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
}

.option-content h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.option-content p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9em;
    text-align: left;
}

.option-pros {
    font-size: 0.85em;
    color: #28a745;
    line-height: 1.4;
}

/* Legacy modal button styles for backward compatibility */
.modal-content button {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-content button:hover {
    background: #5a6fd8;
}

.modal-content button:last-child {
    background: #ccc;
    color: #333;
}

.modal-content button:last-child:hover {
    background: #bbb;
}

/* Responsive modal design */
@media (max-width: 768px) {
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        margin: 0;
        padding: 20px;
        max-width: none;
        width: 100%;
        max-height: 85vh;
    }
    
    .scoring-mode-options {
        gap: 12px;
    }
    
    .scoring-option {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .option-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        align-self: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-buttons {
        justify-content: center;
    }
    
    .home-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .current-settings {
        justify-content: center;
        gap: 15px;
        flex-direction: column;
    }
    
    .setting-item {
        justify-content: center;
        min-width: auto;
        gap: 8px;
    }
    
    .setting-label {
        min-width: auto;
        font-size: 0.9em;
    }
    
    .setting-value {
        min-width: 80px;
        font-size: 1.1em;
    }
    
    .settings-actions {
        justify-content: center;
        gap: 10px;
        flex-direction: column;
    }
    
    .settings-btn {
        justify-content: center;
        min-height: 48px;
        font-size: 0.9em;
    }
    
    .settings-btn {
        flex: 1;
        min-width: 140px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px 0;
    }
    
    .license-tabs {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .license-tab {
        min-width: auto;
    }
    
    .license-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .license-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .license-code {
        align-self: center;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2em;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
    
    .nav-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .features-grid {
        gap: 12px;
    }
    
    .feature-card h3 {
        font-size: 1.1em;
    }
    
    .feature-card p {
        font-size: 0.85em;
    }
    
    #license-selection-screen h1 {
        font-size: 2em;
    }
}
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .home-header {
        flex-direction: column;
        text-align: center;
    }
    
    .current-config {
        justify-content: center;
        margin-top: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .license-list {
        grid-template-columns: 1fr;
    }
    
    .license-tabs {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .license-tab {
        padding: 15px 20px;
        min-width: auto;
    }
    
    .tab-icon {
        font-size: 1.5em;
        margin-bottom: 5px;
    }
    
    .tab-title {
        font-size: 1em;
    }
    
    .license-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .license-code {
        align-self: center;
        margin-bottom: 15px;
    }
    
    .license-info {
        text-align: center;
    }
    
    .license-details {
        align-items: center;
    }
    
    .exam-type-buttons {
        grid-template-columns: 1fr;
    }
    
    /* Mobile exam type selection fixes */
    #exam-type-selection-screen .navigation-buttons {
        padding: 30px 20px;
        margin-top: 40px;
    }
    
    #exam-type-selection-screen .license-content {
        margin-bottom: 80px;
    }
    
    .navigation-buttons .nav-btn,
    .navigation-buttons .back-btn {
        width: 100%;
        margin: 5px 0;
        padding: 15px 20px;
        font-size: 16px;
    }
}

/* Instant Feedback Styles for Instant Scoring Mode */
.instant-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    animation: fadeInUp 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instant-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.instant-feedback.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.instant-feedback.wrong {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.instant-feedback.critical {
    border-width: 3px;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}

.feedback-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Feedback Modal Styles */
#feedback-modal .modal-content {
    max-width: 600px;
    width: 95%;
}

.feedback-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.star {
    cursor: pointer;
    font-size: 24px;
    transition: all 0.2s ease;
    opacity: 0.3;
}

.star:hover,
.star.selected {
    opacity: 1;
    transform: scale(1.1);
}

.rating-text {
    margin-left: 10px;
    font-size: 14px;
    color: #6b7280;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.feedback-success {
    text-align: center;
    padding: 40px 20px;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.success-icon {
    font-size: 48px;
    color: #10b981;
}

.feedback-id {
    background: #f3f4f6;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 16px;
}

.feedback-icon {
    font-size: 20px;
}

.critical-badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: auto;
}

.feedback-answer {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    font-weight: bold;
}

.feedback-explanation {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    font-style: italic;
}

.submit-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.btn-submit, .btn-review {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-submit {
    background: #28a745;
    color: white;
}

.btn-review {
    background: #17a2b8;
    color: white;
}

.btn-submit:hover, .btn-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Option States for Instant Scoring */
.option {
    position: relative;
    transition: all 0.3s ease;
}

.option.correct-answer {
    background: #d4edda !important;
    border: 2px solid #28a745 !important;
    color: #155724 !important;
}

.option.wrong-answer {
    background: #f8d7da !important;
    border: 2px solid #dc3545 !important;
    color: #721c24 !important;
}

.option.user-selected {
    border-width: 3px !important;
    font-weight: bold !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.option.correct-answer::after {
    content: "✅";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    animation: bounceIn 0.5s ease;
}

.option.wrong-answer::after {
    content: "❌";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    animation: shakeX 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: translateY(-50%) scale(0.3); opacity: 0; }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

@keyframes shakeX {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateY(-50%) translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateY(-50%) translateX(5px); }
}

/* Disabled state for options after selection in instant mode */
.option.disabled {
    pointer-events: none !important;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .submit-actions {
        flex-direction: column;
    }
    
    .btn-submit, .btn-review {
        width: 100%;
    }
    
    .instant-feedback {
        margin: 15px 0;
        padding: 12px;
    }
    
    .feedback-header {
        font-size: 14px;
    }
}

/* Auto-advance toggle styles */
.auto-advance-toggle {
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.toggle-text {
    color: #495057;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-status {
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

/* Mobile responsive for toggle */
@media (max-width: 768px) {
    .toggle-label {
        font-size: 13px;
    }
    
    .toggle-switch {
        width: 40px;
        height: 20px;
    }
    
    .toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(20px);
    }
}

/* Road Test Modal Styles */
#road-test-modal .modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.road-test-content .modal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.road-test-content .modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white !important;
}

#road-test-modal .close-modal {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

#road-test-modal .close-modal:hover {
    color: white;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    opacity: 0.7;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
    line-height: 1;
}

.close-modal:hover {
    opacity: 1;
    color: #333;
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Close button for memory tips modal (white background) */
#memory-tips-modal .close-modal {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

#memory-tips-modal .close-modal:hover {
    color: white;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Fixed Exam Sets Modal Styles */
#fixedExamSetsModal .modal-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
}

#fixedExamSetsModal .modal-header h3 {
    color: white !important;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

#fixedExamSetsModal .close-modal {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

#fixedExamSetsModal .close-modal:hover {
    color: white;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Category Selection Modal Styles */
#category-selection-modal .modal-header {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
}

#category-selection-modal .modal-header h2 {
    color: white !important;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

#category-selection-modal .close-modal {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

#category-selection-modal .close-modal:hover {
    color: white;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.road-test-sections {
    padding: 20px;
}

.road-section {
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #d1d5db;
    transition: background-color 0.3s ease;
}

.section-header:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.section-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1f2937;
}

.toggle-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
    color: #6b7280;
}

.section-header.active .toggle-icon {
    transform: rotate(180deg);
}

.section-content {
    padding: 20px;
    display: none;
    background: white;
}

.section-content.active {
    display: block;
}

.section-content h4 {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #3b82f6;
}

.section-content h4:first-child {
    margin-top: 0;
}

.section-content ul {
    margin: 10px 0 0 20px;
    line-height: 1.6;
}

.section-content li {
    margin-bottom: 8px;
    color: #374151;
}

/* Different colors for different section types */
.road-section:nth-child(1) .section-header {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.road-section:nth-child(2) .section-header {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.road-section:nth-child(3) .section-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.road-section:nth-child(4) .section-header {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

/* Mobile responsiveness for road test modal */
@media (max-width: 768px) {
    #road-test-modal .modal-content {
        max-width: 95%;
        margin: 10px auto;
        max-height: 95vh;
    }
    
    .road-test-content .modal-header {
        padding: 15px;
    }
    
    .road-test-content .modal-header h3 {
        font-size: 1.3rem;
        color: white !important;
    }
    
    .road-test-sections {
        padding: 15px;
    }
    
    .section-header {
        padding: 12px 15px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .section-content {
        padding: 15px;
    }
    
    .section-content ul {
        margin-left: 15px;
    }
}

/* Situation Handling Modal Styles */
#situation-handling-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

#situation-handling-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

#situation-handling-modal .modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
}

.situation-section {
    border-bottom: 1px solid #e5e7eb;
}

.situation-section:last-child {
    border-bottom: none;
}

.situation-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.situation-header:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.situation-header.active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.situation-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.toggle-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    color: #64748b;
}

.situation-header.active .toggle-icon {
    color: #1e40af;
    transform: rotate(180deg);
}

.situation-content {
    display: none;
    padding: 0;
    background: white;
    transition: all 0.3s ease;
}

.situation-content.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.content-block {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.content-block:last-child {
    border-bottom: none;
}

.content-block h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-block ul {
    margin-left: 20px;
    margin-top: 8px;
}

.content-block li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #475569;
}

.penalty-list li {
    color: #dc2626;
    font-weight: 500;
}

.penalty-list li:before {
    content: "⚠️ ";
    margin-right: 6px;
}

/* Different colors for different content blocks */
.content-block:nth-child(1) {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.content-block:nth-child(2) {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.content-block:nth-child(3) {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* Animation for content reveal */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

/* Mobile responsiveness for situation handling modal */
@media (max-width: 768px) {
    #situation-handling-modal .modal-content {
        max-width: 95%;
        margin: 10px auto;
        max-height: 90vh;
    }
    
    .situation-header {
        padding: 12px 16px;
    }
    
    .situation-header h3 {
        font-size: 1rem;
    }
    
    .content-block {
        padding: 16px;
    }
    
    .content-block h4 {
        font-size: 1rem;
    }
    
    .content-block ul {
        margin-left: 16px;
    }
}

/* Critical Questions Badge */
.critical-badge {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    animation: criticalPulse 2s infinite;
}

@keyframes criticalPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5);
    }
}

/* Critical questions styling for question navigator */
.critical-question {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border: 2px solid #dc2626 !important;
    color: #dc2626 !important;
    font-weight: 600 !important;
}

.critical-question.answered {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
    color: white !important;
}

.critical-question.correct {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #10b981 !important;
    color: white !important;
}

.critical-question.incorrect {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    border-color: #dc2626 !important;
    color: white !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Critical question warning */
.critical-warning {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    color: #dc2626;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: criticalBlink 3s infinite;
}

@keyframes criticalBlink {
    0%, 80%, 100% {
        background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
        border-color: #dc2626;
    }
    40% {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        border-color: #ef4444;
    }
}

/* Memory Tips Modal Styles */
#memory-tips-modal .modal-content {
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#memory-tips-modal .modal-header {
    position: relative;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#memory-tips-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

#memory-tips-modal .modal-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
}

.memory-section {
    border-bottom: 1px solid #e5e7eb;
}

.memory-header {
    background: #f9fafb;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.memory-header:hover {
    background: #f3f4f6;
    border-left-color: #8b5cf6;
}

.memory-header.active {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-left-color: #8b5cf6;
}

.memory-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.memory-header.active h3 {
    color: #7c3aed;
}

.memory-header .toggle-icon {
    font-size: 1.2rem;
    font-weight: bold;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.memory-header.active .toggle-icon {
    color: #7c3aed;
    transform: rotate(180deg);
}

.memory-content {
    display: none;
    padding: 20px;
    background: white;
    animation: fadeIn 0.3s ease;
}

.memory-content.active {
    display: block;
}

.memory-content .content-block {
    line-height: 1.6;
}

.memory-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.memory-content li {
    margin: 8px 0;
    color: #374151;
}

.memory-content strong {
    color: #7c3aed;
    font-weight: 600;
}

.memory-content p {
    margin: 10px 0;
    color: #374151;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive for memory tips modal */
@media (max-width: 768px) {
    #memory-tips-modal .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    #memory-tips-modal .modal-header {
        padding: 15px;
    }
    
    #memory-tips-modal .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .memory-header {
        padding: 12px 15px;
    }
    
    .memory-header h3 {
        font-size: 1rem;
    }
    
    .memory-content {
        padding: 15px;
    }
}

/* Category Selection Modal Styles */
#category-selection-modal .modal-content {
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
}

#category-selection-modal .modal-header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#category-selection-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

#category-selection-modal .modal-body {
    padding: 20px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.category-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-card:hover {
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
}

.category-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.3;
}

.category-stats {
    background: #f3f4f6;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #374151;
    font-weight: 500;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.category-desc {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

.license-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 8px;
    color: #1e40af;
    font-weight: 600;
}

/* Practice Badge Styles */
.practice-badge {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
    animation: practiceGlow 2s infinite;
}

@keyframes practiceGlow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(5, 150, 105, 0.5);
    }
}

/* Responsive for category modal */
@media (max-width: 768px) {
    #category-selection-modal .modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    #category-selection-modal .modal-header {
        padding: 15px;
    }
    
    #category-selection-modal .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-card {
        padding: 15px;
    }
    
    .category-name {
        font-size: 0.95rem;
    }
    
    .category-desc {
        font-size: 0.85rem;
    }
}

/* AdSense Ad Containers */
.ad-container {
    margin: 20px auto;
    text-align: center;
    max-width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ad-container.feature-ad {
    margin: 30px auto;
    max-width: 700px;
}

.ad-container ins {
    display: block !important;
    margin: 0 auto;
}

/* Ad Styles for Different Screens */
@media (max-width: 768px) {
    .ad-container {
        margin: 15px auto;
        padding: 8px;
    }
    
    .ad-container.feature-ad {
        margin: 20px auto;
    }
}

/* Ad Loading State */
.ad-container.loading {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.ad-container.loading:after {
    content: "Đang tải quảng cáo...";
}
