/* Manga Translator Styles */
.manga-translator-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid #0f3460;
}

.manga-translator-controls select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #0f3460;
    background: #16213e;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.manga-translator-controls select:focus {
    outline: none;
    border-color: #e94560;
}

.manga-translator-controls button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.manga-translator-controls .btn-translate {
    background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
    color: white;
}

.manga-translator-controls .btn-translate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.manga-translator-controls .btn-toggle {
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    color: #fff;
    border: 1px solid #e94560;
}

.manga-translator-controls .btn-toggle:hover {
    background: #e94560;
}

/* Loading Overlay */
#mtLoadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.mt-loading-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px 60px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #0f3460;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mt-loading-box .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #0f3460;
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.mt-loading-box .loading-text {
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
}

.mt-loading-box #mtLoadingProgress {
    color: #e94560;
    font-size: 14px;
}

/* Text Overlay hover effect */
.text-overlay:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .manga-translator-controls {
        bottom: 10px;
        right: 10px;
        left: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .manga-translator-controls select,
    .manga-translator-controls button {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Glass effect for text overlay */
.text-overlay {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: background 0.2s ease;
}

.text-overlay:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 20;
}

/* Ensure container works with your layout */
.manga-page-container {
    position: relative !important;
    display: block !important;
}

.chapter-image-wrapper .manga-page-container {
    width: 100%;
}

#imgChapter .manga-page-container {
    display: inline-block !important;
    width: auto;
}
