/* English-Bengali Dictionary - Frontend Styles */

.eb-dictionary-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.eb-bengali-text {
    font-family: 'Noto Sans Bengali', sans-serif;
}

/* Header */
.eb-dict-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
}

.eb-dict-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, sans-serif;
}

.eb-dict-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

/* Mode Selector */
.eb-dict-mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.eb-mode-btn {
    flex: 1;
    min-width: 180px;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-align: center;
}

.eb-mode-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.eb-mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.mode-label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.mode-label-bn {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    font-family: 'Noto Sans Bengali', sans-serif;
}

/* Search Box */
.eb-dict-search-box {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.eb-search-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.eb-search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, sans-serif;
}

.eb-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.eb-voice-btn {
    padding: 15px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eb-voice-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.eb-voice-btn.listening {
    background: #667eea;
    border-color: #667eea;
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.eb-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.eb-keyboard-toggle {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.eb-keyboard-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Suggestions */
.eb-suggestions {
    position: relative;
    margin-top: 10px;
}

.eb-suggestions.active {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.eb-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, sans-serif;
    border-bottom: 1px solid #f0f0f0;
}

.eb-suggestion-item:last-child {
    border-bottom: none;
}

.eb-suggestion-item:hover {
    background: #f8f9fa;
}

.eb-suggestion-word {
    font-weight: 600;
    color: #333;
}

.eb-suggestion-translation {
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

/* Results Area */
.eb-results-area {
    min-height: 300px;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.eb-welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.eb-welcome-message svg {
    margin-bottom: 20px;
    color: #ccc;
}

.eb-welcome-message h3 {
    font-size: 24px;
    color: #666;
    margin: 0 0 10px 0;
}

.eb-welcome-message p {
    font-size: 16px;
    margin: 0;
}

.eb-loading {
    text-align: center;
    padding: 40px;
}

.eb-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Word Result Card */
.eb-word-result {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, sans-serif;
}

.eb-word-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.eb-word-title-group {
    flex: 1;
}

.eb-word-main {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.eb-word-pronunciation {
    font-size: 16px;
    color: #666;
    font-style: italic;
}

.eb-word-actions {
    display: flex;
    gap: 10px;
}

.eb-action-btn {
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.eb-action-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.eb-word-pos {
    display: inline-block;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.eb-word-translation {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.eb-word-definition {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.eb-word-example {
    padding: 15px;
    background: white;
    border-left: 3px solid #667eea;
    border-radius: 8px;
    font-size: 15px;
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.eb-word-synonyms {
    font-size: 14px;
    color: #666;
}

.eb-word-synonyms strong {
    color: #333;
}

/* Alphabet Browser */
.eb-alphabet-browser {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.eb-alphabet-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: center;
    font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, sans-serif;
}

.eb-alphabet-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.eb-alphabet-btn {
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.eb-bengali-letters .eb-alphabet-btn {
    font-family: 'Noto Sans Bengali', sans-serif;
}

.eb-alphabet-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Modal */
.eb-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.eb-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eb-modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.eb-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.eb-modal-close:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .eb-dict-title {
        font-size: 24px;
    }
    
    .eb-dict-mode-selector {
        flex-direction: column;
    }
    
    .eb-mode-btn {
        min-width: auto;
    }
    
    .eb-search-input-wrapper {
        flex-direction: column;
    }
    
    .eb-voice-btn,
    .eb-search-btn {
        width: 100%;
    }
    
    .eb-word-header {
        flex-direction: column;
    }
    
    .eb-word-actions {
        margin-top: 15px;
    }
    
    .eb-alphabet-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Utility Classes */
.eb-hidden {
    display: none !important;
}

.eb-error {
    color: #dc3545;
    padding: 20px;
    text-align: center;
    background: #ffe6e6;
    border-radius: 10px;
}

.eb-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.eb-no-results h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
}
