/* Import Font (Opsional, tapi membuat tampilan lebih baik) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* Reset dan Tema Gelap */
:root {
    --primary-color: #007bff;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Kontainer Galeri Utama */
.gallery-container {
    background-color: var(--surface-color);
    padding: 2rem 3rem;
    border-radius: 16px;
    box-shadow: 0 15px 40px var(--shadow-color);
    width: 90%;
    max-width: 600px;
    text-align: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

h1 {
    margin-top: 0;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Wrapper Thumbnail dan Navigasi */
.thumbnail-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.thumbnail-display {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Aspect Ratio 16:9 */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

#video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 70px;
    height: 70px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    transition: transform 0.4s ease, background-color 0.4s ease;
}

.play-icon-overlay svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.thumbnail-display:hover #video-thumbnail {
    transform: scale(1.05);
}

.thumbnail-display:hover .play-icon-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(0, 123, 255, 0.8);
}

/* Tombol Navigasi (Panah) */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: all 0.2s ease;
}
.nav-btn svg { fill: white; width: 24px; height: 24px; }
.nav-btn:hover { background-color: var(--primary-color); border-color: var(--primary-color); }
#prev-btn { left: -25px; }
#next-btn { right: -25px; }

/* Indikator Angka */
.video-selectors {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}
.selector {
    width: 35px;
    height: 35px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.selector:hover { background-color: #555; transform: translateY(-3px); }
.selector.active { background-color: var(--primary-color); color: white; box-shadow: 0 0 15px var(--primary-color); }

/* Tombol "Putar Video Ini" */
#select-video-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}
#select-video-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Pemutar Video Fullscreen */
#fullscreen-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#fullscreen-player:not(.player-hidden) {
    opacity: 1;
    pointer-events: auto;
}
#main-video {
    width: 95%;
    height: 95%;
    max-width: 1600px;
    max-height: 90vh;
    outline: none;
}
#close-player-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}
#close-player-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Tombol Redirect di dalam player */
#redirect-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.5);
    transition: all 0.3s ease;
    display: none; /* Sembunyi secara default */
}
#redirect-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
}
