body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #000;
}

#display {
    position: relative;
    width: 100%;
    height: 100%;
}

#display iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#display iframe.active {
    z-index: 1;
    opacity: 1;
}

#loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font: 24px monospace;
}

#loader.hidden {
    display: none;
}

#debug {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 30%;
    overflow-y: auto;
    background: rgba(0,0,0,0.85);
    color: #0f0;
    font: 12px monospace;
    padding: 8px;
    z-index: 9999;
    display: none;
}

#debug.visible {
    display: block;
}

#debug div {
    padding: 2px 0;
    border-bottom: 1px solid #222;
}

#toggle, #next {
    position: fixed;
    top: 5px;
    right: 5px;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: 1px solid #555;
    padding: 4px 10px;
    font: 12px monospace;
    cursor: pointer;
    border-radius: 4px;
}

#toggle {
    right: 5px;
}

#next {
    right: 70px;
}
