/* Sight Words App Specific Styles - Mobile First */

/* ===== THEME OVERRIDE ===== */
.sight-words-theme {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.sight-words-theme .tool-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.sight-words-theme .mode-tab.active {
    background: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ===== GRADE SELECTOR ===== */
.grade-selector {
    background: #f0fdf4;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.grade-selector h3 {
    font-size: 0.9375rem;
    color: #166534;
    margin-bottom: 12px;
}

.grade-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.grade-btn {
    min-height: 44px;
    padding: 10px 16px;
    border: 2px solid #d1fae5;
    border-radius: 20px;
    background: white;
    color: #166534;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.grade-btn:active {
    transform: scale(0.95);
}

.grade-btn.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* ===== FLASHCARDS MODE ===== */
.flashcards-container {
    text-align: center;
    padding: 10px 0;
}

.word-counter {
    font-size: 0.9375rem;
    color: #6b7280;
    margin-bottom: 16px;
}

/* ===== FLASHCARD ===== */
.flashcard {
    perspective: 1000px;
    margin: 20px auto;
    max-width: 320px;
    height: 200px;
    cursor: pointer;
}

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

.flashcard-inner.flipped {
    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: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.flashcard-front {
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
    border: 3px dashed #10b981;
}

.tap-hint {
    font-size: 1.125rem;
    color: #166534;
    font-weight: 500;
}

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

.word-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: lowercase;
}

.audio-btn {
    min-width: 60px;
    min-height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 1.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn:hover,
.audio-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.audio-btn.large {
    min-width: 150px;
    min-height: 60px;
    border-radius: 30px;
    font-size: 1.25rem;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ===== FLASHCARD CONTROLS ===== */
.flashcard-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.control-btn {
    min-height: 48px;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    background: white;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.knew-it {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.control-btn.knew-it:hover {
    background: #22c55e;
    color: white;
}

.control-btn.learning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.control-btn.learning:hover {
    background: #f59e0b;
    color: white;
}

/* ===== WORD LIST PANEL ===== */
.word-list-toggle {
    margin-top: 20px;
}

.toggle-btn {
    min-height: 44px;
    padding: 10px 20px;
    border: none;
    border-radius: 22px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #e5e7eb;
}

.word-list-panel {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.word-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.word-item {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: lowercase;
}

.word-item:active {
    transform: scale(0.95);
}

.word-item.mastered {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.word-item.learning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.word-item.not-practiced {
    background: white;
    color: #374151;
}

/* ===== QUIZ MODE ===== */
.quiz-container {
    text-align: center;
    padding: 20px 0;
}

.quiz-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quiz-prompt {
    margin-bottom: 24px;
}

.quiz-prompt p {
    color: #6b7280;
    margin-bottom: 16px;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.quiz-option-btn {
    min-height: 70px;
    padding: 16px;
    font-size: 1.5rem;
    font-weight: 700;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: lowercase;
}

.quiz-option-btn:active {
    transform: scale(0.95);
}

.quiz-option-btn:hover {
    border-color: #10b981;
}

.quiz-option-btn.correct {
    border-color: #22c55e;
    background: #dcfce7;
    color: #166534;
}

.quiz-option-btn.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}

/* ===== SPELLING MODE ===== */
.spelling-container {
    text-align: center;
    padding: 20px 0;
}

.spelling-prompt {
    margin-bottom: 24px;
}

.spelling-prompt p {
    color: #6b7280;
    margin-bottom: 16px;
}

.spelling-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.spelling-input {
    width: 100%;
    max-width: 300px;
    padding: 16px 20px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    border: 4px solid #e5e7eb;
    border-radius: 16px;
    outline: none;
    transition: all 0.2s;
    text-transform: lowercase;
}

.spelling-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.spelling-input.correct {
    border-color: #22c55e;
    background: #dcfce7;
}

.spelling-input.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
    animation: shake 0.5s ease;
}

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

.submit-btn {
    min-height: 56px;
    padding: 16px 40px;
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.submit-btn:active {
    transform: scale(0.95);
}

.hint-section {
    margin-top: 16px;
}

.hint-btn {
    min-height: 44px;
    padding: 10px 20px;
    border: none;
    border-radius: 22px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.hint-btn:hover {
    background: #fde68a;
}

.hint-display {
    margin-top: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 4px;
}

/* ===== BADGES ===== */
.badges-section {
    margin-top: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.badges-section h4 {
    text-align: center;
    color: #374151;
    margin-bottom: 12px;
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
    min-width: 75px;
    transition: transform 0.2s;
}

.badge-item.earned {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.badge-item.locked {
    opacity: 0.5;
}

.badge-item:hover {
    transform: scale(1.05);
}

.badge-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.badge-name {
    font-size: 0.65rem;
    text-align: center;
    color: #374151;
    line-height: 1.2;
}

/* ===== TABLET+ STYLES ===== */
@media (min-width: 481px) {
    .flashcard {
        max-width: 400px;
        height: 250px;
    }

    .word-display {
        font-size: 4rem;
    }

    .quiz-options {
        max-width: 500px;
        gap: 16px;
    }

    .quiz-option-btn {
        min-height: 80px;
        font-size: 1.75rem;
    }

    .grade-buttons {
        gap: 10px;
    }

    .grade-btn {
        padding: 12px 20px;
    }
}

/* ===== DESKTOP STYLES ===== */
@media (min-width: 769px) {
    .flashcard {
        max-width: 450px;
        height: 280px;
    }

    .word-display {
        font-size: 5rem;
    }

    .flashcard-controls {
        gap: 16px;
    }

    .control-btn {
        padding: 14px 28px;
    }

    .quiz-option-btn {
        min-height: 90px;
        font-size: 2rem;
    }
}

/* ===== SMALL SCREENS ===== */
@media (max-width: 380px) {
    .flashcard {
        height: 180px;
    }

    .word-display {
        font-size: 2.5rem;
    }

    .flashcard-controls {
        flex-direction: column;
        align-items: center;
    }

    .control-btn {
        width: 100%;
        max-width: 280px;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .grade-buttons {
        flex-direction: column;
        align-items: center;
    }

    .grade-btn {
        width: 100%;
        max-width: 200px;
    }
}
