* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.video-carousel {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    min-height: 500px; /* Ensures space for loading */
}
body {
    background-color: #0f0f0f;
    font-family: 'Arial', sans-serif;
}

.gallery-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 20px;
    padding-bottom: 80px;
}

h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 2rem;
    font-size: 2.5em;
}

.video-carousel {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
}

.video-item {
    width: 300px;
    margin: 0 15px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 9/16;

}
@media screen and (max-width: 768px) {
    .video-item{
        width: 90%;
    }
}


.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    position: relative;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2;
}

.play-button::before {
    content: '';
    position: absolute;
    left: 55%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-width: 15px 0 15px 25px;
    border-style: solid;
    border-color: transparent transparent transparent #000;
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    z-index: 1;
    display: none;
}

.youtube-link {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 0.8em;
    z-index: 2;
}

/* Flickity custom styles */
.flickity-prev-next-button {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}
.flickity-prev-next-button:hover {
    background: rgba(255, 255, 255, 0.3);
}
.flickity-page-dots {
    bottom: -35px;
}


.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px);
}

.thumbnail {
    width: 100%;
    height: -webkit-fill-available;
    object-fit: cover;
}

.video-info {
    padding: 15px;
}

.video-title {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

#modal-video {
    width: 100%;
    height: auto;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}






.gallery-container {
    padding: 20px;
    align-items: center;
}

.category-title {
    color: #2c3e50;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}
:root {
    color-scheme: light only;
}
.video-card:hover {
    transform: translateY(-5px);
}

.thumbnail-container {
    position: relative;
    width: 100%;
    height: 200px;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.category-section {
    margin-bottom: 40px;
}

.category-section h1 {
    color: #ffffff;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid #2c3e50;
    margin-left: 4px;
}

.video-card:hover .play-button {
    opacity: 1;
}

.video-info {
    padding: 15px;
}

.video-title {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

/* Modal styles remain the same */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

#modal-video {
    width: 100%;
    height: auto;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}