* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    background-color: #0f1115; /* Ultra dark modern background */
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-bottom: 50px;
}

/* --- Tiranga & Header --- */
.tiranga-bar {
    height: 4px;
    width: 100%;
    background: linear-gradient(to right, #FF9933 33.3%, #FFFFFF 33.3%, #FFFFFF 66.6%, #138808 66.6%);
    position: fixed; top: 0; left: 0; z-index: 100;
}

header {
    text-align: center; padding: 40px 20px 20px;
    background: linear-gradient(180deg, #161b22 0%, #0f1115 100%);
    position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #222;
}

.brand-title {
    font-size: 2.2rem; font-weight: 800; margin-bottom: 15px;
    background: linear-gradient(to right, #FF9933, #FFFFFF, #138808);
    -webkit-background-clip: text; color: transparent;
}
.chakra { color: #4da6ff; -webkit-text-fill-color: #4da6ff; }

/* --- Search Bar --- */
.search-container {
    display: flex; justify-content: center; max-width: 600px; margin: 0 auto; gap: 8px;
}
#search-input {
    flex: 1; padding: 12px 20px; border-radius: 30px; border: 1px solid #30363d;
    background-color: #010409; color: white; font-size: 1rem; outline: none;
}
#search-input:focus { border-color: #138808; box-shadow: 0 0 15px rgba(19, 136, 8, 0.2); }
#search-btn {
    padding: 12px 25px; border-radius: 30px; border: none;
    background: linear-gradient(45deg, #138808, #0a4f04); color: white; font-weight: bold; cursor: pointer;
}
#search-btn:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(19, 136, 8, 0.4); }

/* --- Video Grid & Card --- */
.gallery {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; max-width: 1200px; margin: 30px auto; padding: 0 20px;
}
.video-card {
    background-color: #1a1e24; padding: 12px; border-radius: 12px; border: 1px solid #2a2f35;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0; transform: scale(0.9);
}
.video-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    border-color: #FF9933; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.video-card h3 {
    font-size: 1.05rem; margin-bottom: 6px; color: #e6edf3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.channel-name { font-size: 0.85rem; color: #FF9933; }

/* =========================================
   CUSTOM PLAYER & BRANDING STYLES
   ========================================= */
.custom-player-wrapper {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    border-radius: 10px; overflow: hidden; cursor: pointer;
    background-color: #000; margin-bottom: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.custom-thumbnail {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.3s ease;
}
.custom-player-wrapper:hover .custom-thumbnail { opacity: 0.6; }

/* The Dark Overlay */
.custom-player-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 60%);
    display: flex; justify-content: center; align-items: center;
}

/* Custom Center Play Button */
.custom-play-btn {
    width: 65px; height: 65px;
    background: rgba(19, 136, 8, 0.9); /* Tiranga Green */
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 24px; color: white;
    box-shadow: 0 0 30px rgba(19, 136, 8, 0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}
.custom-player-wrapper:hover .custom-play-btn {
    transform: scale(1.15); background: #FF9933; /* Saffron on hover */
    box-shadow: 0 0 40px rgba(255, 153, 51, 0.6);
}

/* Bottom-Right Branding Area */
.player-branding {
    position: absolute; bottom: 10px; right: 15px;
    display: flex; align-items: center; gap: 8px; z-index: 10;
}
.player-logo {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid #FF9933; /* Saffron border for your logo */
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.player-brand-text {
    font-weight: 700; font-size: 14px; color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
}

.custom-player-wrapper iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

/* =========================================
   ADVANCED PAWN LOADING ANIMATION
   ========================================= */
.loader-container { text-align: center; padding: 40px; grid-column: 1 / -1; }
.loader-container.hidden { display: none; }

.pawn-loader {
    position: relative; width: 80px; height: 80px; margin: 0 auto 20px;
    animation: rotatePawns 3s linear infinite;
}
.pawn-ring {
    position: absolute; width: 100%; height: 100%;
    border: 3px dashed rgba(255, 153, 51, 0.3); /* Faint saffron ring */
    border-radius: 50%;
}
.pawn-icon {
    position: absolute; top: 50%; left: 50%;
    font-size: 18px; color: #FF9933; /* Saffron pawns */
    margin-top: -9px; margin-left: -9px;
    text-shadow: 0 0 10px rgba(255, 153, 51, 0.8);
}

/* Positioning the 8 pawns in a circle */
.p1 { transform: rotate(0deg) translate(35px) rotate(0deg); }
.p2 { transform: rotate(45deg) translate(35px) rotate(-45deg); color: #ffffff; }
.p3 { transform: rotate(90deg) translate(35px) rotate(-90deg); color: #138808; }
.p4 { transform: rotate(135deg) translate(35px) rotate(-135deg); }
.p5 { transform: rotate(180deg) translate(35px) rotate(-180deg); color: #ffffff; }
.p6 { transform: rotate(225deg) translate(35px) rotate(-225deg); color: #138808; }
.p7 { transform: rotate(270deg) translate(35px) rotate(-270deg); }
.p8 { transform: rotate(315deg) translate(35px) rotate(-315deg); color: #ffffff; }

@keyframes rotatePawns { 
    to { transform: rotate(360deg); } 
}
@keyframes popIn { to { opacity: 1; transform: scale(1); } }
