/* ===== General Styles ===== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
}

/* ===== MAIN HEADER (FIXED) ===== */
header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Logo */
.logo {
    font-size: 22px;
    font-weight: bold;
    color: #ff0000;
    flex: 1; /* ?? ye add karo */
}

/* Search bar */
.search-bar {
    position: absolute;       /* ?? magic */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    width: 100%;
    max-width: 500px;
}

.search-bar input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.search-bar button {
    padding: 8px 12px;
    border: none;
    background: #ff0000;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
}

/* ===== RIGHT SIDE LINKS ===== */
.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #ff0000 !important;
    font-weight: 500;
    font-size: 14px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #cc0000 !important;
}

/* ===== Video Feed ===== */
#videoFeed {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;      /* center align */
    gap: 15px;                    /* kam spacing */
    padding: 20px 40px;           /* sides se andar */
    box-sizing: border-box;
}

.video-card {
    width: calc(25% - 15px);       /* proper 4 per row */
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.3s;

    display: flex;
    flex-direction: column;
    justify-content: space-between;   /* ?? ye line add hui hai */
}


.video-card:hover {
    transform: scale(1.02);
}

.video-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;   /* full fill karega */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}


/* Title */
.video-card h3 {
    font-size: 14px;
    margin: 8px 10px 5px 10px;
    height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Info section */
.video-card .info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 10px 10px;
    font-size: 12px;
}

.video-card .info .channel-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

/* Watch button */
.video-card button {
    margin: 0 10px 10px 10px;
    padding: 6px;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.video-card button:hover {
    background: #cc0000;
}

/* Ad Card */
.ad-card {
    width: calc(25% - 15px);
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


/* ===== Responsive ===== */
@media(max-width:1200px){
    .video-card, .ad-card{ width: calc(50% - 15px); }
}
@media(max-width:768px){
    .video-card, .ad-card{ width: 100%; }
    #videoFeed { padding: 15px; }
}

@media(max-width:768px){

    .search-bar{
        position: static;      /* ?? absolute hata diya */
        transform: none;
        width: 100%;
        margin-top: 10px;
    }

    header{
        flex-direction: column;  /* ?? logo upar, search neeche */
        align-items: flex-start;
    }

}

table{
    width:100%;
    border-collapse:collapse;
    margin-top:10px;
}

th, td{
    border:1px solid #ccc;
    padding:8px;
    text-align:left;
}

button{
    background:red;
    color:#fff;
    border:none;
    padding:5px 10px;
    cursor:pointer;
}