        @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

        :root {
            --kpt-primary: #E07B39;
            --kpt-secondary: #1A2F52;
            --kpt-accent: #F5E6D3;
            --kpt-dark: #0D1B2A;
            --kpt-light: #F8F9FA;
            --kpt-white: #FFFFFF;
            --kpt-success: #27ae60;
            --kpt-danger: #e74c3c;
            --kpt-warning: #f39c12;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Vazirmatn', sans-serif;
            background: var(--kpt-dark);
            color: var(--kpt-white);
            min-height: 100vh;
            direction: rtl;
        }

        /* Background Pattern */
        body::before {
            content: '';
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background:
                radial-gradient(circle at 20% 20%, rgba(224,123,57,0.07) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(26,47,82,0.15) 0%, transparent 50%);
            pointer-events: none;
            z-index: 0;
        }

        .kpt-container {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            z-index: 1;
        }

        /* ===== HEADER ===== */
        .kpt-header {
            text-align: center;
            padding: 40px 0 30px;
        }

        .kpt-header-logo {
            font-size: 48px;
            margin-bottom: 10px;
        }

        .kpt-header-title {
            font-size: 32px;
            font-weight: 900;
            color: var(--kpt-white);
            margin-bottom: 8px;
        }

        .kpt-header-title span {
            color: var(--kpt-primary);
        }

        .kpt-header-subtitle {
            font-size: 16px;
            color: rgba(255,255,255,0.6);
            font-weight: 400;
        }

        /* ===== REGISTRATION FORM ===== */
        .kpt-registration-card {
            background: linear-gradient(145deg, rgba(26,47,82,0.6), rgba(13,27,42,0.8));
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 24px;
            padding: 40px;
            margin-bottom: 30px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }

        .kpt-reg-title {
            font-size: 22px;
            font-weight: 800;
            color: var(--kpt-white);
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .kpt-reg-desc {
            font-size: 14px;
            color: rgba(255,255,255,0.5);
            margin-bottom: 30px;
        }

        .kpt-form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px;
        }

        .kpt-form-group {
            display: flex;
            flex-direction: column;
        }

        .kpt-form-group label {
            font-size: 14px;
            font-weight: 600;
            color: rgba(255,255,255,0.8);
            margin-bottom: 8px;
        }

        .kpt-form-group label .kpt-required {
            color: var(--kpt-danger);
            margin-right: 3px;
        }

        .kpt-form-input {
            background: rgba(255,255,255,0.06);
            border: 2px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            padding: 14px 18px;
            font-size: 15px;
            color: var(--kpt-white);
            font-family: 'Vazirmatn', sans-serif;
            transition: all 0.3s ease;
            outline: none;
            direction: rtl;
        }

        .kpt-form-input::placeholder {
            color: rgba(255,255,255,0.3);
        }

        .kpt-form-input:focus {
            border-color: var(--kpt-primary);
            background: rgba(224,123,57,0.06);
            box-shadow: 0 0 0 4px rgba(224,123,57,0.1);
        }

        .kpt-form-input.kpt-input-ltr {
            direction: ltr;
            text-align: left;
        }

        .kpt-start-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            width: 100%;
            padding: 18px;
            background: linear-gradient(135deg, var(--kpt-primary), #c96a2e);
            color: var(--kpt-white);
            border: none;
            border-radius: 14px;
            font-size: 18px;
            font-weight: 800;
            font-family: 'Vazirmatn', sans-serif;
            cursor: pointer;
            transition: all 0.4s ease;
            box-shadow: 0 8px 30px rgba(224,123,57,0.35);
        }

        .kpt-start-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 40px rgba(224,123,57,0.5);
        }

        .kpt-start-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        /* ===== TIMER BAR ===== */
        .kpt-timer-bar {
            background: rgba(26,47,82,0.6);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            padding: 16px 24px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 10px;
            z-index: 100;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }

        .kpt-timer-info {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 15px;
            font-weight: 700;
        }

        .kpt-timer-clock {
            font-size: 22px;
            font-weight: 900;
            color: var(--kpt-primary);
            font-variant-numeric: tabular-nums;
            min-width: 70px;
            text-align: center;
        }

        .kpt-timer-clock.kpt-timer-warning {
            color: var(--kpt-warning);
            animation: kptTimerBlink 1s ease-in-out infinite;
        }

        .kpt-timer-clock.kpt-timer-danger {
            color: var(--kpt-danger);
            animation: kptTimerBlink 0.5s ease-in-out infinite;
        }

        @keyframes kptTimerBlink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }

        .kpt-timer-progress {
            flex: 1;
            height: 6px;
            background: rgba(255,255,255,0.1);
            border-radius: 3px;
            margin: 0 20px;
            overflow: hidden;
        }

        .kpt-timer-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--kpt-primary), #c96a2e);
            border-radius: 3px;
            transition: width 1s linear;
            width: 100%;
        }

        .kpt-question-counter {
            font-size: 14px;
            color: rgba(255,255,255,0.6);
            font-weight: 600;
        }

        .kpt-question-counter strong {
            color: var(--kpt-primary);
            font-size: 16px;
        }

        /* ===== QUESTIONS ===== */
        .kpt-questions-wrapper {
            display: none;
        }

        .kpt-questions-wrapper.kpt-active {
            display: block;
        }

        .kpt-question-card {
            background: linear-gradient(145deg, rgba(26,47,82,0.5), rgba(13,27,42,0.7));
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 20px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .kpt-question-card::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 4px;
            height: 100%;
            background: var(--kpt-primary);
            border-radius: 0 0 2px 2px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .kpt-question-card:hover::before,
        .kpt-question-card.kpt-answered::before {
            opacity: 1;
        }

        .kpt-question-card.kpt-answered {
            border-color: rgba(224,123,57,0.2);
        }

        .kpt-question-header {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 20px;
        }

        .kpt-question-number {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--kpt-primary), #c96a2e);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            font-weight: 900;
            flex-shrink: 0;
        }

        .kpt-question-difficulty {
            font-size: 11px;
            padding: 4px 10px;
            border-radius: 6px;
            font-weight: 700;
            margin-right: auto;
        }

        .kpt-diff-easy {
            background: rgba(39,174,96,0.15);
            color: #27ae60;
        }

        .kpt-diff-medium {
            background: rgba(243,156,18,0.15);
            color: #f39c12;
        }

        .kpt-diff-hard {
            background: rgba(231,76,60,0.15);
            color: #e74c3c;
        }

        .kpt-question-text {
            font-size: 17px;
            font-weight: 600;
            color: var(--kpt-white);
            line-height: 1.7;
            margin-bottom: 20px;
            direction: ltr;
            text-align: left;
        }

        .kpt-options-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .kpt-option-label {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 18px;
            background: rgba(255,255,255,0.04);
            border: 2px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            direction: ltr;
        }

        .kpt-option-label:hover {
            background: rgba(224,123,57,0.08);
            border-color: rgba(224,123,57,0.3);
        }

        .kpt-option-label input[type="radio"] {
            display: none;
        }

        .kpt-option-label input[type="radio"]:checked + .kpt-option-radio {
            border-color: var(--kpt-primary);
            background: var(--kpt-primary);
        }

        .kpt-option-label input[type="radio"]:checked + .kpt-option-radio::after {
            content: '✓';
            color: var(--kpt-white);
            font-size: 12px;
            font-weight: 900;
        }

        .kpt-option-label input[type="radio"]:checked ~ .kpt-option-text {
            color: var(--kpt-primary);
            font-weight: 700;
        }

        .kpt-option-radio {
            width: 24px;
            height: 24px;
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.3s ease;
        }

        .kpt-option-letter {
            font-size: 13px;
            font-weight: 800;
            color: rgba(255,255,255,0.4);
            width: 24px;
            text-align: center;
            flex-shrink: 0;
        }

        .kpt-option-text {
            font-size: 15px;
            color: rgba(255,255,255,0.8);
            transition: all 0.3s ease;
        }

        /* ===== SUBMIT BUTTON ===== */
        .kpt-submit-section {
            text-align: center;
            padding: 30px 0 50px;
            display: none;
        }

        .kpt-submit-section.kpt-active {
            display: block;
        }

        .kpt-submit-btn {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            padding: 18px 60px;
            background: linear-gradient(135deg, var(--kpt-success), #1e8449);
            color: var(--kpt-white);
            border: none;
            border-radius: 14px;
            font-size: 18px;
            font-weight: 800;
            font-family: 'Vazirmatn', sans-serif;
            cursor: pointer;
            transition: all 0.4s ease;
            box-shadow: 0 8px 30px rgba(39,174,96,0.35);
        }

        .kpt-submit-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 40px rgba(39,174,96,0.5);
        }

        .kpt-unanswered-warning {
            font-size: 14px;
            color: var(--kpt-warning);
            margin-top: 15px;
            display: none;
        }

        /* ===== RESULT PAGE ===== */
        .kpt-result-wrapper {
            padding: 20px 0 50px;
        }

        .kpt-result-card {
            background: linear-gradient(145deg, rgba(26,47,82,0.7), rgba(13,27,42,0.9));
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 24px;
            padding: 50px 40px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            margin-bottom: 30px;
        }

        .kpt-result-icon {
            font-size: 64px;
            margin-bottom: 15px;
        }

        .kpt-result-title {
            font-size: 28px;
            font-weight: 900;
            margin-bottom: 8px;
        }

        .kpt-result-name {
            font-size: 18px;
            color: rgba(255,255,255,0.6);
            margin-bottom: 30px;
        }

        .kpt-result-score-circle {
            width: 180px;
            height: 180px;
            border-radius: 50%;
            margin: 0 auto 30px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .kpt-result-score-circle::before {
            content: '';
            position: absolute;
            inset: -4px;
            border-radius: 50%;
            border: 4px solid transparent;
            border-top-color: currentColor;
            animation: kptScoreRotate 2s linear infinite;
        }

        @keyframes kptScoreRotate {
            to { transform: rotate(360deg); }
        }

        .kpt-result-score-value {
            font-size: 48px;
            font-weight: 900;
            line-height: 1;
        }

        .kpt-result-score-label {
            font-size: 14px;
            color: rgba(255,255,255,0.6);
            margin-top: 4px;
        }

        .kpt-result-level-badge {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 14px 40px;
            border-radius: 50px;
            font-size: 20px;
            font-weight: 900;
            margin-bottom: 10px;
        }

        .kpt-result-level-title {
            font-size: 16px;
            color: rgba(255,255,255,0.6);
            margin-bottom: 30px;
        }

        .kpt-result-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin-bottom: 30px;
        }

        .kpt-result-stat {
            background: rgba(255,255,255,0.05);
            border-radius: 14px;
            padding: 20px;
        }

        .kpt-result-stat-value {
            font-size: 28px;
            font-weight: 900;
            margin-bottom: 4px;
        }

        .kpt-result-stat-label {
            font-size: 13px;
            color: rgba(255,255,255,0.5);
        }

        /* Download Button */
        .kpt-download-btn {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            padding: 16px 50px;
            background: linear-gradient(135deg, var(--kpt-primary), #c96a2e);
            color: var(--kpt-white);
            border: none;
            border-radius: 14px;
            font-size: 17px;
            font-weight: 800;
            font-family: 'Vazirmatn', sans-serif;
            cursor: pointer;
            transition: all 0.4s ease;
            box-shadow: 0 8px 30px rgba(224,123,57,0.35);
            text-decoration: none;
        }

        .kpt-download-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 40px rgba(224,123,57,0.5);
        }

        .kpt-back-link {
            display: inline-block;
            margin-top: 20px;
            color: rgba(255,255,255,0.5);
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s ease;
        }

        .kpt-back-link:hover {
            color: var(--kpt-primary);
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 768px) {
            .kpt-container {
                padding: 15px;
            }

            .kpt-header-title {
                font-size: 24px;
            }

            .kpt-registration-card {
                padding: 25px 20px;
            }

            .kpt-form-grid {
                grid-template-columns: 1fr;
            }

            .kpt-timer-bar {
                flex-wrap: wrap;
                gap: 10px;
                padding: 12px 16px;
            }

            .kpt-timer-progress {
                order: 3;
                width: 100%;
                margin: 0;
            }

            .kpt-question-card {
                padding: 20px;
            }

            .kpt-options-grid {
                grid-template-columns: 1fr;
            }

            .kpt-result-card {
                padding: 30px 20px;
            }

            .kpt-result-stats {
                grid-template-columns: 1fr;
            }

            .kpt-result-score-circle {
                width: 140px;
                height: 140px;
            }

            .kpt-result-score-value {
                font-size: 36px;
            }
        }

        /* ===== LOADING OVERLAY ===== */
        .kpt-loading-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(13,27,42,0.9);
            backdrop-filter: blur(10px);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 20px;
        }

        .kpt-loading-overlay.kpt-show {
            display: flex;
        }

        .kpt-loading-spinner {
            width: 60px;
            height: 60px;
            border: 4px solid rgba(255,255,255,0.1);
            border-top-color: var(--kpt-primary);
            border-radius: 50%;
            animation: kptSpin 0.8s linear infinite;
        }

        @keyframes kptSpin {
            to { transform: rotate(360deg); }
        }

        .kpt-loading-text {
            font-size: 16px;
            color: rgba(255,255,255,0.7);
        }

        /* ===== ANIMATIONS ===== */
        .kpt-fade-in {
            animation: kptFadeIn 0.6s ease forwards;
        }

        @keyframes kptFadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }