body {
    font-family: "Poppins", sans-serif;
    background-color: transparent; 
    color: #ffffff;
    overflow: hidden;
    cursor: none; 
    transition: opacity 1s ease;
}

.bg-gradient {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), #050505 40%),
                radial-gradient(circle at 80% 70%, rgba(220, 220, 255, 0.12), #050505 35%);
    animation: bg-divine-pan 60s linear infinite;
    z-index: -1;
}

@keyframes bg-divine-pan {
    0% {
        transform: translate(0%, 0%) rotate(0deg);
    }
    25% {
        transform: translate(5%, 10%) rotate(5deg);
    }
    50% {
        transform: translate(10%, 5%) rotate(0deg);
    }
    75% {
        transform: translate(5%, 0%) rotate(-5deg);
    }
    100% {
        transform: translate(0%, 0%) rotate(0deg);
    }
}

.scene {
    width: 100vw;
    height: 100vh;
    perspective: 3000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.panel {
    position: absolute;
    height: 85vh;
    width: 120px;
    
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.8s ease, 
                background 0.8s ease, 
                width 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                height 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                left 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                border-radius 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.8s ease,
                filter 0.5s ease;
    
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-sizing: border-box;
    cursor: pointer;
}

.carousel.hovering .panel:not([data-index="0"]):hover {
    filter: brightness(0.9);
    box-shadow: 0 0 25px 8px rgba(255, 255, 255, 0.2), 
                0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.panel-text {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90vw;
    max-width: 700px;
    transform: translate(-50%, -45%);
    text-align: center;
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 2.2rem);
    font-weight: 400;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.8s ease 0.3s, 
                text-shadow 0.3s ease, 
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.2s;
    pointer-events: none;
    z-index: 101;
}

.panel.active .panel-text {
    pointer-events: auto;
    cursor: pointer;
    transform: translate(-50%, -50%);
}
.panel.active .panel-text:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.panel-text[dir="rtl"] {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
}

.panel-num-active {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    font-family: "Inter Tight", sans-serif;
    font-weight: 900;
    font-size: 35vw;
    opacity: 0;
    transition: opacity 0.8s ease 0.2s, 
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.1s;
    pointer-events: none;
    z-index: 100;
    color: rgba(255, 255, 255, 0.05); 
}

/* --- Darker Gradient Ramp --- */
.panel-gradient-1 { background: linear-gradient(135deg, rgba(160, 160, 160, 0.8), rgba(140, 140, 140, 0.8)); color: #fff; }
.panel-gradient-2 { background: linear-gradient(135deg, rgba(140, 140, 140, 0.8), rgba(120, 120, 120, 0.8)); color: #fff; }
.panel-gradient-3 { background: linear-gradient(135deg, rgba(120, 120, 120, 0.8), rgba(100, 100, 100, 0.8)); color: #fff; }
.panel-gradient-4 { background: linear-gradient(135deg, rgba(100, 100, 100, 0.8), rgba(85, 85, 85, 0.8)); color: #fff; }
.panel-gradient-5 { background: linear-gradient(135deg, rgba(85, 85, 85, 0.8), rgba(70, 70, 70, 0.8)); color: #fff; }
.panel-gradient-6 { background: linear-gradient(135deg, rgba(70, 70, 70, 0.8), rgba(55, 55, 55, 0.8)); color: #fff; }
.panel-gradient-7 { background: linear-gradient(135deg, rgba(55, 55, 55, 0.8), rgba(40, 40, 40, 0.8)); color: #fff; }
.panel-gradient-8 { background: linear-gradient(135deg, rgba(40, 40, 40, 0.8), rgba(30, 30, 30, 0.8)); color: #fff; }
.panel-gradient-9 { background: linear-gradient(135deg, rgba(30, 30, 30, 0.8), rgba(20, 20, 20, 0.8)); color: #fff; }
.panel-gradient-10{ background: linear-gradient(135deg, rgba(20, 20, 20, 0.8), rgba(10, 10, 10, 0.8)); color: #fff; }

.panel.active {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 60px 15px rgba(255, 255, 255, 0.2),
                0 0 100px 30px rgba(255, 255, 255, 0.15);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.panel.active .panel-text,
.panel.active .panel-num-active {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.has-active .panel:not(.active) {
    opacity: 0.3; 
    filter: blur(2px); 
    border-color: rgba(255, 255, 255, 0.1);
}

/* --- FALLBACK & POPUP --- */
.fallback-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #050505;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}
.fallback-text {
    font-size: 8vw;
    font-weight: 700;
    color: #cccccc;
    font-family: "Inter Tight", sans-serif;
}
body.fallback-active .fallback-screen {
    opacity: 1;
    pointer-events: auto;
}
body.fallback-active .scene {
    opacity: 0;
    pointer-events: none;
}
.instruction-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1600;
    text-align: center;
    max-width: 400px;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    visibility: visible;
}
.instruction-popup.hidden {
    opacity: 0;
    visibility: hidden;
}

.instruction-popup h2 {
    margin-bottom: 15px;
    font-size: 1.5rem; 
    font-family: "Doto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700; 
    font-style: normal;
    font-variation-settings: "ROND" 0;
}
.instruction-popup p {
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    font-weight: 400;
}
.instruction-popup button {
    background-color: #f0f0f0;
    color: #111;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
}
.instruction-popup button:hover {
    background-color: #ffffff;
}
@keyframes subtleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.carousel.hovering {
    animation: subtleFloat 5s ease-in-out infinite;
}

/* --- Text Cursor Trail --- */
.text-cursor-trail {
    position: fixed; 
    top: 0;
    left: 0;
    pointer-events: none; 
    user-select: none;    
    z-index: 9999;        
    
    font-size: 1.875rem; 
    color: #ffffff;
    
    opacity: 1;
    transform: translate(-50%, -50%); 
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.text-cursor-trail.fading-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5); 
}

#info-icon {
    position: fixed;
    top: 20px;
    right: 25px;
    font-size: 1.8rem; 
    z-index: 1500; 
    cursor: pointer;
    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#info-icon.visible {
    opacity: 1;
    pointer-events: auto;
}