/* My Proficiency Test - Professional Educational Interface Styles */

/* CSS Variables for consistent theming - Educational & Friendly */
:root {
    --mpt-primary: #4f46e5;
    --mpt-primary-dark: #4338ca;
    --mpt-primary-light: #818cf8;
    --mpt-secondary: #64748b;
    --mpt-success: #10b981;
    --mpt-danger: #ef4444;
    --mpt-danger-dark: #dc2626;
    --mpt-text-primary: #1e293b;
    --mpt-text-secondary: #475569;
    --mpt-text-tertiary: #94a3b8;
    --mpt-bg-primary: #ffffff;
    --mpt-bg-secondary: #f8fafc;
    --mpt-bg-tertiary: #f1f5f9;
    --mpt-bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --mpt-border: #e2e8f0;
    --mpt-border-light: #f1f5f9;
    --mpt-radius-sm: 12px;
    --mpt-radius: 16px;
    --mpt-radius-lg: 20px;
    --mpt-radius-xl: 28px;
    --mpt-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --mpt-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --mpt-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Educational color scheme - Warm and approachable */
    --mpt-examiner-bubble: #e0e7ff;
    --mpt-examiner-accent: #6366f1;
    --mpt-examinee-bubble: #4f46e5;
    --mpt-button-color: #6366f1;
    --mpt-button-hover: #4f46e5;
    --mpt-accent-warm: #f59e0b;
    --mpt-accent-cool: #06b6d4;
}

/* Reset and base styles */
.mpt-interface * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Main interface container */
.mpt-interface {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--mpt-text-primary);
    line-height: 1.6;
    height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--mpt-bg-secondary);
    border-radius: var(--mpt-radius-xl);
    box-shadow: var(--mpt-shadow-lg);
    position: relative;
}

/* Interface header */
.mpt-interface-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--mpt-radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--mpt-shadow);
    position: relative;
    overflow: hidden;
}

.mpt-interface-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.mpt-interface-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.mpt-interface-logo img {
    display: block;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 1;
}

.mpt-interface-info {
    text-align: right;
    position: relative;
    z-index: 1;
}

