::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0B1221;
}

::-webkit-scrollbar-thumb {
    background: #1e2e45;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #00e5ff;
    }

.glass-panel {
    background: rgba(22, 34, 53, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.text-glow {
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

/* Mobile First & Optimization */
@media (max-width: 768px) {
    /* Disable hover on mobile and use active for tap feedback */
    .project-card:hover, .neu-card:hover {
        transform: none;
    }
    .project-card:active, .neu-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    #videoModal .relative, #youtubeModal .relative {
        aspect-ratio: 9 / 16;
        max-width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    #mobileMenu {
        padding-top: 2rem;
    }

    .mobile-link {
        padding: 1rem;
        width: 100%;
        text-align: center;
    }
}

/* 3D Interaction Hint Overlay */
.interaction-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(22, 34, 53, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 0.6rem 1.2rem;
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.interaction-hint.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

.interaction-hint span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.interaction-hint .hint-icon {
    font-size: 1.2rem;
    color: #00e5ff;
    animation: pulse-hint 2s infinite;
}

@keyframes pulse-hint {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.webgl, .webgl-ai {
    cursor: grab;
}

.webgl:active, .webgl-ai:active {
    cursor: grabbing;
}

/* Netflix Style Row */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.project-card {
    min-width: 300px;
    aspect-ratio: 16 / 9;
    transition: all 0.3s ease;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .project-card {
        width: calc((100% - (4 * 1.5rem)) / 5);
        min-width: calc((100% - (4 * 1.5rem)) / 5);
    }
}

@media (max-width: 1023px) {
    .project-card {
        flex: 0 0 45%;
        min-width: 45%;
    }
}

.project-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Simulation Stage Styles */
.simulation-grid {
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    position: relative;
}
.simulation-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, #162235 100%);
}

.card-hover-effect {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .card-hover-effect:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px -10px rgba(0, 229, 255, 0.15);
        border-color: rgba(0, 229, 255, 0.3);
    }

.iso-scene {
    perspective: 800px;
    width: 100%;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.iso-stage {
    position: relative;
    width: 120px;
    height: 120px;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateZ(45deg);
    transition: transform 0.5s ease;
}

.group:hover .iso-stage {
    transform: rotateX(60deg) rotateZ(45deg) translateZ(10px);
}

.iso-floor {
    position: absolute;
    inset: 0;
    background: rgba(11, 18, 33, 0.95);
    border: 1px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.1), inset 0 0 20px rgba(0,0,0,0.8);
    background-image: linear-gradient(rgba(0, 229, 255, 0.15) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 229, 255, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
}

    .iso-floor::before {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 8px;
        background: #050a14;
        transform-origin: top;
        transform: rotateX(-90deg);
    }

    .iso-floor::after {
        content: '';
        position: absolute;
        top: 0;
        left: 100%;
        width: 8px;
        height: 100%;
        background: #08101e;
        transform-origin: left;
        transform: rotateY(90deg);
    }

.hologram-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) translateZ(30px) rotateZ(-45deg) rotateX(-60deg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hologram-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    animation: float 6s ease-in-out infinite;
}

.chart-bar {
    position: absolute;
    bottom: 0;
    width: 12px;
    background: rgba(0, 229, 255, 0.6);
    border: 1px solid rgba(0, 229, 255, 0.8);
    transform-origin: bottom;
    transform: rotateX(-90deg);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

    .chart-bar:nth-child(1) {
        left: 15px;
        height: 25px;
        animation: bar-grow 2s infinite alternate ease-in-out;
    }

    .chart-bar:nth-child(2) {
        left: 35px;
        height: 45px;
        animation: bar-grow 2.5s infinite alternate ease-in-out 0.2s;
    }

    .chart-bar:nth-child(3) {
        left: 55px;
        height: 35px;
        animation: bar-grow 1.8s infinite alternate ease-in-out 0.4s;
    }

@keyframes bar-grow {
    0% {
        transform: rotateX(-90deg) scaleY(0.5);
        opacity: 0.5;
    }

    100% {
        transform: rotateX(-90deg) scaleY(1);
        opacity: 1;
    }
}

.scanner-beam {
    position: absolute;
    left: -10%;
    width: 120%;
    height: 2px;
    background: #00e5ff;
    box-shadow: 0 0 15px #00e5ff;
    animation: scan 3s linear infinite;
    opacity: 0.7;
}

@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.nebula-glow {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127, 0, 255, 0.3) 0%, transparent 70%);
    animation: pulse-glow 3s infinite ease-in-out;
    transform: translateZ(-10px);
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.circuit-path {
    position: absolute;
    background: #00e5ff;
    height: 2px;
    box-shadow: 0 0 5px #00e5ff;
    opacity: 0;
    animation: circuit-run 2s infinite linear;
}

@keyframes circuit-run {
    0% {
        width: 0;
        opacity: 1;
    }

    80% {
        width: 100px;
        opacity: 1;
    }

    100% {
        width: 100px;
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.webgl,
.webgl-ai {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 640px) {
    header .z-10.container {
        padding-bottom: 4rem; /* 64px */
    }
}
