/* Styles personnalisés pour l'application */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Responsive improvements */
@media (max-width: 768px) {
    /* Mobile menu animations */
    #mobile-menu {
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Make tables scrollable on mobile */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Adjust padding on mobile */
    .max-w-7xl {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Navigation improvements */
    nav .max-w-7xl {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Smaller cards on mobile */
    .stat-card {
        padding: 1rem !important;
    }
    
    .stat-card .text-5xl {
        font-size: 2rem !important;
    }
    
    .stat-card .text-3xl {
        font-size: 1.5rem !important;
    }
    
    /* Main content cards */
    .bg-white.rounded-3xl {
        padding: 1rem !important;
        border-radius: 1.5rem !important;
    }
    
    /* Responsive titles */
    h2.text-4xl {
        font-size: 1.75rem !important;
    }
    
    h3.text-2xl {
        font-size: 1.25rem !important;
    }
}

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

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

@keyframes flip {
    0% {
        transform: rotateY(0);
    }
    100% {
        transform: rotateY(180deg);
    }
}

.view-container {
    animation: fadeIn 0.5s ease-out;
}

.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Flashcards */
.flashcard {
    perspective: 1000px;
    cursor: pointer;
    margin: 0 auto 30px;
    max-width: 600px;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 400px;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.flashcard-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.flashcard-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: rotateY(180deg);
}

.flashcard-word {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.flashcard-emoji {
    font-size: 6rem;
    margin-bottom: 20px;
}

.flashcard-translation {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.flashcard-phonetic {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.flashcard-example {
    font-size: 1.3rem;
    font-style: italic;
    opacity: 0.95;
    margin-top: 20px;
}

.flashcard-category {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.3);
}

/* Boutons de réponse */
.answer-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.answer-btn {
    padding: 15px 40px;
    font-size: 1.5rem;
    border-radius: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.answer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-know {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-learn {
    background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
    color: white;
}

/* Quiz */
.quiz-question {
    margin-bottom: 40px;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.quiz-option {
    padding: 30px;
    font-size: 1.5rem;
    border-radius: 15px;
    border: 3px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.quiz-option:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.quiz-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.quiz-option.correct {
    border-color: #10b981;
    background: linear-gradient(135deg, #10b981 0%, #38ef7d 100%);
    color: white;
}

.quiz-option.incorrect {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ef4444 0%, #fc4a1a 100%);
    color: white;
}

/* Badges */
.badge-item {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.badge-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(253, 203, 110, 0.5);
}

.badge-item.locked {
    background: linear-gradient(135deg, #dfe6e9 0%, #b2bec3 100%);
    opacity: 0.6;
}

.badge-emoji {
    font-size: 3rem;
    margin-bottom: 10px;
}

.badge-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.badge-description {
    font-size: 0.9rem;
    color: #2d3436;
}

/* Catégories */
.category-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-progress-bar {
    height: 12px;
    border-radius: 10px;
    background: #e2e8f0;
    overflow: hidden;
    margin-top: 10px;
}

.category-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .flashcard-word {
        font-size: 3rem;
    }
    
    .flashcard-emoji {
        font-size: 4rem;
    }
    
    .flashcard-translation {
        font-size: 2rem;
    }
    
    .answer-btn {
        padding: 12px 30px;
        font-size: 1.2rem;
    }
    
    .quiz-option {
        padding: 20px;
        font-size: 1.2rem;
    }
}

/* Messages d'encouragement */
.encouragement {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 20px 0;
    animation: pulse 2s infinite;
}

/* Loading spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}