.mpt-examinee-name {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mpt-progress-indicator {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

/* Conversation container */
.mpt-conversation-container {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    scroll-behavior: smooth;
    background: #ffffff;
    border-radius: var(--mpt-radius-lg);
    box-shadow: var(--mpt-shadow);
    margin-bottom: 20px;
}

/* Custom scrollbar */
.mpt-conversation-container::-webkit-scrollbar {
    width: 8px;
}

.mpt-conversation-container::-webkit-scrollbar-track {
    background: var(--mpt-bg-tertiary);
    border-radius: 10px;
}

.mpt-conversation-container::-webkit-scrollbar-thumb {
    background: var(--mpt-secondary);
    border-radius: 10px;
    transition: background 0.2s;
}

.mpt-conversation-container::-webkit-scrollbar-thumb:hover {
    background: var(--mpt-text-secondary);
}

/* Messages area */
.mpt-messages {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Individual message */
.mpt-message {
    display: flex;
    animation: messageSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Examiner message */
.mpt-message.examiner {
    justify-content: flex-start;
}

.mpt-message.examiner .mpt-message-bubble {
    background: var(--mpt-examiner-bubble);
    color: var(--mpt-text-primary);
    border-radius: var(--mpt-radius-lg) var(--mpt-radius-lg) var(--mpt-radius-lg) 6px;
    max-width: 75%;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    border: 2px solid rgba(99, 102, 241, 0.1);
    position: relative;
}

.mpt-message.examiner .mpt-message-bubble::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 3px;
    background: linear-gradient(90deg, var(--mpt-examiner-accent), var(--mpt-accent-cool));
    border-radius: var(--mpt-radius-lg) var(--mpt-radius-lg) 0 0;
}

/* Examinee message */
.mpt-message.examinee {
    justify-content: flex-end;
}

.mpt-message.examinee .mpt-message-bubble {
    background: linear-gradient(135deg, var(--mpt-examinee-bubble) 0%, #6366f1 100%);
    color: #ffffff;
    border-radius: var(--mpt-radius-lg) var(--mpt-radius-lg) 6px var(--mpt-radius-lg);
    max-width: 75%;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Message bubble */
.mpt-message-bubble {
    padding: 18px 24px;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    font-weight: 450;
}

/* Hide old conversation containers */
.mpt-speech-interface .mpt-conversation-container,
.mpt-text-interface .mpt-conversation-container {
    display: none;
}

/* ========================================================================
   INTERVIEW STYLE TEXT INTERFACE - Split Screen with Large Examiner
   ======================================================================== */

.mpt-interview-layout {
    flex: 1;
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: #000000;
    border-radius: var(--mpt-radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Large Examiner Panel - 40% Width */
.mpt-examiner-panel {
    width: 40%;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mpt-examiner-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mpt-examiner-photo.mpt-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mpt-examiner-photo.mpt-placeholder svg {
    color: rgba(255, 255, 255, 0.4);
}

.mpt-examiner-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

.mpt-live-indicator {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Response Panel - 60% Width */
.mpt-response-panel {
    width: 60%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 32px;
    position: relative;
}

/* Timer - Corner Badge */
.mpt-timer-corner {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--mpt-button-color);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.mpt-timer-corner.visible {
    visibility: visible;
    opacity: 1;
}

.mpt-timer-corner.warning {
    background: rgba(239, 68, 68, 0.15);
    color: var(--mpt-danger);
    animation: timerShake 0.5s ease-in-out infinite;
}

@keyframes timerShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Question Display - Large & Clear */
.mpt-question-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 24px;
}

.mpt-question-header {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mpt-text-tertiary);
    margin-bottom: 16px;
}

.mpt-current-question {
    font-size: 28px;
    line-height: 1.5;
    color: var(--mpt-text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Answer Section */
.mpt-answer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mpt-answer-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--mpt-text-tertiary);
}

.mpt-answer-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    transition: all 0.3s ease;
    background: #f9fafb;
    color: var(--mpt-text-primary);
}

.mpt-answer-input:focus {
    outline: none;
    border-color: var(--mpt-button-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.mpt-submit-answer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--mpt-button-color) 0%, var(--mpt-button-hover) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.mpt-submit-answer:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.mpt-submit-answer:active:not(:disabled) {
    transform: translateY(0);
}

.mpt-submit-answer:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================================================
   VIDEO CALL STYLE SPEECH INTERFACE - Full Screen with Bottom Controls
   ======================================================================== */

.mpt-video-call-layout {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #000000;
    border-radius: var(--mpt-radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Large Video Frame */
.mpt-video-frame {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

.mpt-video-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mpt-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mpt-video-placeholder svg {
    color: rgba(255, 255, 255, 0.3);
}

/* Speaking Indicator Overlay */
.mpt-speaking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 6px solid transparent;
    border-top-left-radius: var(--mpt-radius-lg);
    border-top-right-radius: var(--mpt-radius-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mpt-video-frame.speaking .mpt-speaking-overlay {
    border-color: #10b981;
    opacity: 1;
    animation: speakingPulse 1.5s ease-in-out infinite;
}

@keyframes speakingPulse {
    0%, 100% { border-color: #10b981; }
    50% { border-color: #34d399; }
}

/* Top Overlay */
.mpt-video-overlay-top {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.mpt-participant-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.mpt-mic-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

/* Bottom Control Bar - HIDDEN */
.mpt-control-bar {
    display: none !important; /* Hide completely throughout test */
}

/* Timer Badge - Positioned at bottom left */
.mpt-timer-badge {
    position: absolute;
    bottom: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    padding: 14px 24px;
    border-radius: 30px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 20;
}

.mpt-timer-badge svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.mpt-timer-badge.visible {
    visibility: visible;
    opacity: 1;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mpt-timer-badge.warning {
    background: rgba(220, 38, 38, 0.95);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.6), 0 0 0 2px rgba(252, 165, 165, 0.3);
    animation: timerShake 0.5s ease-in-out infinite, warningGlow 2s ease-in-out infinite;
}

@keyframes warningGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(220, 38, 38, 0.6), 0 0 0 2px rgba(252, 165, 165, 0.3);
    }
    50% {
        box-shadow: 0 8px 40px rgba(220, 38, 38, 0.8), 0 0 0 3px rgba(252, 165, 165, 0.5);
    }
}

/* Answer Button - Large, Centered at Bottom */
.mpt-call-answer-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4), 
                0 0 0 0 rgba(99, 102, 241, 0.4);
    z-index: 20;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.mpt-call-answer-btn svg {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.mpt-call-answer-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateX(-50%) translateY(-4px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 70px rgba(99, 102, 241, 0.5), 
                0 0 0 12px rgba(99, 102, 241, 0.1);
}

.mpt-call-answer-btn:active:not(:disabled) {
    transform: translateX(-50%) translateY(-2px) scale(1.02);
}

.mpt-call-answer-btn.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(255, 255, 255, 0.3);
    animation: recordingPulse 2s ease-in-out infinite;
}

@keyframes recordingPulse {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(239, 68, 68, 0.4), 
                    0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 25px 70px rgba(239, 68, 68, 0.6), 
                    0 0 0 20px rgba(239, 68, 68, 0.2);
    }
}

.mpt-call-answer-btn.ready {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.4), 
                0 0 0 0 rgba(16, 185, 129, 0.4);
}

.mpt-call-answer-btn.ready:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateX(-50%) translateY(-4px) scale(1.05);
    box-shadow: 0 25px 70px rgba(16, 185, 129, 0.5), 
                0 0 0 12px rgba(16, 185, 129, 0.1);
}

.mpt-call-answer-btn.disabled {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    box-shadow: 0 20px 60px rgba(107, 114, 128, 0.3);
}

.mpt-call-answer-btn.disabled:hover {
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 20px 60px rgba(107, 114, 128, 0.3);
}

.mpt-btn-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mpt-btn-label-hidden {
    opacity: 0;
    pointer-events: none;
}

.mpt-control-spacer {
    width: 100px;
}

/* Old avatar container - hide */
.mpt-avatar-container {
    display: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    background: #ffffff;
    border-radius: var(--mpt-radius-lg);
    box-shadow: var(--mpt-shadow);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.mpt-avatar-container::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.mpt-avatar-container::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.mpt-avatar-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    z-index: 2;
}

.mpt-avatar {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3),
                0 0 0 8px rgba(99, 102, 241, 0.1),
                0 0 0 16px rgba(99, 102, 241, 0.05);
}

/* Avatar with Image Background */
.mpt-avatar.mpt-avatar-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mpt-avatar.mpt-avatar-image .mpt-avatar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 4px solid var(--mpt-button-color);
    opacity: 0;
    z-index: 3;
}

.mpt-avatar svg {
    color: #ffffff;
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Avatar ring animation for speaking */
.mpt-avatar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 4px solid var(--mpt-button-color);
    opacity: 0;
    z-index: 1;
}

.mpt-avatar.speaking {
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.5),
                0 0 0 0 rgba(99, 102, 241, 0.7),
                0 0 0 8px rgba(99, 102, 241, 0.1),
                0 0 0 16px rgba(99, 102, 241, 0.05);
    animation: avatarPulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.mpt-avatar.speaking ~ .mpt-avatar-ring {
    animation: ringExpand 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes avatarPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06);
    }
}

@keyframes ringExpand {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.mpt-examiner-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--mpt-text-primary);
    letter-spacing: 0.02em;
    position: relative;
    z-index: 2;
    padding: 8px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
}

/* Input area */
.mpt-input-area {
    padding: 24px;
    background: #ffffff;
    border-radius: var(--mpt-radius-lg);
    box-shadow: var(--mpt-shadow);
}

/* Timer display */
.mpt-timer-display {
    text-align: center;
    padding: 20px 28px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--mpt-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 16px;
    min-height: 80px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: var(--mpt-radius);
    border: 2px solid rgba(99, 102, 241, 0.15);
}

/* Compact Timer Display - Modern Design */
.mpt-timer-display-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--mpt-button-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 30px;
    border: 2px solid rgba(99, 102, 241, 0.15);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.mpt-timer-display-compact.visible {
    visibility: visible;
    opacity: 1;
}

.mpt-timer-display-compact svg {
    color: var(--mpt-button-color);
    flex-shrink: 0;
}

.mpt-timer-display-compact .mpt-timer-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--mpt-button-color);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    min-width: 40px;
    text-align: center;
}

.mpt-timer-display-compact.warning {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.12) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.mpt-timer-display-compact.warning svg,
.mpt-timer-display-compact.warning .mpt-timer-value {
    color: var(--mpt-danger);
    animation: pulseCompact 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseCompact {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.05);
    }
}

