* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8a2be2;
    --secondary-color: #6a1b9a;
    --third-color:rgb(207, 136, 248);
    --accent-color: #ffd700;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --shadow-light: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-heavy: 0 15px 35px rgba(31, 38, 135, 0.5);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Floating Home Button */
.home-btn {
  position: fixed;
  left: 24px;
  bottom: 40px;
  width: 50px;
  height: 50px;
  background: rgb(104, 2, 104);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px hsl(var(--primary) / 0.5);
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 15%;
    animation-delay: -2s;
}

.floating-element:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: -4s;
}

.floating-element:nth-child(4) {
    width: 40px;
    height: 40px;
    top: 30%;
    right: 30%;
    animation-delay: -1s;
}

.floating-element:nth-child(5) {
    width: 70px;
    height: 70px;
    bottom: 40%;
    right: 10%;
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.arabic-text {
    font-family: 'Amiri', 'Arabic UI Display', Tahoma, Arial, sans-serif;
    font-size: 1.5rem;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Floating Fullscreen Button */
.fullscreen-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-heavy);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
}

.fullscreen-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.8);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.fullscreen-btn:active {
    transform: scale(0.95);
}

/* Section principale */
.question-count-section {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 3rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-heavy);
    animation: slideUp 0.8s ease-out;    
    color: #f9c74f;
    border-radius: 1.5rem;
    max-width: 100%;
    margin: auto ;
    margin-bottom: 20px;
    font-family: "Segoe UI", sans-serif;
}

/* Titre et description */
.question-count-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #fcbf49;
}

.question-count-header p {
    font-size: 1rem;
    color: #ffe8a1;
    margin-bottom: 1.5rem;
}

/* Options */
.question-count-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Boutons */
.count-btn {
    background: var(--glass-bg);
    border: 2px solid #f9c74f;
    color: #f9c74f;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.count-btn:hover {
    background: #5a189a;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(249, 199, 79, 0.5);
}

.count-btn.active {
    background: #f9c74f;
    color: #3b0a45;
    font-weight: bold;
}

/* Texte dans les boutons */
.count-number {
    font-size: 1.4rem;
    display: block;
}

