@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;700&display=swap');

.fc-wrap { max-width: 500px; margin: 20px auto; padding: 15px; font-family: 'Baloo 2', cursive; background-color: #f0f8ff; border-radius: 25px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); border: 5px solid #fff; position: relative; overflow: hidden; }
.fc-wrap::before, .fc-wrap::after { content: ''; position: absolute; border-radius: 50%; opacity: 0.5; z-index: -1; }
.fc-wrap::before { top: -50px; left: -50px; width: 100px; height: 100px; background: #ffc107; }
.fc-wrap::after { bottom: -60px; right: -40px; width: 120px; height: 120px; background: #4caf50; transform: rotate(30deg); }
.fc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 10px; position: relative; z-index: 2; flex-shrink: 0; flex-wrap: wrap; }
.fc-title { font-size: 18px; color: #ff5722; font-weight: 700; margin: 0; flex-grow: 1; }
.fc-meta-controls { display: flex; align-items: center; gap: 15px; }
.fc-lang-switcher { border-radius: 15px; border: 1px solid #ddd; padding: 5px; font-family: inherit; font-size: 14px; background-color: #fff; }
.fc-progress, .fc-star-counter { display: flex; align-items: center; background: #fff; padding: 5px 15px; border-radius: 20px; font-size: 16px; font-weight: 700; color: #555; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); }
.fc-star-counter { color: #ff9800; }
.fc-star-counter .star-icon { width: 24px; height: 24px; fill: currentColor; margin-right: 5px; }
.fc-card { position: relative; perspective: 1500px; width: 100%; height: 320px; }
.fc-inner { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; }
.fc-inner.flipped { transform: rotateY(180deg); }
.fc-face { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 20px; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15); font-size: 24px; text-align: center; padding: 10px; overflow: hidden; }
.fc-front { background: linear-gradient(135deg, #81d4fa, #4fc3f7); color: #fff; }
.fc-back { background: linear-gradient(135deg, #a5d6a7, #81c784); color: #fff; transform: rotateY(180deg); }
.fc-content-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; overflow: hidden; padding: 10px; box-sizing: border-box; }
.fc-image-container { width: 100%; height: auto; max-height: 100%; display:flex; align-items: center; justify-content: center; }
.fc-image-container img { max-width: 100%; max-height: 100%; border-radius: 15px; object-fit: contain; }
.fc-text-content { flex-grow: 1; display: flex; align-items: center; justify-content: center; width: 100%; }
.fc-text-content span { display: block; max-width: 100%; word-break: break-word; }
.fc-audio-play-btn { background: #ffc107; border: none; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 8px rgba(0,0,0,0.2); transition: transform 0.2s; flex-shrink: 0; }
.fc-audio-play-btn:hover { transform: scale(1.1); }
.fc-audio-play-btn svg { width: 24px; height: 24px; fill: #fff; margin-left: 4px; }
.fc-back-content .fc-back-row { display: flex; align-items: center; justify-content: space-between; width: 90%; margin: 5px 0; font-size: 22px; gap: 15px; }
.fc-back-content .fc-back-row span { flex-grow: 1; text-align: left; }
.fc-main-content { display: flex; flex-direction: column; }
.fc-nav-btns { display: flex; justify-content: space-around; align-items: center; margin-top: 20px; flex-shrink: 0; }
.fc-btn { padding: 10px 20px; border: none; border-radius: 30px; cursor: pointer; font-size: 16px; font-weight: 700; transition: all .3s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Baloo 2', cursive; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-bottom: 4px solid rgba(0,0,0,0.2); }
.fc-btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.fc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.fc-btn svg { width: 24px; height: 24px; fill: currentColor; }
.fc-prev, .fc-next { background: #2196f3; color: white; }
.fc-flip { background: #ff9800; color: white; }
.fc-quiz, .fc-quiz-restart { background: #9c27b0; color: white; }
.fc-quiz-exit, .fc-back-flashcard { background: #78909c; color: white; }
.fc-quiz-exit { padding: 8px 15px; }
.fc-quiz-next { background: #4caf50; color: white; }
.fc-mode-switcher { text-align: center; margin-top: 15px; flex-shrink: 0; }
.fc-quiz-mode, .fc-quiz-results { padding: 15px; position: relative; z-index: 2; display: flex; flex-direction: column; }
.fc-quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fc-quiz-progress { font-size: 16px; font-weight: 700; background: #fff; padding: 5px 15px; border-radius: 20px; color: #555; }
.quiz-question-image { max-width: 100%; max-height: 200px; border-radius: 15px; object-fit: contain; margin-bottom: 10px; }
.fc-quiz-question { font-size: 20px; margin-bottom: 15px; padding: 15px; background: #fff; border-radius: 15px; text-align: center; color: #333; border: 3px dashed #4fc3f7; min-height: 150px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.fc-quiz-question span { display: block; max-width: 100%; word-break: break-word; }
.fc-quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; }
.fc-quiz-option { padding: 10px 15px; border: 3px solid transparent; border-radius: 15px; background: #fff; cursor: pointer; font-size: 16px; text-align: left; transition: all .3s; font-weight: 700; box-shadow: 0 4px 10px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 10px; }
.fc-quiz-option:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.quiz-option-number { background-color: #ffc107; color: white; border-radius: 50%; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; }
.fc-quiz-option.correct { border-color: #8bc34a !important; background: #f1f8e9 !important; color: #33691e !important; }
.fc-quiz-option.wrong { border-color: #f44336; background: #ffebee; color: #b71c1c; opacity: 0.7; }
.fc-quiz-option:disabled { cursor: not-allowed; }
.fc-quiz-option:disabled:not(.correct) { background: #f5f5f5; color: #9e9e9e; }
.fc-quiz-results h3 { text-align: center; font-size: 32px; color: #009688; margin-bottom: 20px; }
.fc-summary { display: flex; gap: 20px; justify-content: center; margin: 20px 0; }
.fc-stat { padding: 15px 25px; border-radius: 15px; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.fc-stat.correct { background: #e8f5e9; color: #2e7d32; }
.fc-stat.wrong { background: #ffebee; color: #c62828; }
.fc-stat svg { width: 24px; height: 24px; fill: currentColor; }
.fc-final-stars { text-align: center; font-size: 24px; font-weight: 700; color: #ff9800; margin: 25px 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.fc-results-actions { display: flex; justify-content: center; gap: 15px; margin-top: 20px; }
.fc-result-popup { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); z-index: 10000; }
.fc-result-popup-content { animation: popup-scale 0.3s ease-out forwards; }
.fc-result-popup-icon { font-size: 150px; line-height: 1; display: flex; align-items: center; justify-content: center; width: 200px; height: 200px; border-radius: 50%; color: white; }
.fc-result-popup.correct .fc-result-popup-icon { background: #4CAF50; animation: popup-correct-icon 1.2s ease-out forwards; }
.fc-result-popup.wrong .fc-result-popup-icon { background: #F44336; animation: popup-wrong-icon 1.2s ease-out forwards; }
@keyframes popup-scale { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes popup-correct-icon { 0% { transform: scale(0.5); opacity: 0; } 30% { transform: scale(1.2); opacity: 1; } 50% { transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes popup-wrong-icon { 0%, 20%, 40%, 60%, 80%, 100% { transform: translateX(0); } 10%, 50% { transform: translateX(-10px); } 30%, 70% { transform: translateX(10px); } 0% { opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
@media(max-width: 500px) { .fc-wrap { border-radius: 0; border-width: 0; } .fc-title { font-size: 16px; } .fc-header { flex-wrap: wrap; justify-content: center; gap: 10px; } .fc-quiz-options { grid-template-columns: 1fr; } .fc-quiz-option { padding: 8px 12px; } .fc-btn { padding: 8px 15px; font-size: 14px; } }