
        :root {
            --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
            --danger-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            --bg-color: #f0f2f5;
        }
        
   
  
   /*     .result-container {
            max-width: 700px;
            margin: 0 auto;
            animation: fadeInUp 0.6s ease-out;
        }*/
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .result-card {
            background: white;
            border-radius: 24px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
        }
        
        .result-header {
            background:var(--primary-gradient);
            color: white;
            padding: 3rem 2rem;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .result-header::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: rotate 20s linear infinite;
        }
        
        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .result-icon {
            font-size: 5rem;
            margin-bottom: 1rem;
            animation: scaleIn 0.5s ease-out 0.2s both;
        }
        
        @keyframes scaleIn {
            from {
                transform: scale(0);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }
        
        .result-title {
            font-size: 2.2rem;
            font-weight: 800;
            margin-bottom: 0.5rem;
            position: relative;
            z-index: 1;
        }
        
        .result-subtitle {
            font-size: 1.1rem;
            opacity: 0.95;
            position: relative;
            z-index: 1;
        }
        
        .result-body {
            padding: 2.5rem;
        }
        
        .score-display {
            text-align: center;
            margin-bottom: 2rem;
        }
        
        .score-circle {
            width: 180px;
            height: 180px;
            border-radius: 50%;
            background: <?php echo $passed ? 'var(--success-gradient)' : 'var(--danger-gradient)'; ?>;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.5rem;
            box-shadow: 0 10px 30px <?php echo $passed ? 'rgba(17, 153, 142, 0.3)' : 'rgba(240, 147, 251, 0.3)'; ?>;
            position: relative;
            animation: pulse 2s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 10px 30px <?php echo $passed ? 'rgba(17, 153, 142, 0.3)' : 'rgba(240, 147, 251, 0.3)'; ?>;
            }
            50% {
                transform: scale(1.05);
                box-shadow: 0 15px 40px <?php echo $passed ? 'rgba(17, 153, 142, 0.5)' : 'rgba(240, 147, 251, 0.5)'; ?>;
            }
        }
        
        .score-circle-inner {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #ff7171;            /* main circle color */
    border: 6px solid #ffe1e1;      /* soft border for white bg */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.score-number {
    font-size: 34px;
    font-weight: 700;
    color: #ffffff;                /* strong contrast */
    line-height: 1;
}