.mpt-timer-display.visible {
    visibility: visible;
    opacity: 1;
}

.mpt-timer-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    font-weight: 700;
    color: var(--mpt-text-tertiary);
}

.mpt-timer-value {
    font-size: 42px;
    font-weight: 800;
    color: var(--mpt-button-color);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
}

.mpt-timer-display.warning {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.mpt-timer-display.warning .mpt-timer-value {
    color: var(--mpt-danger);
    animation: pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.mpt-timer-display.warning .mpt-timer-label {
    color: #ef4444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.03);
    }
}

/* Text input wrapper */
.mpt-input-wrapper {
    position: relative;
}

/* Text input */
.mpt-text-input {
    width: 100%;
    padding: 18px 70px 18px 24px;
    border: 3px solid #e5e7eb;
    border-radius: var(--mpt-radius);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    background: var(--mpt-bg-secondary);
    color: var(--mpt-text-primary);
    line-height: 1.6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.mpt-text-input::placeholder {
    color: var(--mpt-text-tertiary);
    font-style: italic;
}

.mpt-text-input:focus {
    border-color: var(--mpt-button-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1),
                inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
}

.mpt-text-input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Send button */
.mpt-send-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: linear-gradient(135deg, var(--mpt-button-color) 0%, var(--mpt-button-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    /* Mobile touch optimizations */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mpt-send-btn svg {
    width: 20px;
    height: 20px;
    margin: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.mpt-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--mpt-button-hover) 0%, #4338ca 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.mpt-send-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.mpt-send-btn:disabled {
    background: var(--mpt-secondary);
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
    box-shadow: none;
}

/* Speech controls */
.mpt-speech-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mpt-answer-btn {
    padding: 20px 60px;
    background: linear-gradient(135deg, var(--mpt-button-color) 0%, var(--mpt-button-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    /* Mobile touch optimizations */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 72px;
    min-width: 260px;
}

.mpt-answer-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mpt-answer-btn:hover::before {
    width: 300px;
    height: 300px;
}

.mpt-answer-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--mpt-button-hover) 0%, #4338ca 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.mpt-answer-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.mpt-answer-btn:disabled {
    background: var(--mpt-secondary);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
    box-shadow: none;
}

.mpt-answer-btn.recording {
    background: linear-gradient(135deg, var(--mpt-danger) 0%, var(--mpt-danger-dark) 100%);
    animation: recordPulse 2s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

@keyframes recordPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
    }
    50% {
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.5),
                    0 0 0 12px rgba(239, 68, 68, 0.1);
    }
}


/* Completion message */
.mpt-completion-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-radius: var(--mpt-radius-xl);
    box-shadow: var(--mpt-shadow);
    z-index: 100;
}

