/* Variables CSS */
:root {
    --primary-color: #FFFFFF;
    --secondary-color: #8B5CF6;
    --accent-color: #FFCC00;
    --success-color: #10B981;
    --error-color: #EF4444;
    --background-color: #FFFFFF;
    --text-color: #0061A2;
    --text-color-black: #000000;
    --card-bg: rgba(30, 41, 59, 0.7);
}
/* Design moderne et épuré */

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}



header, footer {
    width: 100%;
    padding: 20px;
    background-color: var(--primary-color);
    color: var(--background-color);
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header {
    border-radius: 8px;
}

main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

button {
    background: var(--accent-color);
    color: var(--background-color);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: var(--secondary-color);
}



/* Boutons de réponse améliorés */
.answer-button {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.answer-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        #059669,
        transparent
    );
    transition: 0.6s;
}

.answer-button:hover {
    transform: translateY(-2px);
    color: black;
    box-shadow: 
    0 8px 20px #059669,
    0 0 0 0 1px #7ff8d2;
}

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

.answer-button.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    box-shadow: 
        0 8px 20px #ffcc00,
        inset 0 0 0 1px #ffcc00;
}

.answer-button.correct {
    background: #059669;
   
    
}

.answer-button.wrong {
    background: linear-gradient(135deg, #DC2626, var(--error-color));
    border: none;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}




/* Stats Cards */
.stats-card {
    background: var(--background-color);
    border-radius: 20px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-value {
    font-size: 3rem;
    font-weight: bold;
    background: var(--text-color);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Feedback messages améliorés */
.feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 12px;
    background: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--success-color);
    font-weight: 500;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    animation: slideIn 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* Loader amélioré */
.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}

.loader:before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid transparent;
    border-right-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.75s linear infinite reverse;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Animation de pulse pour le texte de chargement */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.animate-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Points perdus animation */
.points-lost {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--error-color);
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    z-index: 1000;
    pointer-events: none;
}

/* Animation pour les points perdus */
@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -100%);
    }
}

.points-lost.animate__fadeOutUp {
    animation: fadeOutUp 1s ease-out forwards;
}





@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Animations */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

/* Responsive design amélioré */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .glass-effect {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .answer-button {
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    .stats-value {
        font-size: 2.5rem;
    }
}

/* Styles pour le modal */
.modal-overlay {
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

/* Animation pour le modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#signup-modal .glass-effect {
    animation: modalFadeIn 0.3s ease forwards;
}

/* Style des inputs */
.modal-input {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.4);
    transition: all 0.3s ease;
}

.modal-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Animation du bouton submit */
.submit-button {
    position: relative;
    overflow: hidden;
}

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

.submit-button:hover::after {
    left: 100%;
}

/* Reward markers and tooltips */
.reward-marker {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
}

.reward-marker:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.tooltip-text {
    visibility: hidden;
    width: max-content;
    background-color: var(--background-color);
    color: var(--text-color);
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--background-color) transparent transparent transparent;
}

/* Styles pour le modal de téléphone */
#phoneModal,#otp-modal {
    background-color: rgba(0, 0, 0, 0.7);
}

#phoneModal .bg-white,#otp-modal .bg-white {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 24px;
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#phoneModal h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

#phoneModal input {
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    margin-bottom: 16px;
}

#phoneModal button ,#submit-otp {
    background-color: var(--accent-color);
    color: var(--background-color);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: center;
}

#phoneModal button:hover,#submit-otp:hover {
    background-color: var(--secondary-color);
}

/* Modal */
.modal,.modal2 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active ,.modal2.active {
    display: flex;
}



:root {
    --primary-color: #ffffff;
    --secondary-color: #8b5cf6;
    --accent-color: #ffcc00;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background-color: #ffffff;
    --text-color: #0061A2;
    --text-color-black: #000000;
    --card-bg: rgba(30, 41, 59, 0.7);
  }
  .bluetext
  {
    color: --text-color;
  }

  #question-container {
    color: var(--text-color);
  }
  body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: "Inter", sans-serif;
  }

  .progress-bar {
    background-color: #ffcc00;
  }

  .cta-button {
    background: var(--accent-color);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
  }

  .cta-button:hover {
    background: var(--primary-color);
    color: --text-color;
    transform: scale(1.1);
  }



  .glass-effect {
    background: #dff2ff;

    border-radius: 12px;
  }

  /* Progrès de la barre */
  .progress-bar {
    background-color: #ffcc00;
  }

  /* Réponses */
  #answers-container button {
    padding: 0.5rem;
    border: 2px solid var(--gray-800);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color-black);
    transition: all 0.3s ease;
  }

  #answers-container button:hover {
   
    color:var(--text-color);
  }

  /* Question Suivante */
  #next-question-btn {
    background: var(--text-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
   
    transition: all 0.3s ease;
  }

  #next-question-btn:hover:not([disabled]) {
    background: var(--primary-color);
    transform: scale(1.1);
  }

  .scrore-progress-bar-2
  {
    border: 2px solid var(--accent-color);
  }

  .progress-bar-2
  {
    border: 1px solid var(--text-color);
  }