/**
 * Custom Exam System - Frontend Styles - ENHANCED VERSION
 * Version: 2.2
 */

/* Root Variables */
:root {
    --ces-primary: #4F46E5;
    --ces-primary-dark: #4338CA;
    --ces-primary-light: #6366F1;
    --ces-success: #10B981;
    --ces-success-dark: #059669;
    --ces-error: #EF4444;
    --ces-error-dark: #DC2626;
    --ces-warning: #F59E0B;
    --ces-warning-dark: #D97706;
    --ces-text: #1F2937;
    --ces-text-light: #6B7280;
    --ces-text-lighter: #9CA3AF;
    --ces-border: #E5E7EB;
    --ces-border-light: #F3F4F6;
    --ces-bg: #F9FAFB;
    --ces-white: #FFFFFF;
    --ces-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ces-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --ces-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Container */
.ces-exam-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    direction: ltr;
}

/* ============================================
   ENHANCED HEADER
   ============================================ */
.ces-exam-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    padding: 25px 30px;
    margin: 0 -20px 30px;
    color: var(--ces-white);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border-bottom: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 0 20px 20px;
}

.ces-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.ces-exam-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ces-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ces-info-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.ces-info-item svg {
    flex-shrink: 0;
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.ces-info-item > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ces-info-label {
    font-size: 11px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ces-info-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Enhanced Timer */
.ces-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 24px;
    font-weight: 800;
    backdrop-filter: blur(10px);
    min-width: 150px;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.ces-timer-icon {
    animation: pulse 2s infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.ces-timer-display {
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Enhanced Progress Bar */
.ces-progress-container {
    margin-top: 20px;
    transition: all 0.3s ease;
}

.ces-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ces-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #34D399, #6EE7B7);
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 0%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
}

.ces-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ces-progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.95;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Sticky State - More Compact */
.ces-exam-header.ces-sticky {
    padding: 15px 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
}

.ces-exam-header.ces-sticky .ces-info-item {
    padding: 10px 16px;
}

.ces-exam-header.ces-sticky .ces-info-label {
    font-size: 10px;
}

.ces-exam-header.ces-sticky .ces-info-value {
    font-size: 18px;
}

.ces-exam-header.ces-sticky .ces-timer {
    padding: 10px 20px;
    font-size: 20px;
}

.ces-exam-header.ces-sticky .ces-progress-container {
    margin-top: 15px;
}

.ces-exam-header.ces-sticky .ces-progress-bar {
    height: 8px;
}

.ces-exam-header.ces-sticky .ces-progress-text {
    font-size: 13px;
    margin-top: 8px;
}

/* ============================================
   ENHANCED QUESTION CARDS
   ============================================ */
.ces-question-card {
    background: var(--ces-white);
    border: 2px solid var(--ces-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--ces-shadow);
    position: relative;
    overflow: hidden;
}

.ces-question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--ces-primary), var(--ces-primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ces-question-card:hover {
    border-color: var(--ces-primary);
    box-shadow: var(--ces-shadow-lg);
    transform: translateY(-3px);
}

.ces-question-card:hover::before {
    opacity: 1;
}

.ces-question-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--ces-primary), var(--ces-primary-dark));
    color: var(--ces-white);
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.ces-question-card:hover .ces-question-number {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.ces-question-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--ces-text);
    margin: 0 0 25px 0;
    line-height: 1.6;
}

/* ============================================
   ENHANCED ANSWER OPTIONS
   ============================================ */
.ces-answers-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ces-answer-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 18px 22px;
    background: var(--ces-bg);
    border: 2px solid var(--ces-border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    overflow: hidden;
}

.ces-answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ces-answer-option:hover {
    background: #F3F4F6;
    border-color: var(--ces-primary);
    transform: translateX(5px);
}

.ces-answer-option:hover::before {
    opacity: 1;
}

.ces-answer-option input[type="radio"],
.ces-answer-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.ces-answer-text {
    flex: 1;
    padding-left: 40px;
    font-size: 16px;
    color: var(--ces-text);
    line-height: 1.6;
    font-weight: 500;
    z-index: 1;
}

