/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

html { scroll-behavior: auto; }

body {
    background-color: #0d1b2a; 
    color: #f0f0f5;
    -webkit-overflow-scrolling: touch;
}

/* Header & Search Bar */
header {
    background-color: #1b263b;
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ffd700;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo { font-size: 22px; font-weight: bold; letter-spacing: 1px;}
.logo span { color: #ffd700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.4); }

.search-bar { display: flex; width: 40%; }
.search-bar input {
    width: 100%; padding: 8px 12px;
    background-color: #415a77; border: none;
    color: #fff; border-radius: 4px 0 0 4px; outline: none; font-size: 13px;
}
.gold-btn {
    padding: 8px 16px;
    background: linear-gradient(45deg, #ffd700, #b8860b);
    border: none; color: #080f21; font-weight: bold;
    cursor: pointer; border-radius: 0 4px 4px 0;
}

/* 👑 NAVIGATION MENU */
.main-menu {
    display: flex; 
    justify-content: center;
    gap: 12px; 
    padding: 12px 5%; 
    background-color: #0d1b2a;
}

.menu-btn {
    background: transparent; 
    border: 1.5px solid #ffd700;
    color: #ffd700; 
    padding: 7px 18px;
    font-size: 14px;
    font-weight: bold; 
    border-radius: 20px; 
    cursor: pointer;
    display: flex; 
    align-items: center; 
    gap: 6px; 
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.menu-btn img {
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 1px;
}

.menu-btn i { font-size: 14px; }

.menu-btn:hover, .menu-btn.active {
    background: linear-gradient(45deg, #ffd700, #b8860b);
    color: #0d1b2a; 
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.menu-btn:active { transform: scale(0.97); }

main { padding: 15px 4%; }

.section-title-container {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 15px; 
    width: 100%;
}

.star-container {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; background-color: #ffd700; border-radius: 50%;
    color: #0d1b2a; font-size: 9px; flex-shrink: 0; z-index: 5;
}

.star-container .ripple {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%; background-color: #ffd700; z-index: -1;
    animation: pulsingWaves 1.5s infinite ease-out;
}

@keyframes pulsingWaves {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.4); opacity: 0; }
}

.section-title { 
    font-size: 14px; 
    font-weight: bold; 
    color: #ffffff; 
}

.video-grid.horizontal-16-9 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    transform: translateZ(0);
}

.video-card {
    background-color: #1b263b; border-radius: 6px;
    overflow: hidden; cursor: pointer; transition: border-color 0.12s ease;
    border: 1px solid rgba(255, 215, 0, 0.05);
    transform: translateZ(0);
}

.video-card:hover { border-color: #ffd700; }

.thumbnail-container {
    position: relative; width: 100%; padding-top: 56.25%; 
    background-color: #000; pointer-events: none;
    overflow: hidden;
}

.thumbnail-container img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
    background: #000;
}

.play-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.18); display: flex;
    align-items: center; justify-content: center; opacity: 1; transition: 0.2s;
}
.play-overlay i { color: #ffd700; font-size: 48px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }

.duration {
    position: absolute; bottom: 8px; right: 8px;
    background-color: rgba(13, 27, 42, 0.85); color: #ffd700;
    padding: 2px 6px; font-size: 11px; font-weight: bold; border-radius: 3px;
}
.tag-gold {
    position: absolute; top: 8px; left: 8px;
    background: linear-gradient(45deg, #ffd700, #b8860b);
    color: #0d1b2a; padding: 2px 6px; font-size: 10px; font-weight: bold; border-radius: 3px;
}

.video-info { padding: 10px; pointer-events: none; }
.video-title {
    font-size: 13px; font-weight: normal; color: #ffffff;
    line-height: 1.4; height: 36px; display: block; overflow: hidden; margin-bottom: 5px;
    text-decoration: none;
}
.video-metadata { display: flex; justify-content: space-between; font-size: 11px; color: #8b9bb4; }
.video-metadata i { color: #ffd700; }

.no-results {
    display: none;
    text-align: center;
    color: #ffd700;
    padding: 25px 8px;
    font-size: 14px;
    font-weight: bold;
}

/* Modal Player */
.video-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.video-modal.open { display: flex; } 

.modal-backdrop {
    position: absolute; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}
.modal-content {
    width: 90%; max-width: 750px; background-color: #1b263b; position: relative; border-radius: 8px;
    overflow: hidden; border: 2px solid #ffd700; box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    z-index: 1001; animation: zoomIn 0.2s ease;
}
@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.close-modal {
    position: absolute; top: 10px; right: 10px; color: #ffd700; font-size: 24px; cursor: pointer; z-index: 1002;
}
.player-container { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.player-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; }
.player-message {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffd700;
    font-size: 14px;
    padding: 20px;
    background: #000;
}

footer { text-align: center; padding: 20px; color: #435070; font-size: 11px; }

@media screen and (max-width: 768px) {
    header { flex-direction: column; gap: 8px; padding: 10px; }
    .search-bar { width: 100% !important; }

    .main-menu { 
        justify-content: flex-start !important; 
        overflow-x: auto !important; 
        padding: 10px 4% !important;
        gap: 10px !important;
    }

    .menu-btn { 
        flex-shrink: 0 !important; 
        font-size: 13px !important;  
        padding: 6px 15px !important; 
    }

    .video-grid.horizontal-16-9 { display: block !important; }

    .video-card { 
        width: 100% !important; 
        display: block !important;
        margin-bottom: 20px !important; 
        border-radius: 8px !important; 
    }

    .video-title { 
        font-size: 14px !important; 
        height: auto !important; 
        max-height: 44px !important; 
    }

    .modal-content { width: 95% !important; }
}