.mpt-completion-icon {
    margin-bottom: 28px;
    display: inline-block;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.mpt-completion-icon svg {
    color: var(--mpt-success);
    stroke-width: 2.5;
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.3));
}

.mpt-completion-message p {
    font-size: 22px;
    color: var(--mpt-text-primary);
    line-height: 1.7;
    font-weight: 600;
    letter-spacing: -0.01em;
    max-width: 600px;
    margin: 0 auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mpt-download-btn {
    display: inline-block;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--mpt-success) 0%, #059669 100%);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Mobile touch optimizations */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.mpt-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Loading indicator */
.mpt-loading {
    display: inline-block;
    margin-left: 8px;
}

.mpt-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* ========================================================================
   RESPONSIVE DESIGN - Mobile Adaptations
   ======================================================================== */

@media (max-width: 768px) {
    /* Interview Layout - Stack Vertically */
    .mpt-interview-layout {
        flex-direction: column;
    }

    .mpt-examiner-panel {
        width: 100%;
        min-height: 280px;
    }

    .mpt-response-panel {
        width: 100%;
        padding: 24px 20px;
    }

    .mpt-timer-corner {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 14px;
    }

    .mpt-question-display {
        margin-bottom: 20px;
    }

    .mpt-current-question {
        font-size: 22px;
    }

    .mpt-answer-input {
        font-size: 16px;
        padding: 14px 18px;
    }

    .mpt-submit-answer {
        padding: 14px 28px;
        font-size: 15px;
    }

    /* Video Call Layout - Adjust for Mobile */
    .mpt-control-bar {
        display: none !important; /* Keep hidden on all devices */
    }

    .mpt-timer-badge {
        bottom: 20px;
        left: 20px;
        padding: 10px 18px;
        font-size: 16px;
    }
    
    .mpt-timer-badge svg {
        width: 12px;
        height: 12px;
    }

    .mpt-call-answer-btn {
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 110px;
        height: 110px;
        gap: 8px;
    }

    .mpt-call-answer-btn svg {
        width: 32px;
        height: 32px;
    }

    .mpt-btn-label {
        font-size: 12px;
    }

    .mpt-control-spacer {
        display: none;
    }

    .mpt-participant-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    .mpt-interface {
        padding: 16px;
        height: 90vh;
        max-height: 90vh;
        border-radius: var(--mpt-radius-lg);
    }

    .mpt-interface-header {
        padding: 16px 20px;
        margin-bottom: 16px;
    }

    .mpt-interface-header::before,
    .mpt-interface-header::after {
        display: none;
    }

    .mpt-examinee-name {
        font-size: 16px;
    }

    .mpt-progress-indicator {
        font-size: 12px;
        padding: 3px 10px;
    }

    /* Text Interface - Mobile: Avatar Behind Question */
    .mpt-question-container {
        padding: 32px 20px;
    }

    .mpt-question-content {
        flex-direction: column-reverse;
        gap: 0;
        position: relative;
    }

    .mpt-examiner-avatar {
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        height: 120px;
        opacity: 0.15;
        z-index: 1;
        box-shadow: none;
    }

    .mpt-question-bubble {
        position: relative;
        z-index: 2;
        margin-top: 80px;
        padding: 24px 28px;
        backdrop-filter: blur(20px);
    }

    .mpt-current-question {
        font-size: 18px;
        min-height: 50px;
    }

    .mpt-conversation-container {
        padding: 20px;
        margin-bottom: 16px;
    }

    .mpt-messages {
        gap: 20px;
    }

    .mpt-message-bubble {
        max-width: 85%;
        font-size: 15px;
        padding: 15px 20px;
    }

    .mpt-input-area {
        padding: 20px;
    }

    .mpt-timer-display {
        padding: 16px 20px;
        margin-bottom: 16px;
        min-height: 70px;
    }

    .mpt-timer-display-compact {
        padding: 8px 16px;
        margin-bottom: 12px;
        gap: 8px;
    }

    .mpt-timer-display-compact svg {
        width: 16px;
        height: 16px;
    }

    .mpt-timer-display-compact .mpt-timer-value {
        font-size: 20px;
        min-width: 35px;
    }

    .mpt-timer-value {
        font-size: 36px;
    }

    .mpt-text-input {
        font-size: 16px;
        padding: 16px 65px 16px 20px;
    }

    .mpt-send-btn {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
    }

    .mpt-avatar-container {
        padding: 40px 20px;
        margin-bottom: 16px;
    }

    .mpt-avatar-wrapper {
        width: 180px;
        height: 180px;
        margin-bottom: 20px;
    }

    .mpt-avatar {
        width: 140px;
        height: 140px;
        box-shadow: 0 6px 24px rgba(79, 70, 229, 0.3),
                    0 0 0 6px rgba(99, 102, 241, 0.1),
                    0 0 0 12px rgba(99, 102, 241, 0.05);
    }

    .mpt-avatar svg {
        width: 100px;
        height: 100px;
    }

    .mpt-avatar-ring {
        width: 140px;
        height: 140px;
    }

    .mpt-avatar.mpt-avatar-image .mpt-avatar-ring {
        width: 140px;
        height: 140px;
    }

    .mpt-avatar.speaking {
        box-shadow: 0 6px 24px rgba(79, 70, 229, 0.5),
                    0 0 0 0 rgba(99, 102, 241, 0.7),
                    0 0 0 6px rgba(99, 102, 241, 0.1),
                    0 0 0 12px rgba(99, 102, 241, 0.05);
    }

    .mpt-examiner-label {
        font-size: 17px;
        padding: 6px 20px;
    }

    .mpt-answer-btn {
        padding: 18px 48px;
        font-size: 16px;
        min-width: 240px;
        min-height: 64px;
    }

    .mpt-completion-message {
        padding: 60px 24px;
    }

    .mpt-completion-message p {
        font-size: 19px;
    }
    
}

@media (max-width: 480px) {
    .mpt-interface {
        padding: 12px;
        border-radius: var(--mpt-radius);
    }

    .mpt-interface-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .mpt-message-bubble {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .mpt-timer-value {
        font-size: 32px;
    }
    
    .mpt-avatar {
        width: 120px;
        height: 120px;
    }
    
    .mpt-avatar svg {
        width: 80px;
        height: 80px;
    }
}

/* Accessibility */
.mpt-interface button:focus-visible,
.mpt-interface textarea:focus-visible {
    outline: 3px solid var(--mpt-button-color);
    outline-offset: 3px;
}

/* Print styles */
@media print {
    .mpt-input-area,
    .mpt-timer-display,
    .mpt-interface-header {
        display: none;
    }
}
        width: 48px;
        height: 48px;
    }
    
    .mpt-completion-message p {
        font-size: 18px;
    }
    
    .mpt-timer-value {
        font-size: 32px;
    }
}

