:root {
    --bg-main: #f8fafc;
    --text-heading: #0f172a;
    --text-muted: #64748b;
    --accent-blue: #1856ed;
    --accent-sky: #0ea5e9;
    --border-subtle: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 25%, #f1f5f9 50%, #f0f9ff 75%, #e2e8f0 100%);
    background-size: 300% 300%;
    animation: lightGradientShift 20s ease infinite;
    color: var(--text-heading);
}

@keyframes lightGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Fullscreen Media Stream Player */
#video-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: #000000;
    z-index: 999;
    display: none;
}

/* Fullscreen Interactive Web / App Cast Frame */
#cast-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    outline: none;
    background: transparent;
    z-index: 998;
    display: none;
}

/* Published Content Presenter Container */
#content-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    color: #ffffff;
}

.signboard-slide {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
}

.signboard-slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-headline {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.slide-body {
    font-size: clamp(1.25rem, 2.5vw, 2.25rem);
    line-height: 1.4;
    max-width: 85vw;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.slide-watermark {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    opacity: 0.45;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    font-family: monospace;
}

/* Standby View Container */
#standby-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    z-index: 1;
    display: block;
}

.screen-container {
    width: 100vw;
    height: 100vh;
    padding: 2.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Top Bar */
.top-bar {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Status Pill with Micro-Animations */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    color: var(--text-heading);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 0.55rem 1.35rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: default;
    animation: pillFloat 6s ease-in-out infinite;
}

.status-pill:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 8px 20px rgba(24, 86, 237, 0.08), 0 0 12px rgba(56, 189, 248, 0.2);
}

@keyframes pillFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Beacon Radar Pulse for Dot */
.status-dot-wrapper {
    position: relative;
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-sky);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-sky);
    position: relative;
    z-index: 2;
    animation: dotBreath 2.4s ease-in-out infinite;
}

.status-dot-ping {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.6);
    animation: radarWave 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    z-index: 1;
}

@keyframes dotBreath {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

@keyframes radarWave {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70%, 100% {
        transform: scale(3.2);
        opacity: 0;
    }
}

.status-text {
    position: relative;
    background: linear-gradient(90deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Center Stage */
.center-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 900px;
    width: 100%;
    margin-top: -2rem;
}

.brand-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
    width: 100%;
}

.brand-logo svg {
    height: clamp(160px, 24vh, 260px);
    width: auto;
    max-width: 90vw;
    display: block;
    filter: drop-shadow(0 12px 28px rgba(24, 86, 237, 0.2));
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-heading);
}

.description {
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 680px;
}

/* Bottom Footer */
.bottom-bar {
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.bottom-bar a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.bottom-bar a:hover {
    text-decoration: underline;
}

/* Responsive adjustment for compact screens */
@media (max-height: 700px) {
    .screen-container {
        padding: 1.5rem 2rem;
    }
    .brand-logo {
        margin-bottom: 1.5rem;
    }
    .center-stage {
        margin-top: 0;
    }
}
