/* ===== CUSTOM CSS FOR EDUGEST QUIZ ===== */

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    /* Spacing */
    --border-radius: 15px;
    --border-radius-lg: 20px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-family: 'Poppins', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--primary-gradient);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--dark-color);
}

/* ===== LOADING SCREEN ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: white;
}

/* ===== HEADER SECTION ===== */
.header-section {
    background: var(--primary-gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.brand-logo {
    position: relative;
    z-index: 2;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.brand-subtitle {
    font-size: 1.1rem;
    font-weight: var(--font-weight-normal);
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    position: relative;
    z-index: 1;
}

/* ===== QUIZ CARD ===== */
.quiz-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    border: none;
    transition: all var(--transition-normal);
    animation: slideInUp 0.6s ease-out;
    overflow: hidden;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in { animation: fadeIn var(--transition-slow) ease-in; }

/* ===== WELCOME SCREEN ===== */
.welcome-content {
    max-width: 600px;
    margin: 0 auto;
}

.welcome-icon {
    animation: bounce 2s infinite;
}

.welcome-title {
    color: var(--dark-color);
    font-weight: var(--font-weight-semibold);
    font-size: 1.8rem;
    line-height: 1.3;
}

.welcome-description {
    color: #6c757d;
    font-size: 1.1rem;
}

.benefits-grid {
    text-align: left;
}

.benefit-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    transition: all var(--transition-normal);
    font-weight: var(--font-weight-medium);
}

.benefit-item:hover {
    transform: translateX(5px);
    color: var(--primary-color);
}

.start-quiz-btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.start-quiz-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.trust-indicators {
    margin-top: 1.5rem;
}

/* ===== PROGRESS SECTION ===== */
.progress-section {
    margin-bottom: 2rem;
}

.progress-bar-container {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
    background: var(--primary-gradient);
    height: 100%;
}

.question-badge {
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-weight: var(--font-weight-medium);
    font-size: 0.9rem;
}

/* ===== QUESTION SECTION ===== */
.question-container {
    animation: fadeIn var(--transition-slow) ease-in;
}

.question-title {
    color: var(--dark-color);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 2rem;
    font-size: 1.4rem;
    line-height: 1.4;
}

.options-container {
    margin-bottom: 2rem;
}

.answer-option {
    background: var(--light-color);
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.2rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.answer-option:hover::before {
    left: 100%;
}

.answer-option:hover {
    background: #e3f2fd;
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.answer-option.selected {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.answer-option i {
    font-size: 1.5rem;
    margin-right: 1rem;
    min-width: 30px;
    text-align: center;
}

.answer-text {
    flex: 1;
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
}

/* ===== NAVIGATION BUTTONS ===== */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.btn {
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-normal);
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-success {
    background: var(--success-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.6);
}

.btn-warning {
    background: var(--warning-gradient);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
    background: #6c757d;
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    background: var(--primary-color);
    color: white;
}

/* ===== RESULTS SECTION ===== */
.results-content {
    max-width: 700px;
    margin: 0 auto;
}

.result-icon {
    animation: pulse 2s infinite;
}

.results-title {
    color: var(--dark-color);
    font-weight: var(--font-weight-semibold);
    font-size: 1.8rem;
}

.recommendation-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.feature-list {
    text-align: left;
    margin: 1.5rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.feature-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
    min-width: 20px;
}

/* ===== CTA SECTION ===== */
.cta-section {
    margin-top: 3rem;
}

.cta-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.contact-info-card {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    margin-top: 2rem;
}

.contact-title {
    color: var(--dark-color);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    font-weight: var(--font-weight-medium);
}

.restart-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

/* ===== FOOTER SECTION ===== */
.footer-section {
    background: #2c3e50;
    color: white;
    margin-top: auto;
}

.footer-text {
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
}

.footer-subtext {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .brand-title {
        font-size: 2rem;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .quiz-card .card-body {
        padding: 2rem 1.5rem;
    }
    
    .question-title {
        font-size: 1.2rem;
    }
    
    .answer-option {
        padding: 1rem;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .cta-buttons-container {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons-container .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .welcome-title {
        font-size: 1.3rem;
    }
    
    .quiz-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .start-quiz-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--box-shadow);
}

.shadow-custom-hover:hover {
    box-shadow: var(--box-shadow-hover);
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.answer-option:focus,
.btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .answer-option {
        border-width: 3px;
    }
    
    .answer-option.selected {
        border-width: 4px;
    }
}