/* Accessibility */
.mpt-interface button:focus-visible,
.mpt-interface textarea:focus-visible {
    outline: 3px solid var(--mpt-button-color);
    outline-offset: 3px;
}

/* Print styles */
@media print {
    .mpt-input-area,
    .mpt-timer-display {
        display: none;
    }
}

/* ========================================
   Gateway Styles (Login & Instructions)
   ======================================== */

.mpt-gateway-container {
    max-width: 700px;
    margin: 60px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--mpt-text-primary);
    padding: 20px;
}

.mpt-gateway-content {
    background: var(--mpt-bg-primary);
    border-radius: var(--mpt-radius-lg);
    padding: 50px 48px;
    box-shadow: var(--mpt-shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mpt-gateway-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--mpt-button-color) 0%, #764ba2 100%);
}

.mpt-gateway-logo {
    margin-bottom: 36px;
}

.mpt-gateway-logo img {
    max-width: 300px;
    height: auto;
}

.mpt-gateway-welcome {
    margin-bottom: 36px;
}

.mpt-gateway-welcome p {
    font-size: 19px;
    color: var(--mpt-text-secondary);
    line-height: 1.7;
    font-weight: 450;
}

.mpt-gateway-login-form {
    margin-top: 36px;
}

.mpt-gateway-login-form form {
    text-align: left;
    max-width: 440px;
    margin: 0 auto;
}

