.inspiration-container {
    min-height: 100vh;
    padding-top: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    box-sizing: border-box;
}

.inspiration-wrapper {
    position: relative;
    width: 100vw;
    max-width: clamp(300px, 90vw, 800px);
    aspect-ratio: 3 / 4;
    max-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-sizing: border-box;
}

.inspiration-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 24px;
    box-sizing: border-box;
}

.inspiration-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    /*#F5C518;*/
    font-size: 1.5em;
    font-family: 'Kaushan Script', cursive;
    text-align: center;
    padding: 0px;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    line-height: 1.4;
    box-sizing: border-box;
    max-width: 100%;
}

@keyframes fadeInMagic {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.inspiration-image.magic-appear {
    animation: fadeInMagic 1s ease forwards;
}

.inspiration-text.magic-glow {
    animation: glowPulse 1.5s ease-in-out;
}

@keyframes glowPulse {
    0% {
        text-shadow: 0 0 0 transparent;
    }

    50% {
        text-shadow: 0 0 8px #ffffff, 0 0 12px #f5c518;
    }

    100% {
        text-shadow: 0 0 0 transparent;
    }
}

@media (max-width: 768px) {
    .inspiration-wrapper {
        width: 95vw;
        max-width: 600px;
        aspect-ratio: 3 / 4;
    }

    .inspiration-text {
        font-size: 1.2em;
        padding: 15px;
        width: 100%;
    }
}

.audio-toggle,
.info-toggle,
.video-button,
.font-button {
    position: fixed;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    font-family: 'Libre Baskerville', serif;
    font-size: 1.6em;
    font-weight: bold;
    line-height: 1;
    border-radius: 50%;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.audio-toggle {
    bottom: 20px;
}

.info-toggle {
    bottom: 70px;
}

.video-button {
    bottom: 120px;
}

.font-button {
    bottom: 170px;
}

.audio-toggle:hover,
.info-toggle:hover,
.video-button:hover {
    background: rgba(0, 0, 0, 0.7);
}



.font-menu {
    position: absolute;
    top: 0;
    right: 60px;
    /* aparece a la izquierda del botón */
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 140px;
    z-index: 100;
}

.font-option {
    padding: 6px 12px;
    border-radius: 8px;
    text-align: left;
    font-size: 14px;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
}

.font-option:hover {
    background-color: #fef3c7;
}

.hidden {
    display: none;
}

.font-button-wrapper {
    position: fixed;
    right: 20px;
    bottom: 170px;
    z-index: 1000;
}


.video-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-box {
    position: relative;
    background: white;
    padding: 24px 32px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 300px;
    font-family: sans-serif;
}

.spinner {
    margin: 0 auto 12px;
    width: 40px;
    height: 40px;
    border: 5px solid #ccc;
    border-top: 5px solid #386560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.cancel-button {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 1px solid red;
    font-size: 24px;
    font-weight: bold;
    color: red !important;
    /* lo forzamos a rojo visible */
    opacity: 1;
    visibility: visible;
    cursor: pointer;
    z-index: 9999;
}

.cancel-button:hover {
    color: #000;
}

/* Botón de información */
.info-button {
    position: fixed;
    bottom: 100px;
    /* encima del altavoz */
    right: 20px;
    font-size: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

/* Panel de información */
.info-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.info-content {
    background: white;
    color: #333;
    padding: 30px;
    border-radius: 12px;
    overflow-y: auto;
    max-height: 80vh;
    width: 90vw;
    /* Asegura que el ancho sea responsivo */
    max-width: 500px;
    /* Mantiene el límite en desktop */
    box-sizing: border-box;
    /* Incluye padding en el ancho total */
    word-wrap: break-word;
    /* Rompe palabras largas si es necesario */
    overflow-x: hidden;
    /* Evita scroll horizontal */
}

.info-content a {
    color: #386560;
    font-weight: bold;
    text-decoration: none;
}

.info-content a:hover {
    text-decoration: underline;
}

.close-info {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .info-content {
        width: 90vw;
        padding: 20px;
        font-size: 0.95em;
    }
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    color: #386560;
    font-family: 'Arial', sans-serif;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #386560;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: white;
    padding: 24px 32px;
    border-radius: 12px;
    text-align: center;
    max-width: 320px;
    font-family: sans-serif;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
}

.modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

.modal-buttons button {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

#video-confirm-yes {
    background-color: #386560;
    color: white;
}

#video-confirm-no {
    background-color: #ccc;
    color: #333;
}

.cancel-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    z-index: 10001;
}

#player {
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}