/* English Stories Plugin Styles */

.english-story-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Georgia, serif;
    line-height: 1.8;
    font-size: 18px;
}

/* Audio Player */
.story-audio-player {
    margin-bottom: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.story-audio-player audio {
    width: 100%;
}

/* Language Toggle */
.story-language-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.lang-btn {
    padding: 10px 25px;
    font-size: 16px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #e8f4fc;
}

.lang-btn.active {
    background: #3498db;
    color: white;
}

/* Story Content */
.story-content-wrapper {
    position: relative;
    min-height: 200px;
}

.story-content {
    display: none;
}

.story-content.active {
    display: block;
}

.story-content p {
    margin-bottom: 1.5em;
}

/* Highlighted Words */
.story-word {
    background-color: #fff3cd;
    border-bottom: 2px solid #ffc107;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.story-word:hover {
    background-color: #ffe082;
}

.story-word .word-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.story-word .word-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2c3e50;
}

.story-word:hover .word-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .english-story-container {
        padding: 15px;
        font-size: 16px;
    }

    .story-language-toggle {
        flex-direction: column;
        align-items: center;
    }

    .lang-btn {
        width: 100%;
        max-width: 250px;
    }

    .story-word .word-tooltip {
        left: 0;
        transform: none;
        right: 0;
        white-space: normal;
        max-width: 250px;
    }

    .story-word .word-tooltip::after {
        left: 20px;
        transform: none;
    }
}