.mpt-gateway-login-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--mpt-text-primary);
    font-size: 15px;
}

.mpt-gateway-login-form input[type="text"],
.mpt-gateway-login-form input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 3px solid var(--mpt-border);
    border-radius: var(--mpt-radius);
    font-size: 16px;
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--mpt-bg-secondary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.mpt-gateway-login-form input[type="text"]:focus,
.mpt-gateway-login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--mpt-button-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1),
                inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
}

.mpt-gateway-login-form input[type="submit"] {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--mpt-button-color) 0%, var(--mpt-button-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--mpt-radius);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.mpt-gateway-login-form input[type="submit"]:hover {
    background: linear-gradient(135deg, var(--mpt-button-hover) 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.mpt-gateway-login-form input[type="submit"]:active {
    transform: translateY(0);
}
}

.mpt-gateway-login-form input[type="submit"]:hover {
    background: linear-gradient(135deg, var(--mpt-button-hover) 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.mpt-gateway-login-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Access code gateway styles */
.mpt-gateway-access-code-form {
    margin-top: 36px;
}

.mpt-gateway-access-code-form .mpt-form-group {
    text-align: left;
    max-width: 440px;
    margin: 0 auto 24px;
}

.mpt-gateway-access-code-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--mpt-text-primary);
    font-size: 15px;
}

.mpt-gateway-access-code-form .mpt-input {
    width: 100%;
    padding: 14px 18px;
    border: 3px solid var(--mpt-border);
    border-radius: var(--mpt-radius);
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: monospace;
    font-weight: 700;
    background: var(--mpt-bg-secondary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    text-align: center;
}

.mpt-gateway-access-code-form .mpt-input:focus {
    outline: none;
    border-color: var(--mpt-button-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1),
                inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
}

.mpt-error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 3px solid var(--mpt-danger);
    border-radius: var(--mpt-radius);
    padding: 16px 20px;
    color: var(--mpt-danger-dark);
    font-size: 15px;
    margin-top: 16px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.mpt-gateway-submit {
    text-align: center;
    margin-top: 24px;
}

.mpt-gateway-success {
    margin-bottom: 36px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 3px solid var(--mpt-success);
    border-radius: var(--mpt-radius-lg);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.mpt-gateway-success h2 {
    font-size: 28px;
    color: var(--mpt-text-primary);
    margin-bottom: 12px;
    font-weight: 800;
}

.mpt-gateway-success p {
    font-size: 17px;
    color: var(--mpt-text-secondary);
    margin: 10px 0;
    font-weight: 500;
}

.mpt-expiry-notice {
    font-size: 14px !important;
    color: var(--mpt-text-tertiary) !important;
    margin-top: 12px !important;
    font-weight: 450 !important;
}

.mpt-gateway-instructions {
    margin: 36px 0;
    padding: 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: var(--mpt-radius-lg);
    text-align: left;
    border: 2px solid rgba(99, 102, 241, 0.1);
}

.mpt-gateway-instructions p {
    font-size: 17px;
    line-height: 1.9;
    color: var(--mpt-text-primary);
    font-weight: 450;
}

.mpt-gateway-start {
    margin-top: 36px;
}

.mpt-start-btn {
    padding: 20px 56px;
    background: linear-gradient(135deg, var(--mpt-button-color) 0%, var(--mpt-button-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 100px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    position: relative;
    overflow: hidden;
    /* Mobile touch optimizations */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    min-width: 48px;
}

.mpt-start-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.mpt-start-btn:hover::before {
    width: 300px;
    height: 300px;
}

.mpt-start-btn:hover {
    background: linear-gradient(135deg, var(--mpt-button-hover) 0%, #4338ca 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.mpt-start-btn:active {
    transform: translateY(0);
}

.mpt-test-interface-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

/* Responsive gateway styles */
@media (max-width: 768px) {
    .mpt-gateway-container {
        margin: 30px auto;
    }
    
    .mpt-gateway-content {
        padding: 36px 24px;
    }
    
    .mpt-gateway-logo img {
        max-width: 220px;
    }
    
    .mpt-gateway-welcome p {
        font-size: 17px;
    }
    
    .mpt-gateway-instructions {
        padding: 24px;
    }
    
    .mpt-gateway-instructions p {
        font-size: 16px;
    }
    
    .mpt-start-btn {
        padding: 18px 44px;
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .mpt-gateway-content {
        padding: 28px 20px;
    }
    
    .mpt-gateway-success {
        padding: 20px 24px;
    }
    
    .mpt-gateway-success h2 {
        font-size: 24px;
    }
    
    .mpt-start-btn {
        padding: 16px 36px;
        font-size: 16px;
    }
}

/* Pause functionality styles */
.mpt-pause-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1;
    /* Mobile touch optimizations */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    min-width: 44px;
}

.mpt-pause-btn:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.mpt-pause-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mpt-pause-btn:disabled:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.mpt-pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.97);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mpt-pause-content {
    background: white;
    border-radius: var(--mpt-radius-xl);
    padding: 70px 90px;
    text-align: center;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.4);
    max-width: 540px;
    position: relative;
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mpt-pause-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--mpt-button-color) 0%, #764ba2 100%);
    border-radius: var(--mpt-radius-xl) var(--mpt-radius-xl) 0 0;
}

.mpt-pause-content h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--mpt-text-primary);
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

.mpt-pause-timer {
    font-size: 19px;
    color: var(--mpt-text-secondary);
    margin-bottom: 36px;
    font-weight: 600;
}

.mpt-pause-timer span {
    display: block;
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--mpt-button-color) 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
    margin-top: 16px;
    text-shadow: 0 4px 8px rgba(99, 102, 241, 0.1);
}

.mpt-resume-btn {
    padding: 20px 56px;
    background: linear-gradient(135deg, var(--mpt-button-color) 0%, var(--mpt-button-hover) 100%);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    /* Mobile touch optimizations */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    min-width: 48px;
}

.mpt-resume-btn:hover {
    background: linear-gradient(135deg, var(--mpt-button-hover) 0%, #4338ca 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.mpt-resume-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .mpt-pause-content {
        padding: 50px 40px;
        margin: 20px;
    }
    
    .mpt-pause-content h2 {
        font-size: 28px;
    }
    
    .mpt-pause-timer span {
        font-size: 44px;
    }
    
    .mpt-resume-btn {
        padding: 18px 44px;
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .mpt-pause-content {
        padding: 40px 28px;
    }
    
    .mpt-pause-content h2 {
        font-size: 24px;
    }
    
    .mpt-pause-timer span {
        font-size: 36px;
    }
    
    .mpt-resume-btn {
        padding: 16px 36px;
        font-size: 16px;
    }
}

.mpt-resume-notification {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: linear-gradient(135deg, var(--mpt-success) 0%, #059669 100%);
    color: white;
    padding: 24px 48px;
    border-radius: var(--mpt-radius-lg);
    font-size: 19px;
    font-weight: 700;
    z-index: 10001;
    box-shadow: 0 12px 48px rgba(16, 185, 129, 0.4);
    display: none;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    will-change: transform;
    white-space: nowrap;
    transition: opacity 0.2s ease-in-out;
}