/* Custom Radio Button */
.ces-radio-custom {
    position: absolute;
    left: 22px;
    width: 24px;
    height: 24px;
    border: 3px solid var(--ces-border);
    border-radius: 50%;
    background: var(--ces-white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.ces-answer-option input[type="radio"]:checked ~ .ces-radio-custom {
    border-color: var(--ces-primary);
    background: var(--ces-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    transform: scale(1.1);
}

.ces-answer-option input[type="radio"]:checked ~ .ces-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ces-white);
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Multiple Choice Notice */
.ces-multiple-choice-notice {
    display: inline-block;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 12px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Custom Checkbox */
.ces-checkbox-custom {
    position: absolute;
    left: 22px;
    width: 24px;
    height: 24px;
    border: 1px solid var(--ces-border);
    border-radius: 7px;
    background: var(--ces-white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
}

.ces-answer-option input[type="checkbox"]:checked ~ .ces-checkbox-custom {
    border-color: var(--ces-primary);
    background: var(--ces-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.ces-answer-option input[type="checkbox"]:checked ~ .ces-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 8px;
    width: 7px;
    height: 13px;
    border: solid var(--ces-white);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    animation: checkPop 0.3s ease;
}

.ces-answer-option input[type="radio"]:checked ~ .ces-answer-text,
.ces-answer-option input[type="checkbox"]:checked ~ .ces-answer-text {
    color: var(--ces-primary);
    font-weight: 700;
}

.ces-answer-option input[type="radio"]:checked,
.ces-answer-option input[type="checkbox"]:checked {
    & ~ * {
        z-index: 2;
    }
}

/* Selected answer styling */
.ces-answer-option:has(input:checked) {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(79, 70, 229, 0.03));
    border-color: var(--ces-primary);
    border-width: 3px;
}

/* ============================================
   SUBMIT SECTION
   ============================================ */
.ces-submit-section {
    margin-top: 40px;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(67, 56, 202, 0.03));
    border-radius: 20px;
    border: 2px dashed var(--ces-primary);
}

.ces-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--ces-primary), var(--ces-primary-dark));
    color: var(--ces-white);
    border: none;
    padding: 18px 45px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    position: relative;
    overflow: hidden;
}

.ces-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.ces-submit-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.5);
}

.ces-submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

.ces-submit-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.ces-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ces-btn-icon {
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.ces-submit-btn:hover:not(:disabled) .ces-btn-icon {
    transform: translateX(3px);
}

/* ============================================
   RESULT MODAL
   ============================================ */
.ces-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ces-result-content {
    background: var(--ces-white);
    border-radius: 30px;
    padding: 50px;
    max-width: 550px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; /* ADD THIS */

}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ces-result-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.15); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.ces-result-icon.success {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 0 0 15px rgba(16, 185, 129, 0.1);
}

.ces-result-icon.success::after {
    content: '✓';
    color: var(--ces-white);
}

.ces-result-icon.failed {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    box-shadow: 0 0 0 15px rgba(239, 68, 68, 0.1);
}

.ces-result-icon.failed::after {
    content: '✕';
    color: var(--ces-white);
}

.ces-result-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: var(--ces-text);
}

