/* Flashcards, Quiz, Typing Styles */

/* Category Selector */
.category-selector {
    margin-bottom: 20px;
}

.category-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
}

/* Flashcard */
.flashcard-container {
    perspective: 1000px;
    margin: 30px 0;
}

.flashcard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

.flashcard-front,
.flashcard-back {
    backface-visibility: hidden;
    text-align: center;
    color: white;
}

.flashcard-back {
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flashcard-term {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 15px;
}

.flashcard-definition {
    font-size: 1.2em;
    line-height: 1.6;
}

.flashcard-example {
    margin-top: 20px;
    font-size: 0.9em;
    opacity: 0.9;
    font-style: italic;
}

.flashcard-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.flashcard-controls button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-nav {
    background: #e0e0e0;
    color: #333;
}

.btn-nav:hover {
    background: #d0d0d0;
}

.btn-know {
    background: #4CAF50;
    color: white;
}

.btn-know:hover {
    background: #45a049;
}

.btn-dont-know {
    background: #f44336;
    color: white;
}

.btn-dont-know:hover {
    background: #da190b;
}

/* Progress Stats */
.flashcard-stats {
    display: flex;
    justify-content: space-around;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

/* Quiz */
.quiz-question {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.quiz-question h3 {
    margin-bottom: 20px;
    color: #333;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    padding: 15px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.quiz-option.selected {
    border-color: #667eea;
    background: #e8e8ff;
}

.quiz-option.correct {
    border-color: #4CAF50;
    background: #d4edda;
}

.quiz-option.incorrect {
    border-color: #f44336;
    background: #f8d7da;
}

.quiz-feedback {
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.quiz-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.quiz-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Typing */
.typing-practice {
    text-align: center;
}

.typing-term {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin: 30px 0;
}

.typing-input {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 20px;
}

.typing-input:focus {
    outline: none;
    border-color: #667eea;
}

.typing-feedback {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 1.1em;
}

.typing-feedback.correct {
    background: #d4edda;
    color: #155724;
}

.typing-feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
}

/* Dark theme adjustments */
body.dark-theme .quiz-question,
body.dark-theme .flashcard-stats {
    background: #2a2a4a;
    color: #e0e0e0;
}

body.dark-theme .quiz-option,
body.dark-theme .typing-input {
    background: #1a1a2e;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-theme .quiz-option:hover {
    background: #252540;
}
