/* Import only the weights we need to improve loading time */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #000;
    color: #eee;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #eee;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Carousel Container */
.carousel {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* Carousel Items */
.carousel .list .item {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: opacity, transform;
}

.carousel .list .item:first-child {
    opacity: 1;
}

.carousel .list .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0); /* Hardware acceleration */
}

/* Content Styling */
.carousel .list .item .content {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1140px;
    text-align: left;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel .list .item .content img {
    max-width: 450px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.carousel .list .item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.carousel .list .item .title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #FFD700;
    font-weight: bold;
    line-height: 1.3;
}

.carousel .list .item .topic {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #fff;
    letter-spacing: 2px;
    font-weight: bold;
}

.carousel .list .item .description {
    font-size: 1.1rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* Thumbnail Navigation */
.thumbnail {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
    flex-wrap: wrap;
    justify-content: center;
    width: 90%;
    max-width: 800px;
}

.thumbnail .item {
    width: 120px;
    height: 180px;
    flex-shrink: 0;
    border: 2px solid transparent;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.thumbnail .item:hover {
    border: 2px solid #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: translateY(-5px);
}

.thumbnail .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.thumbnail .item .content {
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px;
    border-radius: 5px;
}

.thumbnail .item .content .title {
    font-weight: 500;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation Arrows */
.arrows {
    position: absolute;
    bottom: 50px;
    right: 50px;
    z-index: 100;
    display: flex;
    gap: 15px;
    align-items: center;
}

.arrows button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrows button:hover {
    background-color: #FFD700;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: scale(1.1);
}

/* Progress Indicator - Removed timer functionality */
.time {
    display: none; /* Hide the timer element */
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(30px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Content Animation */
.carousel .list .item:first-child .content .author,
.carousel .list .item:first-child .content .title,
.carousel .list .item:first-child .content .topic,
.carousel .list .item:first-child .content .description,
.carousel .list .item:first-child .content .buttons {
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

.carousel .list .item:first-child .content .author {
    animation-delay: 0.2s;
}

.carousel .list .item:first-child .content .title {
    animation-delay: 0.4s;
}

.carousel .list .item:first-child .content .topic {
    animation-delay: 0.6s;
}

.carousel .list .item:first-child .content .description {
    animation-delay: 0.8s;
}

.carousel .list .item:first-child .content .buttons {
    animation-delay: 1s;
}

/* Slide Transitions */
.carousel.next .list .item:first-child {
    animation: fadeOut 0.5s forwards;
}

.carousel.next .list .item:nth-child(2) {
    opacity: 1;
    animation: fadeIn 0.5s forwards;
}

.carousel.prev .list .item:first-child {
    animation: fadeOut 0.5s forwards;
}

.carousel.prev .list .item:nth-child(4) {
    opacity: 1;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 1024px) {
    .carousel .list .item .content {
        padding-right: 0;
        max-width: 90%;
    }

    .arrows {
        right: 20px;
        bottom: 100px;
    }
}

@media screen and (max-width: 768px) {
    /* Carousel mobile styles */
    .carousel .list .item .content {
        padding: 15px;
        text-align: center;
    }
    
    .carousel .list .item .description {
        margin: 0 auto;
    }
    
    .thumbnail {
        bottom: 20px;
    }
    
    .thumbnail .item {
        width: 80px;
        height: 120px;
    }
    
    .arrows {
        bottom: 150px;
        right: 50%;
        transform: translateX(50%);
    }

    .carousel .list .item .title {
        font-size: 2rem;
    }

    .carousel .list .item .topic {
        font-size: 1.5rem;
    }

    .carousel .list .item .description {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .carousel .list .item .title {
        font-size: 1.8rem;
    }
    
    .carousel .list .item .topic {
        font-size: 1.4rem;
    }
    
    .carousel .list .item .description {
        font-size: 0.9rem;
    }
    
    .thumbnail {
        gap: 10px;
    }
    
    .thumbnail .item {
        width: 60px;
        height: 90px;
    }
    
    .thumbnail .item .content .title {
        font-size: 0.7rem;
    }
    
    .arrows button {
        width: 40px;
        height: 40px;
    }
}