.count-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Mode Selection Enhanced */
.mode-selection {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 3rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-heavy);
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-header {
    margin-bottom: 2.5rem;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.logo {
    font-size: 3.5rem;
    display: block;
    animation: logoRotate 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--accent-color), transparent);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes logoRotate {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.05); }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.1; }
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1rem;
    background: linear-gradient(145deg, #e3ee7e, #841fe4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Difficulty Levels Styling - Desktop Optimized */
.difficulty-levels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.difficulty-section {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.difficulty-section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.difficulty-header {
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.difficulty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 2rem;
    margin-bottom: 0.3rem;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}
/* Couleurs selon le niveau */
.difficulty-icon.beginner {
    background: linear-gradient(135deg, #6fcf97, #27ae60); /* vert dégradé */
}

.difficulty-icon.intermediate {
    background: linear-gradient(135deg, #f2c94c, #f2994a); /* jaune/orange dégradé */
}

.difficulty-icon.advanced {
    background: linear-gradient(135deg, #eb5757, #c0392b); /* rouge dégradé */
}

/* Petit effet au survol */
.difficulty-icon:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.difficulty-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.difficulty-header .debuant, .Intermediaire{
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
    color: #cf9df0;
}
.perfect {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
  color: rgb(68, 0, 255);
  font-weight: bold; /* optionnel : mettre en valeur */
}


.difficulty-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Mode Buttons */
.mode-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-family: inherit;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: var(--accent-color);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.3);
}

.mode-btn .mode-icon {
    font-size: 1.8rem;
    margin-right: 1rem;
}

.mode-btn .mode-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.mode-btn:hover .mode-arrow {
    transform: translateX(5px);
}

/* Sourate Selector */
.sourate-selector {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    margin-top: 2rem;
    animation: slideUp 0.5s ease-out;
}

.selector-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

#sourate-select {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

#sourate-select option {
    background: #1a1a2e;
    color: var(--text-primary);
}

.selector-buttons {
    display: flex;
    gap: 1rem;
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.start-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.4);
}

/* Desktop Layout - 3 columns side by side */
@media (min-width: 1200px) {
    .container {
        max-width: 1600px;
        padding: 2rem 4rem;
    }
    
    .mode-selection {
        padding: 2rem;
        min-height: calc(100vh - 4rem);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .welcome-header {
        margin-bottom: 2rem;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    .difficulty-levels {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        align-items: stretch;
    }
    
    .difficulty-section {
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .difficulty-header {
        margin-bottom: 1rem;
    }
    
    .difficulty-icon {
        font-size: 2rem;
    }
    
    .difficulty-header h3 {
        font-size: 1.3rem;
    }
    
    .difficulty-options {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .mode-btn {
        padding: 1.2rem;
        font-size: 1rem;
        flex: 1;
        min-height: auto;
    }
    
    .mode-icon {
        font-size: 1.5rem;
    }
}

/* Quiz Game Styles */
.quiz-game {
    animation: slideUp 0.8s ease-out;
}

.quiz-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1200px) {
    .quiz-layout {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

.quiz-left, .quiz-right {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
}

/* Quiz Header */
.quiz-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.back-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateX(-3px);
}

.progress-section {
    text-align: center;
}

.progress-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.5s ease;
    border-radius: 4px;
}

.score-section {
    text-align: center;
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.score-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* Verse Display */
.verse-original, .verse-hidden {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.verse-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.verse-decoration {
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.verse-header h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--accent-color);
}

#verse-arabic {
    font-size: 1.8rem;
    line-height: 2;
    margin-bottom: 1rem;
    text-align: center;
}

.verse-info {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.hidden-message {
    text-align: center;
}

.hidden-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hidden-hint {
    margin-top: 1rem;
    font-style: italic;
    opacity: 0.8;
}

/* Translation */
.translation {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.translation-header h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* Correct Answer */
.correct-answer {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.answer-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.answer-header h4 {
    margin: 0;
    color: #ef4444;
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.reset-btn, .next-btn {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.reset-btn {
    background: rgba(249, 199, 79, 0.2);
    color: #f9c74f;
    border: 1px solid rgba(249, 199, 79, 0.3);
}

.reset-btn:hover {
    background: rgba(249, 199, 79, 0.3);
    transform: translateY(-2px);
}

.next-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.4);
}

/* Word Sorting */
.word-sorting {
    margin-bottom: 2rem;
}

.sorting-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sorting-header h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.drag-instruction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0.8;
}

.word-area h4 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
    color: var(--accent-color);
}

.drop-zone, .shuffled-words {
    min-height: 120px;

    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    /* Alignement corrigé */
    justify-content:flex-end; /* aligne les items à droite */
    align-items: flex-end;     /* aligne les items en bas de la ligne */
    align-content: flex-end;   /* aligne les lignes en bas si plusieurs lignes */
    transition: all 0.3s ease;
}

    .drop-zone {
    direction: rtl; /* met le flux texte et les items de droite à gauche */
    justify-content: flex-start; /* avec direction rtl, "start" = droite */
}



.drop-zone.drag-over {
    background: rgba(138, 43, 226, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

.word-card {
    background: linear-gradient(45deg, var(--primary-color), var(--third-color));
   
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: grab;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.word-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.4);
}

.word-card:active {
    cursor: grabbing;
    transform: rotate(5deg);
}

.word-text {
    font-family: 'Amiri', serif;
    font-size: 1.9rem;
    font-weight: 600;
}

/* Help Buttons */
.help-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.help-btn {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Check Button */
.check-btn {
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(45deg, var(--success-color), #16a34a);
    border: none;
    color: white;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.check-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

/* Feedback Page */
.feedback-page {
    animation: slideUp 0.8s ease-out;
}

.feedback-container {
    max-width: 1000px;
    margin: 0 auto;
}

.feedback-header {
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 3rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-heavy);
    margin-bottom: 2rem;
}

.trophy-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.trophy {
    font-size: 5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

.trophy-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--accent-color),
        transparent,
        var(--primary-color),
        transparent
    );
    border-radius: 50%;
    opacity: 0.3;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.feedback-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.completion-message {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.final-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.completion-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat:nth-child(1) .stat-value { color: var(--success-color); }
.stat:nth-child(2) .stat-value { color: var(--accent-color); }
.stat:nth-child(3) .stat-value { color: #8b5cf6; }

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Detailed Feedback */
.feedback-details {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.feedback-details h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--accent-color);
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.answer-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border-left: 4px solid;
}

.answer-item.correct {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), var(--glass-bg));
}

.answer-item.incorrect {
    border-left-color: var(--error-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), var(--glass-bg));
}

.answer-header-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.answer-status {
    font-size: 1.5rem;
}

.answer-info {
    flex: 1;
}

.answer-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.answer-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.answer-content {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.translation-text, .correct-text, .user-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.75rem;
}

.translation-text .label {
    color: #fbbf24;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.correct-text .label {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.user-text {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.user-text .label {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.answer-points {
    text-align: right;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.answer-points.correct { color: var(--success-color); }
.answer-points.incorrect { color: var(--error-color); }

/* Performance Summary */
.performance-summary {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.performance-summary h4 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid;
}

.summary-item.correct {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.summary-item.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.summary-item.accuracy {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

.summary-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.summary-item.correct .summary-value { color: var(--success-color); }
.summary-item.incorrect .summary-value { color: var(--error-color); }
.summary-item.accuracy .summary-value { color: #8b5cf6; }

.summary-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Feedback Actions */
.feedback-actions {
    text-align: center;
}

.new-quiz-btn {
    padding: 1.5rem 3rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.new-quiz-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
}

.btn-glow {
    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.5s ease;
}

.new-quiz-btn:hover .btn-glow {
    left: 100%;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-light);
    animation: slideInRight 0.3s ease-out;
    pointer-events: auto;
    max-width: 300px;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .quiz-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quiz-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .completion-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .fullscreen-btn {
        width: 56px;
        height: 56px;
        right: 16px;
        bottom: 16px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }
.visible { display: block !important; }



 