/* css/main.css - Smart HLS UI (iOS Controls Fixed - Final) */
body {
    margin: 0;
    padding: 0;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    height: 100svh;
    overflow: hidden;
    font-family: sans-serif;
}

#container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100dvh;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    #container {
        max-width: 1280px;
        max-height: 720px;
    }
}

#snapshot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    display: block;
}

#video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    z-index: 2;
    display: none;
    pointer-events: auto;
}

#video.ready {
    display: block;
}

#play-button,
#loader {
    position: absolute;
    z-index: 10;
}

#play-button {
    padding: 15px 35px;
    font-size: 1.2rem;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid white;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}

#play-button.hidden {
    display: none;
}

/* 📱 MOBILE: Μικρότερο Play Button */
@media (max-width: 767px) {
    #play-button {
        padding: 5px 20px;
        font-size: 1.2rem;
    }
}

#loader {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#status-message {
    position: absolute;
    bottom: 25%;
    width: 100%;
    text-align: center;
    color: white;
    z-index: 1;
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
    pointer-events: none;
}

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

/* Hide timestamps for LIVE streams */
#video::-webkit-media-controls-current-time-display,
#video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

#video::-moz-media-controls-time-display {
    display: none !important;
}

.shaka-time-container,
.shaka-current-time,
.shaka-time-separator,
.shaka-duration {
    display: none !important;
}

/* ---- LIVE BADGE ---- */
.live-badge {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 20;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 5px 14px;
    font-size: 12px;
    font-weight: bold;
    font-family: sans-serif;
    color: #fff;

    border-radius: 4px;
    backdrop-filter: blur(4px);
    transition: all 0.4s ease;

    pointer-events: none;
}


.live-badge .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* OFFLINE / CONNECTING */
.status-loading {
    background-color: rgba(231, 76, 60, 0.85);
}

.status-loading .dot {
    background: #fff;
}

/* LIVE */
.status-live {
    background-color: rgba(39, 174, 96, 0.9);
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.6);
}

.status-live .dot {
    background: #fff;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Mobile adjustments */
/* Mobile adjustments */
@media (max-width: 480px) {
    .live-badge {
        position: fixed !important;
        top: 5px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;

        padding: 3px 10px;
        font-size: 10px;
        gap: 4px;
        border-radius: 3px;

        max-width: 90%;
        white-space: nowrap;

        z-index: 9999;
    }

    .live-badge .dot {
        width: 6px;
        height: 6px;
    }
}
