/**
 * Frontend CSS for French Assessment Plugin
 */

/* Base styles */
.french-assessment-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Assessment Header */
.assessment-header {
    text-align: center;
    margin-bottom: 3rem;
}

.assessment-logo i {
    color: #3B82F6;
    text-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.assessment-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #003366, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.assessment-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* CEFR Level Badges */
.cefr-levels {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cefr-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.cefr-badge:hover {
    transform: scale(1.05);
}

/* Assessment Options Grid */
.assessment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Assessment Cards */
.assessment-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border-left: 4px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.assessment-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.assessment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.assessment-card:hover::before {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
}

/* Assessment Icons */
.assessment-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    position: relative;
    transition: all 0.3s ease;
}

.assessment-card:hover .assessment-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Duration Badge */
.assessment-duration {
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Assessment Features */
.assessment-features {
    margin: 2rem 0;
}

.assessment-features .flex {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.assessment-features i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Start Assessment Button */
.start-assessment-btn {
    width: 100%;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.start-assessment-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.start-assessment-btn:hover::before {
    left: 100%;
}

.start-assessment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

/* Assessment Info Section */
.assessment-info {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-top: 3rem;
    border: 1px solid #e5e7eb;
}

.info-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    transition: transform 0.3s ease;
}

.assessment-info:hover .info-icon {
    transform: scale(1.05);
}

/* Progress Section */
.assessment-progress {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-bar-container {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #3B82F6, #1D4ED8);
    position: relative;
}

.progress-bar::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: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Assessment Controls */
.assessment-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.timer-display {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.timer-pulse {
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Question Container */
.question-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
}

/* Question Header */
.question-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

/* Question Context */
.question-context {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #3b82f6;
    position: relative;
}

.question-context::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
}

/* Question Options */
.question-options {
    margin: 1.5rem 0;
}

.question-option {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.question-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.3s ease;
}

.question-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.question-option:hover::before {
    left: 100%;
}

.question-option input[type="radio"] {
    margin-right: 1rem;
    transform: scale(1.3);
    accent-color: #3b82f6;
}

.question-option input[type="radio"]:checked + .option-text {
    color: #1d4ed8;
    font-weight: 600;
}

.question-option.selected {
    border-color: #3b82f6;
    background: #f0f9ff;
}

/* Navigation Buttons */
.question-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #f3f4f6;
}

.nav-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.nav-button::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.4s ease;
}

.nav-button:hover::before {
    left: 100%;
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.nav-button-prev {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.nav-button-prev:hover:not(:disabled) {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.nav-button-next {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.nav-button-next:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Results Styles */
.results-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.level-result {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f9fafb, #ffffff);
    border-radius: 0.75rem;
}

.level-badge {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
}

.level-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: inherit;
    pointer-events: none;
}

/* Level Badge Colors */
.level-badge-a1 { background: linear-gradient(135deg, #10B981, #059669); }
.level-badge-a2 { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.level-badge-b1 { background: linear-gradient(135deg, #EAB308, #CA8A04); }
.level-badge-b2 { background: linear-gradient(135deg, #F97316, #EA580C); }
.level-badge-c1 { background: linear-gradient(135deg, #EF4444, #DC2626); }
.level-badge-c2 { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }

/* Results Statistics */
.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-stat {
    background: linear-gradient(135deg, #f9fafb, #ffffff);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease;
}

.result-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Email Form */
.email-form {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
    border: 1px solid #bae6fd;
}

.email-form h3 {
    color: #0c4a6e;
    margin-bottom: 1rem;
}

.email-form input {
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.email-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.email-form button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.email-form button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.email-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cta-button.secondary {
    background: linear-gradient(135deg, #10b981, #059669);
}

.cta-button.secondary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6b7280;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skill Badges */
.skill-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    margin: 0 0.25rem;
}

.skill-grammar { background: linear-gradient(135deg, #10B981, #059669); }
.skill-vocabulary { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.skill-reading { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.skill-cultural { background: linear-gradient(135deg, #F97316, #EA580C); }
.skill-listening { background: linear-gradient(135deg, #6366F1, #4F46E5); }

/* Responsive Design */
@media (max-width: 768px) {
    .french-assessment-container {
        padding: 1rem;
    }
    
    .assessment-title {
        font-size: 2rem;
    }
    
    .assessment-subtitle {
        font-size: 1.125rem;
    }
    
    .assessment-options {
        grid-template-columns: 1fr;
    }
    
    .cefr-levels {
        justify-content: center;
    }
    
    .cefr-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .question-container {
        padding: 1.5rem;
    }
    
    .question-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-button {
        width: 100%;
        justify-content: center;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .email-form > div {
        flex-direction: column;
    }
    
    .email-form input,
    .email-form button {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .level-badge {
        font-size: 1.5rem;
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .assessment-card {
        padding: 1.5rem;
    }
    
    .assessment-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .question-option {
        padding: 0.75rem;
    }
    
    .question-option input[type="radio"] {
        transform: scale(1.1);
    }
    
    .assessment-progress {
        padding: 1rem;
    }
    
    .level-badge {
        font-size: 1.25rem;
        padding: 0.5rem 1rem;
    }
}

/* Print Styles */
@media print {
    .navigation-buttons,
    .cta-buttons,
    .email-form {
        display: none !important;
    }
    
    .french-assessment-container {
        max-width: none;
        padding: 0;
    }
    
    .assessment-card,
    .question-container,
    .results-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .assessment-card {
        border: 2px solid #000;
    }
    
    .question-option {
        border: 2px solid #000;
    }
    
    .question-option:hover {
        border-color: #000;
        background: #f0f0f0;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}