.ces-result-score {
    font-size: 56px;
    font-weight: 800;
    margin: 25px 0;
    background: linear-gradient(135deg, var(--ces-primary), var(--ces-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(79, 70, 229, 0.2);
}

.ces-result-message {
    font-size: 17px;
    color: var(--ces-text-light);
    margin-bottom: 35px;
    line-height: 1.7;
}

.ces-result-message p {
    margin: 12px 0;
}

.ces-result-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.ces-result-close-btn:hover {
    background: #E5E7EB;
    transform: rotate(90deg);
}

.ces-result-close-btn svg {
    color: #6B7280;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.ces-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(8px);
}

.ces-loader {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--ces-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ces-loading-overlay p {
    color: var(--ces-white);
    font-size: 19px;
    font-weight: 700;
    margin-top: 25px;
    animation: pulse 1.5s infinite;
}

/* ============================================
   MESSAGES
   ============================================ */
.ces-message {
    background: var(--ces-white);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    font-size: 18px;
    color: var(--ces-text);
    box-shadow: var(--ces-shadow-lg);
    max-width: 600px;
    margin: 40px auto;
    line-height: 1.6;
}

.ces-message.ces-already-passed {
    border: 3px solid var(--ces-success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.05));
}

.ces-back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--ces-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ces-back-link:hover {
    color: var(--ces-primary-dark);
    transform: translateX(-5px);
}

/* ============================================
   QUESTION FLAGGING SYSTEM
   ============================================ */

/* Flag Button */
.ces-flag-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 2px solid #D1D5DB;
    color: #6B7280;
    padding: 7px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 12px;
    vertical-align: middle;
}

.ces-flag-btn svg {
    transition: all 0.3s ease;
}

.ces-flag-btn:hover {
    border-color: var(--ces-warning);
    color: var(--ces-warning);
    background: rgba(245, 158, 11, 0.08);
    transform: translateY(-1px);
}

.ces-flag-btn.ces-flagged {
    background: linear-gradient(135deg, var(--ces-warning), var(--ces-warning-dark));
    border-color: var(--ces-warning);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ces-flag-btn.ces-flagged svg {
    fill: white;
}

.ces-flag-btn.ces-flagged:hover {
    background: linear-gradient(135deg, var(--ces-warning-dark), #B45309);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

/* Flagged Question Card */
.ces-question-card.ces-flagged {
    border-color: var(--ces-warning);
    border-left-width: 6px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent);
    position: relative;
}

.ces-question-card.ces-flagged::before {
    width: 6px;
    background: linear-gradient(180deg, var(--ces-warning), var(--ces-warning-dark));
    opacity: 1;
}

/* Flagged Questions Panel */
/* Improved Flagged Questions Panel - Bottom Badge */
.ces-flagged-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--ces-warning), var(--ces-warning-dark));
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
}

.ces-flagged-panel:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5);
}

.ces-flagged-panel.expanded {
    width: 360px;
    height: auto;
    border-radius: 24px;
    flex-direction: column;
    align-items: stretch;
}

.ces-flagged-header {
    background: transparent;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-weight: 700;
    font-size: 17px;
    box-shadow: none;
    cursor: pointer;
}

.ces-flagged-panel:not(.expanded) .ces-flagged-header {
    padding: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    font-size: 28px;
}

.ces-flagged-panel:not(.expanded) .ces-flagged-header span {
    display: none;
}

.ces-flagged-panel:not(.expanded) .ces-flagged-header svg {
    width: 32px;
    height: 32px;
}

.ces-flagged-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ces-flagged-panel:not(.expanded) .ces-flagged-count-badge {
    display: flex;
}

.ces-flagged-panel.expanded .ces-flagged-count-badge {
    display: none;
}

.ces-flagged-list {
    display: none;
    padding: 18px;
    max-height: 400px;
    overflow-y: auto;
}

.ces-flagged-panel.expanded .ces-flagged-list {
    display: block;
}

/* Close button for expanded state */
.ces-flagged-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
}

.ces-flagged-panel.expanded .ces-flagged-close {
    display: flex;
}

