/* English Phonics Frontend Styles */

.ep-phonics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ep-search-bar {
    display: flex;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.ep-search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px 0 0 50px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.ep-search-input:focus {
    border-color: #4CAF50;
}

.ep-search-btn {
    padding: 12px 25px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
}

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

.ep-voice-selector {
    text-align: center;
    margin-bottom: 30px;
}

.ep-voice-selector label {
    font-weight: 600;
    margin-right: 10px;
}

.ep-voice-btn {
    padding: 8px 20px;
    margin: 0 5px;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.ep-voice-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

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

.ep-categories-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.ep-category-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
}

.ep-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.ep-category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.ep-category-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.ep-category-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.ep-category-count {
    background: #f5f5f5;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.ep-category-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.ep-category-btn:hover {
    transform: scale(1.05);
}

/* Modal Styles */
.ep-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.ep-modal-close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.ep-modal-close:hover,
.ep-modal-close:focus {
    color: #000;
}

.ep-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
}

.ep-modal-header h2 {
    margin: 0 0 15px;
    font-size: 24px;
}

.ep-progress-bar {
    background: rgba(255,255,255,0.3);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.ep-progress-fill {
    background: white;
    height: 100%;
    width: 0;
    transition: width 0.3s;
}

.ep-modal-body {
    padding: 30px;
    max-height: calc(90vh - 150px);
    overflow-y: auto;
}

#ep-words-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-word-display {
    animation: fadeIn 0.5s;
    display: flex;
    align-items: center;
    gap: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.ep-word-display-image {
    width: 250px;
    height: 250px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-word-display-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-word-display-text {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.ep-word-display-phonetic {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
    font-family: 'Times New Roman', serif;
}

.ep-word-display-meaning {
    font-size: 20px;
    color: #888;
    margin-bottom: 20px;
}

.ep-word-display-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.ep-audio-btn {
    padding: 15px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.ep-audio-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.ep-audio-btn.playing {
    background: #ff9800;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.ep-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.ep-nav-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.ep-nav-btn:hover {
    background: #e0e0e0;
}

.ep-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#ep-word-counter {
    font-weight: 600;
    color: #666;
}

/* Category Display Styles */
.ep-category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ep-category-header {
    text-align: center;
    margin-bottom: 30px;
}

.ep-category-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.ep-words-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.ep-word-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    min-height: 120px;
}

.ep-word-card:hover {
    transform: translateX(3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.ep-word-image {
    width: 120px;
    height: 120px;
    min-width: 120px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    margin: 10px;
}

.ep-word-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.ep-word-image.ep-no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 48px;
    font-weight: bold;
}

.ep-word-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ep-word-text {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #333;
}

.ep-word-phonetic {
    font-size: 15px;
    color: #666;
    margin-bottom: 6px;
    font-style: italic;
    font-family: 'Times New Roman', serif;
}

.ep-word-meaning {
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
}

.ep-play-btn {
    padding: 8px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.ep-play-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.ep-play-btn.playing {
    background: #ff9800;
    animation: pulse 1s infinite;
}

.ep-login-required,
.ep-permission-denied {
    padding: 40px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 10px;
    margin: 20px auto;
}

.ep-login-btn {
    display: inline-block;
    padding: 10px 30px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 15px;
    transition: all 0.3s;
}

.ep-login-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ep-categories-grid,
    .ep-words-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .ep-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .ep-word-display-text {
        font-size: 36px;
    }
    
    .ep-word-display-phonetic {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .ep-categories-grid,
    .ep-words-grid {
        grid-template-columns: 1fr !important;
    }
    
    .ep-navigation {
        flex-direction: column;
        gap: 15px;
    }
}
/* Responsive Design */
@media (max-width: 768px) {
    .ep-word-card {
        min-height: 100px;
    }
    
    .ep-word-image {
        width: 80px;
        height: 80px;
        min-width: 80px;
        margin: 8px;
    }
    
    .ep-word-text {
        font-size: 18px;
    }
    
    .ep-word-phonetic {
        font-size: 14px;
    }
    
    .ep-word-meaning {
        font-size: 13px;
    }
    
    .ep-categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .ep-word-content {
        padding: 10px;
    }
    
    /* Modal responsive */
    .ep-word-display {
        flex-direction: column;
        text-align: center;
    }
    
    .ep-word-display-image {
        width: 200px;
        height: 200px;
    }
    
    .ep-word-display-text {
        font-size: 28px !important;
    }
    
    .ep-word-display-phonetic {
        font-size: 20px !important;
    }
    
    .ep-word-display-meaning {
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    .ep-categories-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
    
    .ep-word-display-image {
        width: 150px;
        height: 150px;
    }
}
