.project-details-section {
    min-height: 100vh;
    padding: 120px 5% 80px;
    background: rgba(15, 23, 42, 0.7);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.back-link {
    margin-bottom: 2rem;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    color: #8b5cf6;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-link a:hover {
    transform: translateX(-5px);
}

.project-header {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out forwards;
}

.project-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.project-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out forwards 0.3s;
}

.project-main-image {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.project-main-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

.project-video-container {
    margin-bottom: 2rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.video-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.3);
}

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

.project-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    animation: fadeIn 1s ease-out forwards 0.6s;
    opacity: 0;
}

.section-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    color: #8b5cf6;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 2px;
    background: #8b5cf6;
    transition: width 0.3s ease;
}

.section-subtitle:hover::after {
    width: 100px;
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-5px);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    min-width: 110px;
}

.tech-item:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-8px);
}

/* Carousel Styles */
.carousel-container {
    margin-top: 2rem;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    padding: 2rem;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.carousel-slide img:hover {
    transform: scale(1.02);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 92, 246, 0.9);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.carousel-btn:hover {
    background: rgba(139, 92, 246, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
    left: 20px;
}

.carousel-btn-next {
    right: 20px;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.carousel-btn:disabled:hover {
    background: rgba(139, 92, 246, 0.9);
    transform: translateY(-50%) scale(0.9);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.carousel-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: #8b5cf6;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(139, 92, 246, 0.5);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: rgba(139, 92, 246, 0.8);
    border-color: #8b5cf6;
    transform: scale(1.3);
}

.carousel-dot.active::before {
    width: 6px;
    height: 6px;
}

/* Carousel loading state */
.carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    color: rgba(139, 92, 246, 0.7);
    font-size: 1.1rem;
}

.carousel-loading::before {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Touch and swipe indicators */
.carousel-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            rgba(139, 92, 246, 0.1) 0%,
            transparent 20%,
            transparent 80%,
            rgba(139, 92, 246, 0.1) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.carousel-wrapper:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .project-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1.5rem;
    }

    .project-content-wrapper {
        gap: 3rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .tech-stack {
        justify-content: center;
    }

    .carousel-slide {
        padding: 1rem;
    }

    .carousel-slide img {
        max-height: 60vh;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-btn-prev {
        left: 10px;
    }

    .carousel-btn-next {
        right: 10px;
    }

    .carousel-dots {
        gap: 0.6rem;
        margin-top: 1rem;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .carousel-dot.active::before {
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 480px) {
    .carousel-slide {
        padding: 0.5rem;
    }

    .carousel-slide img {
        max-height: 50vh;
        border-radius: 10px;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .carousel-btn-prev {
        left: 5px;
    }

    .carousel-btn-next {
        right: 5px;
    }
}