.openai-tts-player {
    margin: 10px 0px 30px 0px;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tts-loading {
    color: white;
    font-size: 14px;
    text-align: center;
    padding: 15px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.tts-audio-container {
    position: relative;
}

/* Estilos para overlay de pago */
.tts-payment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.tts-payment-modal {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tts-payment-modal h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #333;
}

.tts-payment-modal p {
    margin: 10px 0;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

.tts-price-display {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border-radius: 8px;
}

.tts-buy-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px 5px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tts-buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.tts-buy-button:active {
    transform: translateY(0);
}

.tts-close-modal {
    background: #e0e0e0;
    color: #666;
    border: none;
    padding: 12px 25px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    margin: 10px 5px;
    transition: background 0.2s;
}

.tts-close-modal:hover {
    background: #d0d0d0;
}

/* Estado deshabilitado del reproductor */
media-controller[disabled] {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive para modal */
@media (max-width: 768px) {
    .tts-payment-modal {
        padding: 20px;
        max-width: 90%;
    }
    .tts-payment-modal h3 {
        font-size: 20px;
    }
    
    .tts-price-display {
        font-size: 28px;
        padding: 12px;
    }
    
    .tts-buy-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .tts-close-modal {
        width: 100%;
        padding: 10px 20px;
    }
}  

/* Estilos para login requerido */
.tts-login-required {
    padding: 0;
    text-align: center;
}

.tts-login-modal {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 100%;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 64px;
}

.tts-login-modal h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    flex-shrink: 0;
}

.tts-login-modal p {
    display: none;
}

.tts-login-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none !important;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    margin: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
}

.tts-login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white !important;
}

.tts-login-button:active {
    transform: translateY(0);
}

/* Responsive para login modal */
@media (max-width: 768px) {
    .tts-login-modal {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
        min-height: auto;
    }
    
    .tts-login-modal h3 {
        font-size: 14px;
    }
    
    .tts-login-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Spinner de carga */
.tts-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}

.tts-spinner {
    width: 40px;
    height: 40px;
    animation: tts-rotate 2s linear infinite;
}

.tts-spinner-path {
    stroke: #667eea;
    stroke-linecap: round;
    animation: tts-dash 1.5s ease-in-out infinite;
}

@keyframes tts-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes tts-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.tts-loading-spinner span {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
}

/* Transición suave para el contenedor */
.tts-audio-container {
    transition: opacity 0.3s ease-in-out;
}

/* Placeholder con transición */
.tts-placeholder-message {
    transition: opacity 0.3s ease, transform 0.3s ease;
}