@media (max-width: 768px) {
    .ces-flagged-panel {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    
    .ces-flagged-panel.expanded {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.ces-flagged-header {
    color: white;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 17px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ces-flagged-header svg {
    flex-shrink: 0;
}

.ces-flagged-list {
    padding: 18px;
    max-height: 470px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ces-warning) #F3F4F6;
}

.ces-flagged-list::-webkit-scrollbar {
    width: 8px;
}

.ces-flagged-list::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 10px;
}

.ces-flagged-list::-webkit-scrollbar-thumb {
    background: var(--ces-warning);
    border-radius: 10px;
}

.ces-flagged-list::-webkit-scrollbar-thumb:hover {
    background: var(--ces-warning-dark);
}

.ces-no-flags {
    text-align: center;
    color: #9CA3AF;
    padding: 50px 20px;
    font-size: 15px;
}

.ces-flagged-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ces-flagged-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ces-flagged-item:hover {
    border-color: var(--ces-warning);
    background: rgba(245, 158, 11, 0.08);
    transform: translateX(-3px);
}

.ces-flagged-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--ces-warning), var(--ces-warning-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ces-flagged-text {
    flex: 1;
    font-size: 14px;
    color: #4B5563;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.ces-goto-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--ces-primary), var(--ces-primary-dark));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.ces-goto-btn:hover {
    background: linear-gradient(135deg, var(--ces-primary-dark), #3730A3);
    transform: translateX(3px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.4);
}

/* Highlight animation for scrolled-to question */
@keyframes highlightQuestion {
    0%, 100% {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.3),
                    0 20px 25px -5px rgba(245, 158, 11, 0.2);
        transform: scale(1.02);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1400px) {
    .ces-flagged-panel {
        right: 15px;
        width: 300px;
    }
}

@media (max-width: 1200px) {
    .ces-flagged-panel {
        position: fixed;
        top: auto;
        bottom: 20px;
        right: 20px;
        transform: none;
        max-height: 450px;
        animation: slideInUp 0.4s ease;
    }
    
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(50px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 768px) {
    .ces-exam-container {
        padding: 0 15px 30px;
    }

    .ces-exam-header {
        padding: 18px 18px;
        margin: 0 -15px 20px;
        border-radius: 0 0 16px 16px;
    }
    
    .ces-header-row {
        flex-direction: column;
        gap: 15px;
    }

    .ces-exam-info {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .ces-info-item {
        padding: 10px 14px;
        flex: 1;
        min-width: 0;
    }
    
    .ces-info-item > div {
        align-items: center;
    }
    
    .ces-info-label {
        font-size: 9px;
    }

    .ces-info-value {
        font-size: 17px;
    }
    
    .ces-timer {
        width: 100%;
        max-width: 220px;
        padding: 12px 24px;
        font-size: 22px;
    }
    
    .ces-progress-bar {
        height: 8px;
    }

    .ces-question-card {
        padding: 20px;
        border-radius: 16px;
    }

    .ces-question-number {
        padding: 6px 14px;
        font-size: 13px;
    }

    .ces-question-text {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .ces-answer-option {
        padding: 14px 18px;
    }
    
    .ces-answer-text {
        font-size: 15px;
        padding-left: 35px;
    }
    
    .ces-radio-custom,
    .ces-checkbox-custom {
        width: 22px;
        height: 22px;
        left: 18px;
    }

    .ces-submit-section {
        padding: 25px 20px;
    }

    .ces-submit-btn {
        width: 100%;
        padding: 16px 35px;
        font-size: 17px;
    }

    .ces-result-content {
        padding: 35px 25px;
        border-radius: 24px;
    }

    .ces-result-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
        margin-bottom: 25px;
    }

    .ces-result-title {
        font-size: 26px;
    }

    .ces-result-score {
        font-size: 44px;
    }
    
    .ces-result-message {
        font-size: 16px;
    }
    
    /* Flagging on mobile */
    .ces-flag-btn {
        padding: 6px 12px;
        font-size: 12px;
        gap: 5px;
        margin-left: 8px;
    }
    
    .ces-flag-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .ces-flagged-panel {
        bottom: 15px;
        right: 15px;
        left: 15px;
        width: 60px;
        max-height: 350px;
    }
    
    .ces-flagged-header {
        padding: 16px 18px;
        font-size: 15px;
    }
    
    .ces-flagged-list {
        padding: 15px;
        max-height: 270px;
    }
    
    .ces-flagged-item {
        padding: 12px;
    }
    
    .ces-flagged-num {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .ces-flagged-text {
        font-size: 13px;
    }
    
    .ces-goto-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ces-exam-header {
        padding: 15px;
    }
    
    .ces-exam-info {
        gap: 8px;
    }
    
    .ces-info-item {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .ces-info-label {
        font-size: 8px;
    }
    
    .ces-info-value {
        font-size: 15px;
    }
    
    .ces-timer {
        padding: 10px 20px;
        font-size: 20px;
    }
    
    .ces-question-card {
        padding: 18px;
    }
    
    .ces-question-text {
        font-size: 17px;
    }
    
    .ces-answer-text {
        font-size: 14px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .ces-exam-header,
    .ces-submit-section,
    .ces-flagged-panel,
    .ces-flag-btn {
        display: none !important;
    }
    
    .ces-question-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ============================================
   CATEGORY SELECTION PAGE STYLES
   ============================================ */

.ces-category-selection-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 60px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ces-category-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ces-category-title {
    font-size: 42px;
    font-weight: 800;
    color: #1F2937;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px;
}

.ces-category-subtitle {
    font-size: 20px;
    color: #6B7280;
    margin: 0;
    font-weight: 400;
}

/* Category Grid */
.ces-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Card */
.ces-category-card {
    position: relative;
    display: block;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ces-category-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.ces-category-card-content {
    position: relative;
    background: white;
    border: 3px solid #E5E7EB;
    border-radius: 20px;
    padding: 30px;
    min-height: 180px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.ces-category-card:hover .ces-category-card-content {
    border-color: #4F46E5;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-8px);
}

/* Selected State */
.ces-category-checkbox:checked + .ces-category-card-content {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(67, 56, 202, 0.05));
    border-color: #4F46E5;
    border-width: 4px;
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.1),
                0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* Checkmark */
.ces-category-checkmark {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4F46E5, #4338CA);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.ces-category-checkbox:checked + .ces-category-card-content .ces-category-checkmark {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Category Name */
.ces-category-name {
    font-size: 22px;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 20px 0;
    padding-right: 50px;
    line-height: 1.3;
}

.ces-category-checkbox:checked + .ces-category-card-content .ces-category-name {
    color: #4F46E5;
}

/* Category Stats */
.ces-category-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ces-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #6B7280;
    font-weight: 500;
}

.ces-stat svg {
    flex-shrink: 0;
    color: #4F46E5;
}

.ces-category-checkbox:checked + .ces-category-card-content .ces-stat {
    color: #4338CA;
    font-weight: 600;
}

/* Footer Section */
.ces-category-footer {
    background: white;
    border: 3px solid #E5E7EB;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease;
}

/* Selection Summary */
.ces-selection-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    color: #1F2937;
    flex-wrap: wrap;
}

.ces-selection-summary strong {
    font-weight: 700;
    color: #4F46E5;
}

.ces-selection-summary span {
    font-weight: 600;
}

.ces-separator {
    color: #D1D5DB;
    font-size: 20px;
}

/* Start Exam Button */
.ces-start-exam-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #4F46E5, #4338CA);
    color: white;
    border: none;
    padding: 16px 35px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    position: relative;
    overflow: hidden;
}

.ces-start-exam-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.ces-start-exam-btn:hover:not(:disabled)::before {
    left: 100%;
}

.ces-start-exam-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.5);
}

.ces-start-exam-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.ces-start-exam-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9CA3AF, #6B7280);
    box-shadow: none;
}

.ces-start-exam-btn svg {
    transition: transform 0.3s ease;
}

.ces-start-exam-btn:hover:not(:disabled) svg {
    transform: translateX(5px);
}

/* Animation delays for staggered appearance */
.ces-category-card:nth-child(1) { animation-delay: 0.1s; }
.ces-category-card:nth-child(2) { animation-delay: 0.2s; }
.ces-category-card:nth-child(3) { animation-delay: 0.3s; }
.ces-category-card:nth-child(4) { animation-delay: 0.4s; }
.ces-category-card:nth-child(5) { animation-delay: 0.5s; }
.ces-category-card:nth-child(6) { animation-delay: 0.6s; }

.ces-category-card {
    animation: fadeInUp 0.6s ease backwards;
}



/* ============================================
   EXAM HISTORY POPUP STYLES
   ============================================ */

/* History Icon Button */
.ces-exam-best-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.ces-history-icon-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #4F46E5, #4338CA);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.ces-history-icon-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.ces-history-icon-btn svg {
    color: white;
}

/* Popup Overlay */
.ces-history-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Popup Content */
.ces-history-popup-content {
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Close Button */
.ces-history-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.ces-history-popup-close:hover {
    background: #E5E7EB;
    transform: rotate(90deg);
}

.ces-history-popup-close svg {
    color: #6B7280;
}

/* Popup Header */
.ces-history-popup-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, #4F46E5, #4338CA);
    color: white;
}

.ces-history-popup-header svg {
    margin: 0 auto 20px;
    opacity: 0.9;
}

.ces-history-popup-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 800;
}

.ces-history-popup-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Table Wrapper */
.ces-history-popup-table-wrapper {
    overflow-y: auto;
    flex: 1;
    margin-top:20px;
    padding: 0 20px 30px;
}

/* Popup Table */
.ces-history-popup-table {
    width: 100%;
    border-collapse: collapse;
}

.ces-history-popup-table thead {
    position: sticky;
    top: 0;
    background: #F9FAFB;
    z-index: 5;
}

.ces-history-popup-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
    border-bottom: 2px solid #E5E7EB;
}

.ces-history-popup-table td {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    font-size: 15px;
    color: #1F2937;
}

.ces-history-popup-row:hover {
    background: #F9FAFB;
}

.ces-history-popup-attempt {
    font-weight: 700;
    color: #4F46E5;
}

/* Popup Footer */
.ces-history-popup-footer {
    padding: 20px 30px;
    background: #F9FAFB;
    border-top: 2px solid #E5E7EB;
    text-align: center;
    font-size: 16px;
    color: #6B7280;
}

.ces-history-popup-footer strong {
    color: #4F46E5;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .ces-history-popup-content {
        border-radius: 16px;
    }
    
    .ces-history-popup-header {
        padding: 30px 20px 20px;
    }
    
    .ces-history-popup-header h2 {
        font-size: 22px;
    }
    
    .ces-history-popup-table-wrapper {
        padding: 15px;
        overflow-x: auto;
    }
    
    .ces-history-popup-table {
        min-width: 600px;
    }
    
    .ces-history-popup-table th,
    .ces-history-popup-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .ces-history-icon-btn {
        width: 38px;
        height: 38px;
    }
}


.ces-history-icon-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9CA3AF, #6B7280);
    box-shadow: none;
}

