/* UI fonts */
@font-face {
    font-family: 'Suivant Now';
    src: url(https://spotlightplus.pages.dev/assets/type/SuivantNow-Regular.ttf);
    font-weight: 400;
}

@font-face {
    font-family: 'Suivant Now';
    src: url(https://spotlightplus.pages.dev/assets/type/SuivantNow-Bold.ttf);
    font-weight: 700;
}

/* Neptune Player UI */
* {
    --neptune-font-family: 'Suivant Now' !important;
    box-sizing: border-box;
}

neptune-controller {
    --neptune-secondary-color: rgba(0, 0, 0, 0.5);
    --neptune-control-background: rgba(0, 0, 0, 0);
    --neptune-control-hover-background: rgba(0, 0, 0, 0);
}

neptune-controller.button {
    --neptune-control-background: rgba(0, 0, 0, 0) !important;
}

neptune-control-bar.first {
    background: rgba(0, 0, 0, 0.5);
}

neptune-control-bar.second {
    background: rgba(0, 0, 0, 0.5);
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 8px;
    flex-wrap: wrap;
}

neptune-control-bar.second .center-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

neptune-control-bar.second .right-controls {
    position: absolute;
    right: 0;
    display: flex;
    gap: 12px;
}

/* Basic UI */
body {
    margin: 0;
    font-family: 'Suivant Now', Arial, sans-serif;
    background: #111;
    color: white;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #181818;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
}

header img {
    height: 40px;
}

header h2 {
    margin: 0;
    flex: 1;
    text-align: center;
    font-size: 20px;
    white-space: nowrap;
}

header a.button {
    background-color: #0000ff;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
    transition: background 0.2s;
}

header a.button:hover {
    background-color: #1100a8;
}

/* Responsive Video Grid */
#videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
}

@media (min-width: 600px) {
    #videos {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

.video-card {
    cursor: pointer;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: scale(1.05);
}

.video-card img {
    width: 100%;
    border-radius: 6px;
}

.video-title {
    margin-top: 8px;
    font-size: 15px;
}

/* Video player UI */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 101;
    padding: 10px;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 28px;
    cursor: pointer;
    color: white;
    z-index: 100;
}

#player-container {
    width: 100%;
    max-width: 1600px;
    height: 80vh;
    max-height: 900px;
}

#player-container neptune-controller {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* ---------- Mobile Optimizations ---------- */

@media (max-width: 650px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    header h2 {
        font-size: 18px;
    }

    header a.button {
        width: 100%;
        text-align: center;
        padding: 12px;
        margin-top: 5px;
    }

    neptune-control-bar.second .right-controls {
        position: static;
        margin-top: 10px;
        justify-content: center;
    }

    neptune-control-bar.second {
        flex-direction: column;
    }

    #player-container {
        height: 90vh;
    }
}

@media (max-width: 400px) {
    header h2 {
        font-size: 16px;
    }

    .video-title {
        font-size: 14px;
    }

    #videos {
        gap: 14px;
    }
}