/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #ffffff;
    line-height: 1.6;
}

/* 1. Navigation Bar Styling */
.navbar {
    background-color: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 15px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.nav-socials {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: #aaaaaa;
    font-size: 18px;
    transition: color 0.3s ease;
}

.social-icon.yt:hover { color: #ff0000; }
.social-icon.fb:hover { color: #1877f2; }
.social-icon.insta:hover { color: #e1306c; }
.social-icon.tt:hover { color: #00f2fe; }

/* 2. Hero Header Section with Logo & Description */
.hero-header {
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
    padding: 50px 20px 40px 20px;
    text-align: center;
    border-bottom: 2px solid #ff0000;
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: background 0.5s ease-in-out;
}

.header-content {
    max-width: 700px;
    margin: -50px auto 25px auto !important; /* Circular logo overlaps banner beautifully */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

/* Glowing Circular Logo Frame */
.channel-logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid #ff0000; /* YouTube Red Border */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.55); /* Beautiful Red Glowing */
    margin-bottom: 15px;
    object-fit: cover;
}

/* Designed Title: Urdu (Red) Wri8es (White) */
.designed-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.red-text {
    color: #ff0000; 
}

.white-text {
    color: #ffffff; 
}

/* Welcome Subtitle: Small, Green */
.welcome-subtitle {
    font-size: 11px;
    font-weight: bold;
    color: #00ff88; 
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

/* 3. Search Box Styling */
.search-box-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #888888;
    font-size: 15px;
}

#search-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background-color: #222222;
    border: 1px solid #333333;
    border-radius: 25px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

#search-input:focus {
    border-color: #ff0000;
    background-color: #1a1a1a;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.2);
}

/* 4. Horizontal Scrolling Category Bar */
.category-scroll-container {
    width: 100%;
    overflow-x: auto; 
    white-space: nowrap; 
    padding: 12px 15px;
    background-color: #121212;
    border-top: 1px solid #222222;
    border-bottom: 1px solid #222222;
}

.category-scroll-container::-webkit-scrollbar {
    display: none; /* Mobile par scroll bar hide rahegi */
}

.category-bar {
    display: inline-flex;
    gap: 10px;
}

.category-pill {
    background-color: #222222;
    color: #ffffff;
    border: 1px solid #333333;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.category-pill:hover {
    border-color: #ff0000;
}

.category-pill.active {
    background-color: #ffffff; 
    color: #121212;
    border-color: #ffffff;
}

/* Main Container */
.container {
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 350px;
}

/* GRID FOR LONG VIDEOS */
.long-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 768px) {
    .long-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .long-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* GRID FOR SHORTS */
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 480px) {
    .shorts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .shorts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .shorts-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Video Card Design */
.video-card {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-3px);
}

/* Standard Video (16:9) */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Shorts (9:16) */
.shorts-wrapper {
    position: relative;
    padding-bottom: 177.77%;
    height: 0;
    overflow: hidden;
}

.shorts-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video Info */
.video-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.title-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.video-info h2 {
    font-size: 15px;
    font-weight: bold;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.expand-btn {
    background: none;
    border: none;
    color: #ff0000;
    font-size: 16px;
    cursor: pointer;
    padding: 3px 8px;
    transition: transform 0.3s ease;
    outline: none;
}

.expand-btn.active {
    transform: rotate(180deg);
    color: #ffffff;
}

.upload-date {
    font-size: 11px;
    color: #888888;
    margin-top: 5px;
}

.full-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease;
    font-size: 12px;
    color: #cccccc;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0;
    padding-top: 0;
    word-wrap: break-word;
}

.full-description.expanded {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 10px;
    padding-top: 10px;
}

.full-description a {
    color: #39a0ff;
    text-decoration: underline;
    font-weight: bold;
}

.full-description a:hover {
    color: #ff0000;
}

.short-card .video-info h2 {
    font-size: 13px;
    -webkit-line-clamp: 2;
}

/* Loading */
.loading {
    text-align: center;
    font-size: 16px;
    color: #ff0000;
    padding: 80px 0;
}

.no-videos {
    text-align: center;
    font-size: 15px;
    color: #aaaaaa;
    grid-column: 1 / -1;
    padding: 50px 0;
}

/* 5. Footer Section Styling */
.footer {
    background-color: #1a1a1a;
    border-top: 2px solid #ff0000 !important; /* Header jaisi chamakdar laal line */
    color: #aaaaaa;
    padding: 30px 20px 20px 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center; /* Desktop par icons aur text seedhi line mein honge */
    }
}

.footer-about {
    flex: 1.5;
    max-width: 600px;
}

.footer-about h3 {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 10px;
}

.footer-about p {
    font-size: 13px;
    line-height: 1.6;
}

.footer-bottom {
    max-width: 1200px;
    margin: 25px auto 0 auto;
    border-top: 1px solid #2a2a2a;
    padding-top: 15px;
    text-align: center;
    font-size: 11px;
}