/* General styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: black;
    text-align: center;
}

/* Header styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: red;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    position: relative;
}

.logo img {
    height: 45px;
    border-radius:50%;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    border-radius: 20px;
    padding: 5px 10px;
    flex-grow: 1;
    max-width: 400px;
    margin: 0 10px;
}

.search-box input {
    border: none;
    outline: none;
    padding: 5px;
    width: 100%;
    background: transparent;
    color: black;
}

.icons {
    display: flex;
    gap: 10px;
}

.icons i {
    font-size: 24px;
    cursor: pointer;
}

/* Profile Section */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 20px 0;
}

.channel-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.profile-info {
    text-align: center;
}

.channel-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.subscribe-btn {
    background-color: red;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.subscribe-btn:hover {
    background-color: darkred;
}

/* Shorts section */
.shorts-container {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px;
    white-space: nowrap;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.shorts-container::-webkit-scrollbar {
    display: none;
}

.shorts-slider {
    display: flex;
    gap: 10px;
    transition: transform 0.3s ease-in-out;
}

.short {
    flex: 0 0 auto;
    width: 200px;
    height: 356px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    scroll-snap-align: start;
}

.short iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Videos section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.video {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.video iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
}

/* Hide leftmost shorts dynamically */
.short.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .short {
        width: 180px;
        height: 320px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    }
    
    .video iframe {
        height: auto;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    
    .search-box {
        max-width: 300px;
        margin-top: 10px;
    }
    
    .short {
        width: 140px;
        height: 260px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .video iframe {
        height: auto;
    }
}

@media (max-width: 600px) {
    .short {
        width: 120px;
        height: 220px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .video iframe {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
