/* Grammar Games New Styles */

.grammar-mode-switcher {
    display: flex;
    gap: 1rem;
	margin-top: 20px;
    margin-bottom: 2rem;
    justify-content: center;
}

.mode-btn {
    padding: 1rem 2rem;
    border: 2px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.mode-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.grammar-mode-section {
    min-height: 500px;
}

.grammar-games-new-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.grammar-categories h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #f1f5f9;
    font-size: 2rem;
}

.category-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.filters-left,
.filters-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-filter label {
    font-weight: 600;
    margin-right: 1rem;
    color: #cbd5e1;
}

.difficulty-select {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    font-size: 1rem;
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
    cursor: pointer;
    margin-right: 2rem;
}

.difficulty-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.category-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.category-card {
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    flex: 1;
    min-width: 250px;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
}

.category-card p {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.start-game-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
}

.start-game-btn:hover {
    background: #2563eb;
}

/* Modal Styles */
.grammar-game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #f1f5f9;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #94a3b8;
}

.modal-close:hover {
    color: #f1f5f9;
}

.modal-body {
    padding: 2rem;
}

/* Game Content Styles */
.grammar-game-content {
    text-align: center;
}

.game-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.game-header h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: #f1f5f9;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.score-display, .progress-display, .difficulty-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-icon, .difficulty-icon {
    font-size: 1.2rem;
}

.score-text, .progress-text, .difficulty-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 600;
}

.progress-bar {
    width: 120px;
    height: 8px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    transition: width 0.3s ease;
}

.question-area {
    max-width: 500px;
    margin: 0 auto;
}

.question {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #f1f5f9;
}

.options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.option-btn {
    padding: 1rem 2rem;
    border: 2px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 100px;
    transition: all 0.3s ease;
}

.option-btn:hover:not(:disabled) {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    color: #f1f5f9;
}

.option-btn:disabled {
    cursor: not-allowed;
}

