* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000000;
    font-family: "Segoe UI", system-ui, sans-serif;
}

.display-root {
    width: 100vw;
    height: 100vh;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.blank-screen {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 10;
}

.logo-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: transparent;
}

.logo-screen img {
    max-width: 40vw;
    max-height: 40vh;
    object-fit: contain;
}

.logo-screen h1 {
    color: #fff;
    font-size: clamp(2rem, 5vw, 4rem);
    margin-top: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4vh 6vw;
    text-align: center;
    z-index: 3;
}

.slide-header {
    position: absolute;
    top: 3vh;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 4vw;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
}

.slide-label.full-song {
    color: #7dd3fc;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(125, 211, 252, 0.45);
}

.slide-text {
    color: #fff;
    font-weight: 600;
    line-height: 1.35;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
    max-width: 90vw;
    font-size: var(--slide-font-size, 5vw);
}

.slide-text .verse-num {
    font-size: 0.55em;
    font-weight: 700;
    vertical-align: super;
    margin-right: 0.15em;
    opacity: 0.9;
}

.slide-text-full {
    font-weight: 700;
    line-height: 1.2;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.full-song-section + .full-song-section {
    margin-top: 0.85em;
}

.full-song-heading {
    font-size: 0.72em;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.88;
    margin-bottom: 0.2em;
}

.full-song-lyrics {
    font-weight: 700;
    line-height: 1.25;
}

.idle-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.idle-logo {
    max-width: 18vw;
    max-height: 18vh;
    object-fit: contain;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.idle-screen h1 {
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.hidden { display: none !important; }

.display-connection-badge {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 30;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    pointer-events: none;
}

.display-connection-badge--connecting {
    color: #ffd166;
}

.display-connection-badge--live {
    color: #7dffb3;
}

.display-connection-badge--fallback {
    color: #8ec5ff;
}

.display-connection-badge--offline {
    color: #ff8a8a;
}

.media-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    background: #000;
}

.media-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-pdf-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}

.media-audio-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: min(90vw, 640px);
    padding: 2rem;
}

.media-audio-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #fff;
    text-align: center;
}

.media-audio-visual i {
    font-size: clamp(3rem, 10vw, 5rem);
    color: rgba(255, 255, 255, 0.85);
}

.media-audio-visual span {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
}

.media-audio {
    width: 100%;
    max-width: 480px;
}

.fullscreen-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.72);
    cursor: pointer;
}

.fullscreen-gate.hidden {
    display: none !important;
}

.fullscreen-gate-btn {
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 999px;
    cursor: pointer;
    letter-spacing: 0.03em;
}

.fullscreen-gate-btn:hover,
.fullscreen-gate-btn:focus {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.fullscreen-gate-hint {
    color: rgba(255, 255, 255, 0.65);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    margin: 0;
    pointer-events: none;
}

.slide-content.slide-transition,
.media-content.slide-transition {
    animation: slideFadeIn 0.35s ease;
}

@keyframes slideFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