.ces-history-icon-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Exam Not Available Message */
.ces-exam-not-available {
    border: 3px solid #EF4444 !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.05)) !important;
}

.ces-exam-not-available h3 {
    color: #DC2626;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
}


.ces-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4F46E5, #4338CA);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.ces-retry-btn:hover {
    background: linear-gradient(135deg, #4338CA, #3730A3);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.4);
    color: white;
}

.ces-retry-btn svg {
    transition: transform 0.3s ease;
}

.ces-retry-btn:hover svg {
    transform: rotate(180deg);
}



/* Premium Access Gate */
.ces-premium-gate {
    max-width: 800px;
    margin: 60px auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.ces-premium-header {
    background: linear-gradient(135deg, #4F46E5, #4338CA);
    color: white;
    padding: 60px 40px;
    text-align: center;
}

.ces-premium-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.ces-premium-header h2 {
    margin: 0 0 10px 0;
    font-size: 36px;
    font-weight: 800;
}

.ces-premium-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

.ces-message.ces-premium-required {
    border: 3px solid #4F46E5;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(67, 56, 202, 0.05));
}

.ces-exam-badge.ces-badge-premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1F2937;
}

    .popup-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.5);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    text-align: center;
    z-index: 10001;
    animation: slideUp 0.4s 
cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-actions {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.popup-actions a {
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s 
ease;
}

.popup-actions a:hover {
    color:black;
}
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
}

.btn-secondary {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #374151;
}


/* Trial Badge */
.ces-badge-trial {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.ces-badge-locked {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}


/******************************/
/* Enhanced Trial Banner */
.ces-trial-banner {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 50%, #FCD34D 100%);
    border: none;
    border-left: 6px solid #F59E0B;
    padding: 20px 30px;
    margin: 20px 0 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
    position: relative;
    overflow: hidden;
}

.ces-trial-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    pointer-events: none;
}

.ces-trial-banner-icon {
    font-size: 42px;
    flex-shrink: 0;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.ces-trial-banner-content {
    flex: 1;
    z-index: 1;
}

.ces-trial-banner-content h3 {
    margin: 0 0 8px 0;
    color: #92400E;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.ces-trial-banner-content p {
    margin: 0;
    color: #78350F;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.ces-trial-banner-content p strong {
    color: #B45309;
    font-weight: 800;
    font-size: 18px;
}

/* Responsive Trial Banner */
@media (max-width: 768px) {
    .ces-trial-banner {
        padding: 18px 20px;
        gap: 15px;
    }
    
    .ces-trial-banner-icon {
        font-size: 32px;
    }
    
    .ces-trial-banner-content h3 {
        font-size: 17px;
    }
    
    .ces-trial-banner-content p {
        font-size: 14px;
    }
}

/* Enhanced Trial Expired Popup */
.ces-trial-expired-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.ces-trial-expired-popup {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 28px;
    padding: 50px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid #f3f4f6;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ces-trial-icon {
    font-size: 90px;
    margin-bottom: 25px;
    display: inline-block;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 8px 16px rgba(239, 68, 68, 0.3));
}