.option-btn.correct {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.option-btn.incorrect {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.feedback {
    margin: 2rem 0;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.feedback .correct {
    color: #22c55e;
    font-weight: 600;
    font-size: 1.1rem;
}

.feedback .incorrect {
    color: #ef4444;
    font-weight: 600;
    font-size: 1.1rem;
}

.explanation {
    color: #94a3b8;
    font-style: italic;
    margin-top: 0.5rem;
}

.next-btn, .play-again-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
}

.next-btn:hover, .play-again-btn:hover {
    background: #2563eb;
}

.game-complete {
    text-align: center;
    padding: 1rem;
}

.game-complete h4 {
    color: #22c55e;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Pattern Recognition Game Styles */
.pattern-recognition-game {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.word-display {
    margin: 2rem 0;
}

.target-word {
    font-size: 3rem;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.word-context {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
}

.visual-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.visual-option {
    background: rgba(15, 23, 42, 0.8);
    border: 3px solid rgba(148, 163, 184, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.visual-option:hover:not(.disabled) {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.visual-option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.visual-option.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    animation: pulse-correct 0.6s ease;
}

.visual-option.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
    animation: shake 0.5s ease;
}

.option-visual {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.option-label {
    font-size: 1rem;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: capitalize;
}

.feedback-area {
    margin-top: 2rem;
}

.feedback-content {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.feedback-result {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.feedback-result.correct {
    color: #22c55e;
}

.feedback-result.incorrect {
    color: #ef4444;
}

.explanation {
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.streak-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streak-icon {
    font-size: 1.2rem;
}

.streak-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 600;
}

.final-stats {
    margin: 2rem 0;
}

.final-score {
    font-size: 2rem;
    color: #3b82f6;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.final-percentage {
    font-size: 1.5rem;
    color: #10b981;
    font-weight: 600;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Flashcard Game Styles */
.flashcard-game {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.flashcard-content {
    margin: 1rem auto;
    max-width: 500px;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2rem;
}

.category-context {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
    display: inline-block;
}

.card-front, .card-back {
    padding: 2rem;
    border-radius: 15px;
}

.card-word {
    font-size: 4rem;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-hint {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.reveal-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.reveal-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.answer-display {
    margin-bottom: 2rem;
}

.answer-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.answer-text {
    font-size: 2rem;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 1rem;
    text-transform: capitalize;
}

.answer-explanation {
    font-size: 1rem;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 2rem;
}

.self-evaluation p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.eval-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eval-btn:hover {
    transform: translateY(-2px);
}

.hard-eval {
    border-color: #ef4444;
    color: #ef4444;
}

.hard-eval:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.good-eval {
    border-color: #f59e0b;
    color: #f59e0b;
}

.good-eval:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.easy-eval {
    border-color: #22c55e;
    color: #22c55e;
}

.easy-eval:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.quick-categories {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.category-bubble {
    background: rgba(15, 23, 42, 0.8);
    border: 3px solid rgba(148, 163, 184, 0.3);
    border-radius: 50px;
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
}

.category-bubble:hover:not(.disabled) {
    border-color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.category-bubble.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.category-bubble.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    animation: pulse-correct 0.6s ease;
}

.category-bubble.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
    animation: shake 0.5s ease;
}

.category-bubble.correct-highlight {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.3);
    animation: pulse-correct 0.8s ease;
}

.bubble-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.bubble-text {
    font-size: 1rem;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: capitalize;
}

/* Contextual Flashcard Styles */
.contextual-flashcard-game {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contextual-flashcard-game .game-stats {
    margin-bottom: 0.5rem;
}

.card-image {
    font-size: 4rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.card-text {
    font-size: 2rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.card-tag {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    opacity: 0.7;
    text-transform: lowercase;
}

.card-front, .card-back {
    position: relative;
    padding: 0 2rem 1.5rem 2rem;
    border-radius: 15px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.answer-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 1rem;
}

.answer-explanation {
    font-size: 1rem;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 2rem;
    max-width: 400px;
}

/* Sorting Game Styles */
.sorting-game {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.buckets-area {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.bucket {
    background: rgba(15, 23, 42, 0.8);
    border: 3px solid rgba(148, 163, 184, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    min-width: 150px;
    min-height: 200px;
    transition: all 0.3s ease;
    position: relative;
}

.bucket.drag-over {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.bucket.bucket-success {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    animation: pulse-correct 0.6s ease;
}

.bucket.bucket-error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
    animation: shake 0.5s ease;
}

.bucket-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.bucket-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.bucket-examples {
    font-size: 0.9rem;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 1rem;
}

.bucket-dropzone {
    min-height: 60px;
    border: 2px dashed rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.words-to-sort {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.sortable-word {
    background: #3b82f6;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sortable-word:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.sortable-word.dragging {
    cursor: grabbing;
    transform: rotate(5deg);
    opacity: 0.8;
}

.sortable-word.correct-placement {
    background: #22c55e;
    cursor: default;
    animation: pulse-correct 0.6s ease;
}

.sortable-word.incorrect-bounce {
    animation: shake 0.5s ease;
}

.sorting-instructions {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-top: 2rem;
    font-style: italic;
}

/* Coming Soon Styles */
.coming-soon {
    text-align: center;
    padding: 3rem 2rem;
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.coming-soon h4 {
    color: #f1f5f9;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.coming-soon p {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.coming-soon strong {
    color: #3b82f6;
}

/* Grammar Stats & Sessions Sections */
.progress-stats-section,
.grammar-sessions-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.progress-stats-section h3,
.grammar-sessions-section h3 {
    color: #f1f5f9;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.sessions-subtitle {
    color: #cbd5e1;
    margin-bottom: 2rem;
    font-style: italic;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.session-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.session-category {
    font-weight: 600;
    color: #3b82f6;
}

.session-difficulty {
    color: #f59e0b;
    font-size: 0.9rem;
}

.session-date {
    color: #94a3b8;
    font-size: 0.8rem;
}

.session-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.session-score {
    color: #22c55e;
    font-weight: 600;
}

.session-percentage {
    color: #10b981;
    font-weight: 600;
}

.session-points {
    color: #ffd700;
    font-weight: 600;
}

.no-sessions {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grammar-mode-switcher {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .category-row {
        flex-direction: column;
        align-items: center;
    }
    
    .category-card {
        width: 100%;
        max-width: 300px;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .options {
        flex-direction: column;
        align-items: center;
    }
    
    .option-btn {
        width: 100%;
        max-width: 200px;
    }
}