/* =========================================
   Blog TTS Player - Усиленная версия
   ========================================= */

.blog-tts-player-wrapper {
    margin: 30px 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    width: 100% !important;
}

/* Карточка плеера с градиентом */
.blog-tts-player-wrapper .tts-player-card {
    display: flex !important;
    align-items: center !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 12px !important;
    padding: 20px 25px !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(118, 75, 162, 0.3) !important;
    gap: 25px !important;
    border: none !important;
}

/* Контейнер для пластинки */
.blog-tts-player-wrapper .tts-record-container {
    flex-shrink: 0 !important;
    width: 90px !important;
    height: 90px !important;
    position: relative !important;
}

/* Сама пластинка */
.blog-tts-player-wrapper .tts-record {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    background-color: #222 !important; /* Видно, если картинка не загрузилась */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: 3px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    position: relative !important;
    transition: transform 0.3s ease !important;
}

/* Отверстие в центре пластинки */
.blog-tts-player-wrapper .tts-record::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 14px !important;
    height: 14px !important;
    background-color: #667eea !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
}

/* Анимация вращения */
@keyframes spin-record {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Класс для вращения (добавляется через JS) */
.blog-tts-player-wrapper .tts-record.is-playing {
    animation: spin-record 6s linear infinite !important;
}

/* Информация о треке */
.blog-tts-player-wrapper .tts-player-info {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-width: 0 !important; /* Предотвращает переполнение flex-контейнера */
}

.blog-tts-player-wrapper .tts-track-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
}

.blog-tts-player-wrapper .tts-track-meta {
    margin: 0 !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Аудио-плеер */
.blog-tts-player-wrapper .tts-audio-element {
    width: 100% !important;
    height: 40px !important;
    border-radius: 20px !important;
    outline: none !important;
    margin-top: 5px !important;
    background: rgba(255, 255, 255, 0.1) !important; /* Легкая подложка для контраста */
}

/* Кнопка скачивания */
.blog-tts-player-wrapper .tts-download-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 8px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.6) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    width: fit-content !important;
}

.blog-tts-player-wrapper .tts-download-btn:hover {
    border-bottom-style: solid !important;
    border-bottom-color: #ffffff !important;
    transform: translateX(3px) !important;
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .blog-tts-player-wrapper .tts-player-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 25px 20px !important;
        gap: 15px !important;
    }
    
    .blog-tts-player-wrapper .tts-record-container {
        width: 110px !important;
        height: 110px !important;
    }
    
    .blog-tts-player-wrapper .tts-download-btn {
        margin: 10px auto 0 !important;
    }
}