@keyframes bounceIn {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    50% { 
        transform: scale(1.15);
    }
    70% { 
        transform: scale(0.95);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

.ces-trial-expired-popup h2 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 18px 0;
    color: #1F2937;
    letter-spacing: -0.5px;
}

.ces-trial-expired-popup p {
    font-size: 18px;
    color: #6B7280;
    margin: 0 0 35px 0;
    line-height: 1.7;
}

.ces-subscribe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    padding: 18px 40px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
    border: none;
    position: relative;
    overflow: hidden;
}

.ces-subscribe-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.ces-subscribe-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.5);
    color: white;
}

.ces-subscribe-btn:hover::before {
    left: 100%;
}

.ces-subscribe-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Close Button for Popup */
.ces-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #F3F4F6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.ces-popup-close:hover {
    background: #E5E7EB;
    transform: rotate(90deg);
}

.ces-popup-close svg {
    color: #6B7280;
}

/* Responsive Popup */
@media (max-width: 768px) {
    .ces-trial-expired-popup {
        padding: 40px 30px;
        border-radius: 24px;
    }
    
    .ces-trial-icon {
        font-size: 70px;
    }
    
    .ces-trial-expired-popup h2 {
        font-size: 26px;
    }
    
    .ces-trial-expired-popup p {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .ces-subscribe-btn {
        padding: 16px 32px;
        font-size: 16px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ces-trial-expired-popup {
        padding: 35px 25px;
    }
    
    .ces-trial-icon {
        font-size: 60px;
    }
    
    .ces-trial-expired-popup h2 {
        font-size: 22px;
    }
}

.ces-badge-premium-trial {
    background: linear-gradient(135deg, #A78BFA, #8B5CF6);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* ADD THIS TO exam-style.css */

/* Premium Unlimited Badge */
.ces-badge-premium-unlimited {
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF8C00);
    color: #1F2937;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    animation: shimmer 3s infinite;
    position: relative;
    overflow: hidden;
}

.ces-badge-premium-unlimited::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
}

@keyframes shimmer {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6);
    }
}

@keyframes shine {
    0% {
        transform: rotate(0deg) translate(-50%, -50%);
    }
    100% {
        transform: rotate(360deg) translate(-50%, -50%);
    }
}