:root {
    --card-width: 300px;
    --card-height: 375px;
    --bg-color: #050505;
    --accent-color: #ff0055;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.carousel-container {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.carousel-wheel {
    position: relative;
    width: var(--card-width);
    height: var(--card-height);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    cursor: grab;
    will-change: transform;
}

.carousel-wheel:active {
    cursor: grabbing;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(180, 50, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);

    /* The reflection effect */
    -webkit-box-reflect: below 15px linear-gradient(transparent,
            transparent 45%,
            rgba(0, 0, 0, 0.3) 100%);
}

.carousel-item {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.carousel-item:hover {
    box-shadow: 0 0 20px rgba(180, 50, 255, 0.6), 0 0 40px rgba(180, 50, 255, 0.4), 0 0 60px rgba(180, 50, 255, 0.2);
    border-color: rgba(180, 50, 255, 0.9);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* Video/Reel indicator */
.carousel-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.carousel-item:hover .play-icon {
    opacity: 1;
}

.profile-card {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(57, 255, 20, 0.4);
    max-width: 400px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2), 0 0 30px rgba(57, 255, 20, 0.1);
}

.profile-card:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(57, 255, 20, 0.9);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.5), 0 0 40px rgba(57, 255, 20, 0.3), 0 0 60px rgba(57, 255, 20, 0.15);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-username {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: white;
}

.profile-name {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.controls {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    z-index: 100;
    pointer-events: none;
}

.instructions {
    font-size: 1.5rem;
    opacity: 0.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.instructions .arrow {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.55;
    }
}

.loading {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.post-description-panel {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 90%;
    max-width: 400px;
    max-height: 350px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 140, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.3), 0 0 40px rgba(255, 140, 0, 0.15);
    padding: 1.25rem;
    z-index: 100;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-description-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.description-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 140, 0, 0.8);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 140, 0, 0.3);
}

.description-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    max-height: 220px;
    overflow-y: auto;
    padding-right: 0.5rem;
    /* Add some space for scrollbar */
}

/* Custom scrollbar */
.description-content::-webkit-scrollbar {
    width: 6px;
}

.description-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.description-content::-webkit-scrollbar-thumb {
    background: rgb(255, 140, 0);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.8), 0 0 15px rgba(255, 140, 0, 0.5);
}

.description-content::-webkit-scrollbar-thumb:hover {
    background: rgb(255, 165, 50);
    box-shadow: 0 0 12px rgba(255, 140, 0, 1), 0 0 20px rgba(255, 140, 0, 0.7);
}

/* Description Toggle Button */
.description-toggle {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 140, 0, 0.5);
    border-radius: 30px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.2);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.description-toggle:hover {
    background: rgba(255, 140, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.4);
}

.description-toggle.active {
    background: rgba(255, 140, 0, 0.2);
    border-color: rgba(255, 140, 0, 1);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.4), inset 0 0 10px rgba(255, 140, 0, 0.2);
}

/* Responsive sizing */
@media (max-width: 768px) {
    :root {
        --card-width: 240px;
        --card-height: 300px;
    }

    /* Disable reflection on mobile for performance */
    .carousel-item {
        -webkit-box-reflect: unset;
    }

    .post-description-panel {
        bottom: 5rem;
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    :root {
        --card-width: 200px;
        --card-height: 250px;
    }

    .profile-card {
        top: 1rem;
        left: 1rem;
        padding: 0.75rem 1rem;
        max-width: calc(100% - 2rem);
    }

    .profile-avatar {
        width: 36px;
        height: 36px;
    }

    .profile-username {
        font-size: 0.85rem;
    }

    .profile-bio {
        font-size: 0.65rem;
        max-width: 200px;
    }
}