.score-label {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
    margin-top: 4px;
}
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .stat-item {
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border-radius: 16px;
            padding: 1.5rem;
            text-align: center;
            border: 2px solid #e9ecef;
            transition: all 0.3s ease;
        }
        
        .stat-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            border-color: transparent;
        }
        
        .stat-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }
        
        .stat-value {
            font-size: 2rem;
            font-weight: 800;
            color: #2c3e50;
            margin-bottom: 0.3rem;
        }
        
        .stat-label {
            font-size: 0.85rem;
            color: #6c757d;
            font-weight: 600;
        }
        
        .message-box {
            background: <?php echo $passed ? 'linear-gradient(135deg, #d4edda 0%, #a8e6b5 100%)' : 'linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%)'; ?>;
            border-radius: 16px;
            padding: 1.5rem;
            text-align: center;
            margin-bottom: 2rem;
            border: 2px solid <?php echo $passed ? '#28a745' : '#dc3545'; ?>;
        }
        
        .message-icon {
            font-size: 3rem;
            margin-bottom: 0.5rem;
        }
        
        .message-text {
            font-size: 1.2rem;
            font-weight: 700;
            color: <?php echo $passed ? '#155724' : '#721c24'; ?>;
            margin: 0;
        }
        
 /*       .action-buttons {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }
        */
        .btn-custom {
            flex: 1;
            padding: 1rem 2rem;
            border-radius: 12px;
            font-weight: 700;
            font-size: 1rem;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            min-width: 200px;
        }
        
        .btn-primary {
            background: var(--primary-gradient);
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }
        
        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
            color: white;
        }
        
        .btn-success {
            background: var(--success-gradient);
            color: white;
            box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
        }
        
        .btn-success:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(17, 153, 142, 0.4);
            color: white;
        }
        
        @media (max-width: 768px) {
            .result-title {
                font-size: 1.8rem;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .btn-custom {
                width: 100%;
            }
        }

        :root {
            --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
            --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            --bg-color: #f0f2f5;
            --card-bg: #ffffff;
            --text-primary: #2c3e50;
            --text-secondary: #7f8c8d;
            --border-color: #e1e8ed;
        }
        
   
        
        /* Animated Background */
        .exam-wrapper {
            position: relative;
            min-height: 100vh;
            padding: 2rem 0;
        }
        
        .exam-wrapper::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(17, 153, 142, 0.08) 0%, transparent 50%);
            z-index: -1;
            animation: bgShift 20s ease-in-out infinite;
        }
        
        @keyframes bgShift {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.8; transform: scale(1.1); }
        }
        
        .container {
            max-width: 1000px;
            margin: 0 auto;
            padding: 0 1rem;
        }
        
        /* Header */
        .exam-header {
            background: var(--primary-gradient);
            color: white;
            border-radius: 24px;
            padding: 3rem 2.5rem;
            margin-bottom: 2rem;
            text-align: center;
            box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
            position: relative;
            overflow: hidden;
            animation: slideDown 0.6s ease-out;
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-40px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .exam-header::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: rotate 20s linear infinite;
        }
        
        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .exam-header h1 {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 1rem;
            position: relative;
            z-index: 1;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            color: #fff
        }
        
        .exam-info-grid {
            display: flex;
            justify-content: center;
            gap: 3rem;
            margin-top: 1.5rem;
            position: relative;
            z-index: 1;
        }
        
        .exam-info-item {
            text-align: center;
        }
        
        .exam-info-label {
            font-size: 0.85rem;
            opacity: 0.9;
            margin-bottom: 0.3rem;
        }
        
        .exam-info-value {
            font-size: 2rem;
            font-weight: 800;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        
        /* Notice Boxes */
        .notice-box {
            background: white;
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            border-left: 5px solid;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            animation: fadeInUp 0.6s ease-out 0.1s both;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .notice-warning {
            border-color: #ffc107;
            background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
        }
        
        .notice-info {
            border-color: #0073aa;
            background: linear-gradient(135deg, #e7f3ff 0%, #ffffff 100%);
        }
        
        .notice-box h3 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1.2rem;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }
        
        .notice-box ul {
            margin-left: 1.5rem;
        }
        
        .notice-box li {
            margin-bottom: 0.5rem;
            color: var(--text-secondary);
        }
        
        /* Question Card */
        .question-card {
            background: white;
            border-radius: 20px;
            padding: 2rem;
            margin-bottom: 2rem;
            border: 2px solid var(--border-color);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
            transition: all 0.4s ease;
            animation: fadeInUp 0.6s ease-out both;
            position: relative;
            overflow: hidden;
        }
        
        .question-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -5px;
            width: 5px;
            height: 100%;
            background: var(--primary-gradient);
            transform: scaleY(0);
            transition: transform 0.4s ease;
        }
        
        .question-card:hover {
            transform: translateX(8px);
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
            border-color: transparent;
        }
        
        .question-card:hover::before {
            transform: scaleY(1);
        }
        
        .question-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            background: var(--primary-gradient);
            color: white;
            border-radius: 50%;
            font-weight: 800;
            font-size: 1.2rem;
            margin-bottom: 1rem;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }
        
        .question-text {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 1.5rem;
            line-height: 1.8;
        }
        
        .option-label {
            display: block;
            padding: 1.2rem 1.5rem;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        
        .option-label::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
            transition: left 0.5s ease;
        }
        
        .option-label:hover {
            background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
            border-color: #667eea;
            transform: translateX(5px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
        }
        
        .option-label:hover::before {
            left: 100%;
        }
        
        .option-label input[type="radio"] {
            margin-right: 1rem;
            width: 20px;
            height: 20px;
            cursor: pointer;
        }
        
        .option-label:has(input:checked) {
            background: linear-gradient(135deg, #e7f3ff 0%, #f0f7ff 100%);
            border-color: #667eea;
            border-width: 3px;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
        }
        
        .option-label:has(input:checked) .option-text {
            font-weight: 700;
            color: #667eea;
        }
        
        .option-text {
            font-size: 1rem;
            color: var(--text-primary);
            transition: all 0.3s ease;
        }
        
        /* Progress Bar */
        .progress-container {
            position: sticky;
            top: 20px;
            background: white;
            border-radius: 16px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            z-index: 100;
            animation: fadeInUp 0.6s ease-out 0.2s both;
        }
        
        .progress-label {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .progress-text {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-secondary);
        }
        
        .progress-count {
            font-size: 1.2rem;
            font-weight: 800;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .progress-bar-container {
            height: 12px;
            background: #e9ecef;
            border-radius: 20px;
            overflow: hidden;
        }
        
        .progress-bar-fill {
            height: 100%;
            background: var(--primary-gradient);
            border-radius: 20px;
            transition: width 0.5s ease;
            position: relative;
            overflow: hidden;
        }
        
        .progress-bar-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            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%); }
        }
        
        /* Submit Button */
        .submit-container {
            text-align: center;
            padding: 3rem 0;
            animation: fadeInUp 0.6s ease-out 0.3s both;
        }
        
        .submit-btn {
            background: var(--primary-gradient);
            color: white;
            padding: 1.2rem 4rem;
            border: none;
            border-radius: 16px;
            font-size: 1.3rem;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
            transition: all 0.4s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.8rem;
        }
        
        .submit-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
        }
        
        .submit-btn:active {
            transform: translateY(-2px);
        }
        
        @media (max-width: 768px) {
            .exam-header h1 {
                font-size: 1.8rem;
            }
            
            .exam-info-grid {
                flex-direction: column;
                gap: 1.5rem;
            }
            
            .question-card {
                padding: .5rem;
            }
            .option-label {
             padding: 12px 12px;
            }
            
            .submit-btn {
                width: 100%;
                padding: 1rem 2rem;
            }
        }
    