/* U I E before R Page Specific Styles */

/* Pronunciation Overview */
.pronunciation-overview {
    padding: 3rem 0;
}

.pronunciation-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pronunciation-guide {
    margin-top: 2rem;
}

.guide-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.guide-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.guide-description {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.guide-list {
    list-style: none;
    padding: 0;
}

.guide-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.guide-list li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Interactive Pronunciation */
.interactive-pronunciation {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 500px;
}

.letter-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.letter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.letter-card:hover::before {
    opacity: 0.1;
}

.letter-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.letter-char {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
    display: block;
}

.letter-name {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    position: relative;
    z-index: 2;
}

/* Technique Card */
.technique-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
}

.technique-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.technique-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Examples Section */
.examples-section {
    padding: 4rem 0;
}

.examples-filter {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.example-item {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.example-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.example-item:hover::before {
    opacity: 1;
}

.example-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.example-word {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.example-transcription {
    font-family: monospace;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.example-translation {
    color: var(--text-secondary);
    font-style: italic;
}

.pronounce-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.pronounce-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Detailed Explanation */
.detailed-explanation {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.explanation-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.explanation-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.explanation-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.explanation-card h4 {
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text-primary);
}

.explanation-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.explanation-card ul {
    list-style: none;
    padding: 0;
}

.explanation-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.explanation-card li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.explanation-card li strong {
    color: var(--text-primary);
}

/* Pronunciation Practice */
.pronunciation-practice {
    padding: 4rem 0;
}

.practice-exercise {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.exercise-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.exercise-controls .btn {
    margin: 0 auto;
    display: block;
}

.quiz-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.quiz-interface {
    text-align: center;
}

.question-container {
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.play-question-audio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
}

.play-question-audio:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.play-question-audio:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.play-question-audio.playing {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.audio-icon {
    font-size: 1.2rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    padding: 1.5rem 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.option-btn.correct {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.option-btn.incorrect {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-feedback {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
}

.quiz-feedback.correct {
    background: var(--bg-secondary);
    border: 1px solid var(--success-color);
    padding: 1.5rem;
}

.quiz-feedback.incorrect {
    background: var(--bg-secondary);
    border: 1px solid var(--error-color);
    padding: 1.5rem;
}

.feedback-correct,
.feedback-incorrect {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feedback-correct {
    color: var(--success-color);
}

.feedback-incorrect {
    color: var(--error-color);
}

.feedback-word-info {
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

.feedback-word-info strong {
    color: var(--text-primary);
}

.feedback-explanation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.quiz-actions {
    text-align: center;
    margin-top: 1rem;
}

/* Related Topics */
.related-topics {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.topic-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.topic-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.topic-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.topic-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.topic-link:hover {
    color: var(--primary-dark);
}

.topic-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.topic-links .topic-link {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.topic-links .topic-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Animation for letter cards */
@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.letter-card {
    animation: bounceIn 0.5s ease forwards;
}

.letter-card:nth-child(1) {
    animation-delay: 0.1s;
}

.letter-card:nth-child(2) {
    animation-delay: 0.2s;
}

.letter-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .letters-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .letter-card {
        padding: 1.5rem 0.5rem;
    }

    .letter-char {
        font-size: 2.5rem;
    }

    .technique-steps {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .explanation-content {
        grid-template-columns: 1fr;
    }

    .examples-filter {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 100%;
        max-width: 200px;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .practice-exercise {
        padding: 1.5rem;
    }

    .play-question-audio {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .letters-grid {
        grid-template-columns: 1fr;
        max-width: 200px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .technique-card,
    .explanation-card,
    .guide-card {
        padding: 1.5rem;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        align-self: center;
    }
}