html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}
/* Sin mover el mouse unos segundos: cursor oculto (js/player.js). */
body.idle,
body.idle * {
    cursor: none !important;
}

.stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.stage .media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    -webkit-transition: opacity 0.4s ease-in;
    transition: opacity 0.4s ease-in;
}

.stage .media.visible {
    opacity: 1;
}
/* Solo el contenido visible recibe toques (los reproductores ocultos quedan detrás). */
.stage .media:not(.visible) {
    pointer-events: none;
}

.message {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    margin-top: -3em;
    text-align: center;
    font-size: 28px;
    line-height: 1.4;
}

.debug {
    position: absolute;
    left: 16px;
    bottom: 16px;
    margin: 0;
    padding: 10px 14px;
    max-width: 80%;
    background: rgba(0, 0, 0, 0.75);
    color: #9f9;
    font-family: Consolas, monospace;
    font-size: 16px;
    white-space: pre-wrap;
    z-index: 10;
}


/* --- Inicio de sesión con Facebook (js/facebook.js, solo con ?login=facebook) --- */
.fb-login {
    font-family: Arial, Helvetica, sans-serif;
    cursor: auto;
}

.fb-button {
    display: inline-block;
    padding: 10px 18px 10px 12px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: #1877f2;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.fb-button:focus {
    outline: 3px solid #fff;
}

.fb-logo {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    line-height: 26px;
    text-align: center;
    vertical-align: middle;
    font-size: 20px;
    font-family: Helvetica, Arial, sans-serif;
    color: #1877f2;
    background: #fff;
    border-radius: 50%;
}

.fb-status {
    padding: 10px 16px;
    font-size: 16px;
    color: #fff;
    background: rgba(20, 22, 28, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.fb-user {
    background: #1877f2;
}

.fb-error {
    background: rgba(160, 40, 40, 0.92);
}

/* --- Botones opcionales arriba a la derecha (Facebook, Compartir) --- */
.actions {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
    text-align: right;
    font-family: Arial, Helvetica, sans-serif;
    cursor: auto;
}

.actions > div {
    margin-bottom: 10px;
}

/* --- Compartir (js/share.js) --- */
.share-button {
    padding: 10px 18px;
    font-size: 16px;
    font-weight: bold;
    color: #0b0b0b;
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.share-button:focus,
.share-option:focus,
.share-close:focus {
    outline: 3px solid #2a78d6;
}

.share-menu {
    display: inline-block;
    width: 260px;
    padding: 14px;
    text-align: left;
    background: rgba(20, 22, 28, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.share-title {
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
}

.share-option {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 10px 12px;
    font-size: 15px;
    text-align: left;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
}

.share-option:hover {
    background: rgba(255, 255, 255, 0.16);
}

.share-close {
    margin-top: 4px;
    padding: 6px 0;
    font-size: 14px;
    color: #c9ccd3;
    background: none;
    border: none;
    cursor: pointer;
}

.share-input {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    color: #0b0b0b;
    border: none;
    border-radius: 6px;
    box-sizing: border-box;
}

.share-status {
    display: inline-block;
    max-width: 360px;
    padding: 10px 16px;
    font-size: 15px;
    color: #fff;
    word-break: break-all;
    background: rgba(20, 22, 28, 0.92);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.share-error {
    background: rgba(160, 40, 40, 0.92);
}

/* Videos de YouTube / Facebook (js/embeds.js): centrados, con los controles de cada sitio. */
.stage .media.embed {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    overflow: hidden;
}
.stage .media.embed iframe {
    border: 0;
}
.stage .media.embed > iframe {
    width: 100%;
    height: 100%;
}

/* Botón "Toca para activar el sonido": translúcido, al centro, sobre el contenido. */
.sound-toggle {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 15;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 16px 26px;
    font-family: inherit;
    font-size: 18px;
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    -webkit-transition: opacity 0.6s ease, background 0.2s ease;
    transition: opacity 0.6s ease, background 0.2s ease;
}
.sound-toggle svg {
    margin-right: 10px;
}
.sound-toggle:hover,
.sound-toggle:focus {
    background: rgba(0, 0, 0, 0.55);
    outline: none;
    opacity: 1;
}
.sound-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8);
}
/* Después de unos segundos: más tenue, sigue funcionando al tocarlo. */
.sound-toggle.subtle {
    opacity: 0.45;
}

/* Videos de Facebook: el botón se ve igual, pero el toque llega al video que está debajo. */
.sound-toggle.pass {
    pointer-events: none;
}
