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

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    cursor: pointer !important;
}

.container {
    position: relative;
    /* Establish stacking context */
    z-index: 1;
    /* Higher than video-panel */
    display: grid;
    grid-template-columns: 25fr 50fr 25fr;
    width: 100%;
    height: 100%;
    gap: 20px;
    padding: 20px;
    background: var(--partner-logo);
    background-repeat: no-repeat, no-repeat;
    background-position: 20px 350px, right -50px;
    background-size: 20%, 300px;
    background-clip: padding-box, content-box;
    overflow: hidden;
}

.logo {
    width: 100%;
    flex-shrink: 0;
}

.logo img {
    width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
    text-align: center;
}

.content {
    text-align: center;
    color: var(--primary-color, #fff);
}

.title {
    font-size: 1.5rem;
    line-height: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
    color: var(--primary-color, #fff);
}

.video-panel {
    position: absolute;
    right: 0;
    top: 0;
    width: 55%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
}

#mainVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.live-badge {
    background: #dc3545;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

#currentNickname {
    color: white;
    font-size: 0.5rem;
    font-weight: bold;
}

/* Adjust grid to account for video-panel's absence */
.left-panel {
    grid-column: 1 / 2;
    /* Explicitly place in first column */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.right-panel {
    grid-column: 3 / 4;
    /* Explicitly place in third column */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Ensure body has no margins and is full-screen */
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    cursor: pointer !important;
}

.message-box {
    max-width: 90%;
    padding: 1rem 0;
    color: var(--primary-color, #fff);
}

#notice {
    max-width: 90%;
    line-height: 1rem !important;
    font-size: 1rem !important;
}

.stream-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
}

.play-button {
    font-family: var(--font-family, "Oswald", sans-serif);
    color: var(--primary-color, #fff) !important;
    background: var(--background-color, #fff) !important;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 0.4em;
    border-style: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3em 1em;
    box-shadow: 3px 1px 2px var(--background-color, #000);
    text-align: center;
    transition: opacity 0.3s;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    /* Make items stack vertically */
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.loading-message {
    color: white;
    font-size: 1.1em;
    text-align: center;
    display: none;
    margin-bottom: 20px;
    /* Add space between message and spinner */
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-color);
    border-top: 4px solid var(--third-color, white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

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

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

/* */
.jumbotron-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(90deg,
            rgba(255, 255, 255, 0.08) 0px,
            rgba(255, 255, 255, 0.08) 2px,
            transparent 2px,
            transparent 4px),
        repeating-linear-gradient(0deg,
            rgba(255, 255, 255, 0.08) 0px,
            rgba(255, 255, 255, 0.08) 2px,
            transparent 2px,
            transparent 4px);
    background-size: 6px 6px;
    mix-blend-mode: screen;
    animation: flicker 0.5s infinite;
    display: none;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    background: var(--background-color);
    display: none;
}

.scanline {
    position: absolute;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    animation: scan 2s linear infinite;
    pointer-events: none;
    display: none;
}

@keyframes flicker {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}

@keyframes scan {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(100%);
    }
}

/* Added a glow effect */
.glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

/* */
#defaultScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: var(--background-color, #000);
    z-index: 5;
}

#defaultScreen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

#defaultScreen.visible {
    display: block;
}

#header_logo {
    max-width: 300px;
    max-height: 300px;
}

/* banner */
.client-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    padding: 10px;
    z-index: 9;
    border-bottom: none;
    background: var(--background-color) var(--background-image) no-repeat top left;
    border-radius: unset;
    height: 50px;
    border-top: unset;
}

.bottom-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    padding: 10px;
    background: var(--background-color) var(--background-image) no-repeat top left;
    z-index: 9;
    border-bottom: none;
}

.client-logo {
    height: 125px;
    width: auto;
    margin: 0 auto;
    text-align: center;
    display: block;
    position: absolute;
    z-index: 999999;
    bottom: 0px;
}

.show-banner .client-banner,
.show-banner .bottom-banner {
    display: flex;
}

#screenshotBtn {
    display: none;
}

#notice {
    font-family: var(--font-family);
}

#status {
    display: none;
}

.helmet-image {
    position: 'absolute';
    transform: 'translateX(-50%)';
    transform-origin: 'center bottom';
    pointer-events: 'none';
}

#qrcode {
    max-width: 45%;
    margin-top: 12.5vh;
    margin-left: 2.5vw;
    left: 0;
}

#deepar-container {
    width: 55vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background: transparent;
}

#deepar-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
}