:root {
    /* Color Palette - Deep Slate / Indigo Theme */
    --bg-color: #0f172a;       /* Slate 900 */
    --bg-accent: #1e293b;      /* Slate 800 */
    
    /* Neon Accents */
    --accent-cyan: #06b6d4;    /* Cyan 500 */
    --accent-orange: #f97316;  /* Orange 500 */
    --accent-glow: rgba(6, 182, 212, 0.5);
    --accent-orange-glow: rgba(249, 115, 22, 0.4);
    
    /* Text */
    --text-primary: #f8fafc;   /* Slate 50 */
    --text-secondary: #cbd5e1; /* Slate 300 */
    
    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Dimensions & Transitions */
    --slide-width: 100vw;
    --transition-speed: 1s;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden; 
    width: 100vw;
    height: 100vh;
    perspective: 1200px; /* Essential for 3D */
}

/* Background Animations */
.abstract-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top right, var(--bg-accent) 0%, var(--bg-color) 80%);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 25s infinite alternate ease-in-out;
}

.orb-1 { width: 500px; height: 500px; background: var(--accent-cyan); top: -150px; left: -150px; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-orange); bottom: -100px; right: -50px; animation-delay: -7s; }
.orb-3 { width: 350px; height: 350px; background: #6366f1; top: 50%; left: 30%; animation-delay: -12s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -70px) scale(1.2); }
    66% { transform: translate(-30px, 40px) scale(0.8); }
    100% { transform: translate(0, 0) scale(1); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.15;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 60px; }
}

/* Presentation Container - Horizontal Sliding */
.presentation-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    transition: transform var(--transition-speed) cubic-bezier(0.25, 1, 0.2, 1);
    transform-style: preserve-3d;
}

.slide {
    min-width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    opacity: 0;
    transform: scale(0.8) translateZ(-200px) rotateY(15deg);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) cubic-bezier(0.25, 1, 0.2, 1);
    transform-style: preserve-3d;
    filter: blur(10px);
}

.slide.active {
    opacity: 1;
    transform: scale(1) translateZ(0) rotateY(0deg);
    filter: blur(0px);
}

/* Glassmorphism Panel with 3D Tilt */
.glass-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 4rem;
    width: 100%;
    max-width: 1300px;
    height: 75vh;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.1);
    gap: 4rem;
    
    /* 3D Properties */
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease;
    will-change: transform;
}

/* Custom Layouts for Glass Panel */
.glass-panel.full-video-layout {
    flex-direction: column;
    justify-content: flex-start;
    gap: 2rem;
    padding: 3rem;
}

.large-video-wrapper {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    transform: translateZ(40px); /* Pop out effect */
}

.large-video-wrapper video {
    height: 100%;
    width: 100%;
    object-fit: contain;
    background: #000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--glass-border);
    transition: box-shadow 0.3s ease;
    cursor: pointer;
}

.large-video-wrapper video:hover {
    box-shadow: 0 30px 60px rgba(6, 182, 212, 0.3), 0 0 0 3px var(--accent-cyan);
}

.video-grid {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    height: 250px;
    justify-content: center;
    transform: translateZ(20px);
}

.video-grid video {
    width: 30%;
    height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--glass-border);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-grid video:hover {
    transform: scale(1.05) translateZ(40px);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.3), 0 0 0 2px var(--accent-orange);
}

/* Elements popping out of the glass panel */
.slide-content, .visual-note {
    transform: translateZ(40px); /* Makes content pop out */
}

.slide-content {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.visual-note {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-left: 1px solid var(--glass-border);
    padding-left: 4rem;
}

.visual-note.flex-center {
    border-left: none;
    padding-left: 0;
}

.text-center {
    align-items: center;
    text-align: center;
}

/* Video Showcase Styles */
.showcase-video {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--glass-border);
    background: #000;
    object-fit: contain; /* Cambiado a contain para no cortar los bordes del vídeo */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Indica que es clickable */
    position: relative;
    z-index: 10;
}

.showcase-video:hover {
    transform: scale(1.05) translateZ(60px);
    box-shadow: 0 30px 60px rgba(6, 182, 212, 0.3), 0 0 0 3px var(--accent-cyan);
}

/* Typography & Content */
h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, #fff 30%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

h3 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--accent-cyan);
    margin-bottom: 2rem;
}

.key-points {
    list-style: none;
    font-size: 1.35rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.key-points li {
    margin-bottom: 1.8rem;
    position: relative;
    padding-left: 2.5rem;
    transition: transform 0.2s, color 0.2s;
}

.key-points li:hover {
    transform: translateX(10px);
    color: #fff;
}

.key-points:not(.no-bullets) li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: bold;
    text-shadow: 0 0 10px var(--accent-orange-glow);
}

.author-closing {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* Abstract Visual Elements */
.abstract-element {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.abstract-element:hover {
    transform: scale(1.05) translateZ(50px);
    background: rgba(255, 255, 255, 0.05);
}

/* Specific Icons/Abstracts using CSS */
/* --- ADAS Vision Scanner Animation (Cover) --- */
.adas-vision-animation {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-container.realistic {
    width: 380px;
    height: 380px;
    position: relative;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 60px rgba(6, 182, 212, 0.2), inset 0 0 40px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    transform: translateZ(50px);
}

.scanner-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 110%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    filter: contrast(1.1) brightness(0.9) saturate(1.2);
    z-index: 1;
}

.scanner-color-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 2;
    mix-blend-mode: overlay;
}

/* Realistic HUD */
.hud-overlay.realistic-hud {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.realistic-hud .corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
}
.realistic-hud .corner.top-left { top: 15px; left: 15px; border-right: none; border-bottom: none; }
.realistic-hud .corner.top-right { top: 15px; right: 15px; border-left: none; border-bottom: none; }
.realistic-hud .corner.bottom-left { bottom: 15px; left: 15px; border-right: none; border-top: none; }
.realistic-hud .corner.bottom-right { bottom: 15px; right: 15px; border-left: none; border-top: none; }

.realistic-hud .crosshair.modern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
}
.realistic-hud .crosshair.modern::before { 
    content: ''; position: absolute;
    background: rgba(255, 255, 255, 0.7); width: 60px; height: 2px; left: -10px; top: 19px; 
}
.realistic-hud .crosshair.modern::after { 
    content: ''; position: absolute;
    background: rgba(255, 255, 255, 0.7); height: 60px; width: 2px; top: -10px; left: 19px; 
}

.scan-line.vibrant {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #ec4899, #06b6d4, transparent);
    box-shadow: 0 0 20px 5px rgba(6, 182, 212, 0.5);
    animation: scan-vertical-realistic 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes scan-vertical-realistic {
    0% { top: 0%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Realistic Bounding Boxes */
.realistic-box {
    position: absolute;
    z-index: 5;
    border: 2px solid;
    display: flex;
    opacity: 0;
    transition: all 0.2s;
    background: transparent !important; /* Quitar fondo sólido, que sea más realista */
    box-shadow: none !important;
    backdrop-filter: none;
}

.realistic-box .label {
    position: absolute;
    top: -24px;
    left: -2px;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px 4px 0 0;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    white-space: nowrap;
    text-transform: uppercase;
}

.box-bracket {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 3px solid;
}
.box-bracket.top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.box-bracket.bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; }

/* Colors */
.cyan-box {
    border-color: rgba(6, 182, 212, 0.4);
    width: 120px;
    height: 90px;
    top: 40%;
    left: 10%;
    animation: track-car-1 8s infinite;
}
.cyan-box .label { background: var(--accent-cyan); }
.cyan-box .box-bracket { border-color: var(--accent-cyan); }

.pink-box {
    border-color: rgba(236, 72, 153, 0.4);
    width: 90px;
    height: 70px;
    top: 45%;
    left: 60%;
    animation: track-car-2 10s infinite;
    animation-delay: 2s;
}
.pink-box .label { background: #ec4899; }
.pink-box .box-bracket { border-color: #ec4899; }

.green-box {
    border-color: rgba(34, 197, 94, 0.6);
    border-top: none;
    border-bottom: none;
    width: 200px;
    height: 120px;
    top: 55%;
    left: 50%;
    transform: translateX(-50%) perspective(500px) rotateX(60deg);
    animation: track-lane 5s infinite;
}
.green-box .label {
    background: rgba(34, 197, 94, 0.8);
    transform: perspective(500px) rotateX(-60deg) translateX(-50%); /* Counter-rotate label */
    top: -15px;
    left: 50%;
}

@keyframes track-car-1 {
    0%, 5% { opacity: 0; transform: translate(10px, -10px) scale(0.8); }
    10%, 80% { opacity: 1; transform: translate(0, 0) scale(1); }
    85%, 100% { opacity: 0; transform: translate(-20px, 10px) scale(1.2); }
}

@keyframes track-car-2 {
    0%, 10% { opacity: 0; transform: translate(-10px, -5px) scale(0.7); }
    15%, 75% { opacity: 1; transform: translate(0, 0) scale(1); }
    80%, 100% { opacity: 0; transform: translate(15px, -5px) scale(0.6); }
}

@keyframes track-lane {
    0%, 10% { opacity: 0; }
    20%, 80% { opacity: 1; }
    90%, 100% { opacity: 0; }
}
/* --- Fin ADAS Vision Scanner --- */

.scatter-plot-icon {
    background-image: 
        radial-gradient(var(--accent-orange) 5px, transparent 5px),
        radial-gradient(var(--accent-cyan) 5px, transparent 5px);
    background-position: 20px 20px, 80px 80px;
    background-size: 100px 100px, 120px 120px;
    opacity: 0.7;
    animation: panBackground 20s linear infinite alternate;
}

/* --- Edge Computing Animation --- */
.edge-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
    height: 100%;
}

.cloud-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    margin-bottom: 2rem;
}

.cloud-icon {
    width: 60px;
    height: 60px;
    color: var(--text-secondary);
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.latency-connection {
    position: relative;
    height: 50px;
    width: 2px;
    background: repeating-linear-gradient(to bottom, #ef4444 0, #ef4444 5px, transparent 5px, transparent 10px);
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.latency-connection span {
    position: absolute;
    left: 20px;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.red-cross {
    background: #0f172a;
    color: #ef4444;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    border: 2px solid #ef4444;
    line-height: 1;
    z-index: 2;
    animation: pulsate-red 2s infinite;
}

.smartphone-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.smartphone-body {
    width: 100px;
    height: 200px;
    border: 3px solid var(--text-primary);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px;
    position: relative;
    box-shadow: 0 0 30px var(--accent-glow), inset 0 0 20px rgba(6, 182, 212, 0.2);
    z-index: 2;
}

.smartphone-screen {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-pulse {
    width: 30px;
    height: 30px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-cyan);
    animation: ai-heartbeat 1s infinite alternate;
}

.data-ring {
    position: absolute;
    width: 70px;
    height: 70px;
    border: 2px dashed var(--accent-cyan);
    border-radius: 50%;
    animation: rotate 4s linear infinite;
}

.local-data-flow {
    position: absolute;
    width: 160px;
    height: 160px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.3);
    z-index: 1;
}

.data-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-orange);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-orange);
    top: -5px;
    left: calc(50% - 5px);
    transform-origin: 5px 85px;
    animation: orbit 2s linear infinite;
}

.d2 { animation-delay: -0.66s; }
.d3 { animation-delay: -1.33s; }

.edge-label {
    margin-top: 1rem;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--accent-glow);
}

@keyframes ai-heartbeat {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 1; }
}

@keyframes orbit {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulsate-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
/* --- Fin Edge Computing Animation --- */

.layers-icon {
    box-shadow: 
        0 15px 0 -2px var(--accent-cyan),
        0 30px 0 -4px var(--accent-orange),
        0 45px 0 -6px #6366f1;
    width: 50%;
    height: 30%;
    transform: rotateX(20deg) rotateY(-20deg);
}

.bounding-box-icon {
    border: 5px solid var(--accent-cyan);
    width: 60%;
    height: 50%;
    box-shadow: inset 0 0 30px var(--accent-glow), 0 0 30px var(--accent-glow);
    position: relative;
}
.bounding-box-icon::after {
    content: 'Car 95%';
    position: absolute;
    top: -30px;
    left: -5px;
    background: var(--accent-cyan);
    color: #000;
    padding: 2px 10px;
    font-weight: bold;
    font-size: 0.9rem;
}

.chart-icon::before {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 80%;
    height: 2px;
    background: var(--text-secondary);
}
.chart-icon::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 60%;
    height: 50%;
    border-bottom: 5px solid var(--accent-cyan);
    border-right: 5px solid var(--accent-orange);
    border-radius: 0 0 30px 0;
    filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.5));
}

.hud-icon {
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    width: 250px;
    height: 250px;
    box-shadow: inset 0 0 50px rgba(255,255,255,0.1);
}
.hud-icon::before { content: ''; position: absolute; width: 100%; height: 2px; background: rgba(255,255,255,0.3); }
.hud-icon::after { content: ''; position: absolute; height: 100%; width: 2px; background: rgba(255,255,255,0.3); }

.network-icon {
    background: 
        radial-gradient(circle at 30% 30%, var(--accent-cyan) 10px, transparent 10px),
        radial-gradient(circle at 70% 70%, var(--accent-orange) 10px, transparent 10px),
        radial-gradient(circle at 70% 30%, #6366f1 10px, transparent 10px);
    background-size: 100% 100%;
}

.qr-icon {
    width: 250px;
    height: 250px;
    background: 
        linear-gradient(45deg, transparent 45%, var(--accent-cyan) 45%, var(--accent-cyan) 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, var(--accent-orange) 45%, var(--accent-orange) 55%, transparent 55%);
    background-size: 25px 25px;
    border: 5px solid var(--text-primary);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 50px var(--accent-glow); }
    100% { transform: scale(1); opacity: 0.8; }
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(20px); }
}

@keyframes panBackground {
    0% { background-position: 0 0, 50px 50px; }
    100% { background-position: -50px -50px, 0 0; }
}

/* Controls */
.controls {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 2.5rem;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(15px);
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 100;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
    outline: none;
}

.nav-btn:hover {
    color: var(--accent-cyan);
    transform: scale(1.2);
}

.progress-bar-container {
    width: 250px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-orange));
    transition: width var(--transition-speed) ease-in-out;
    box-shadow: 0 0 10px var(--accent-glow);
}

.slide-indicator {
    position: fixed;
    bottom: 2.5rem;
    right: 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--glass-bg);
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* --- Slide 7: CoreML Optimization Animation --- */
.coreml-animation {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chip-container {
    position: relative;
    width: 250px;
    height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ane-chip {
    position: relative;
    width: 120px;
    height: 120px;
    background: #111;
    border: 2px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 15px rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.chip-core {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
    letter-spacing: 2px;
}

/* Simulate chip pins */
.ane-chip::before {
    content: ''; position: absolute;
    top: -10px; left: 10px; right: 10px; height: 10px;
    background: repeating-linear-gradient(90deg, #ffd700 0, #ffd700 4px, transparent 4px, transparent 12px);
}
.ane-chip::after {
    content: ''; position: absolute;
    bottom: -10px; left: 10px; right: 10px; height: 10px;
    background: repeating-linear-gradient(90deg, #ffd700 0, #ffd700 4px, transparent 4px, transparent 12px);
}

.heavy-data-stream {
    position: absolute;
    top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255,255,255,0.4);
    font-family: monospace;
    font-size: 1.2rem;
    line-height: 1;
    animation: data-fall 2s linear infinite;
}

.heavy-data-stream span {
    margin-bottom: 2px;
}

.optimized-data-stream {
    position: absolute;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fp16-packet {
    width: 40px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-glow);
    animation: packet-drop 1.5s ease-in-out infinite;
}
.fp16-packet:nth-child(2) { animation-delay: 0.2s; }
.fp16-packet:nth-child(3) { animation-delay: 0.4s; }

.size-label {
    position: absolute;
    font-weight: bold;
    font-size: 1.2rem;
}
.size-label.before { top: 40px; right: -40px; color: #ef4444; }
.size-label.after { bottom: 40px; right: -40px; color: var(--accent-cyan); text-shadow: 0 0 10px var(--accent-glow); }

@keyframes data-fall {
    0% { transform: translateY(-30px); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(50px); opacity: 0; }
}
@keyframes packet-drop {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    50% { transform: translateY(40px) scale(1); opacity: 1; }
    100% { transform: translateY(80px) scale(0.5); opacity: 0; }
}

/* --- Slide 9: Async Pipeline Animation --- */
.async-pipeline-animation {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.layers-container {
    position: relative;
    width: 300px;
    height: 300px;
    transform: rotateX(60deg) rotateZ(-45deg);
    transform-style: preserve-3d;
}

.pipeline-layer {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), inset 0 0 15px rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.layer-1 { transform: translateZ(0px); border-color: rgba(239, 68, 68, 0.5); }
.layer-2 { transform: translateZ(60px); border-color: rgba(249, 115, 22, 0.5); }
.layer-3 { transform: translateZ(120px); border-color: rgba(6, 182, 212, 0.5); }
.layer-4 { transform: translateZ(180px); border-color: rgba(168, 85, 247, 0.5); }

.layer-label {
    transform: rotateX(-90deg) translateZ(20px);
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.thread-dot {
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    box-shadow: 0 0 15px currentColor;
    top: 50%; left: 50%;
}

.t1 { color: #ef4444; background: #ef4444; animation: thread-move 3s ease-in-out infinite; }
.t2 { color: #f97316; background: #f97316; animation: thread-move 2.5s ease-in-out infinite reverse; }
.t3 { color: #06b6d4; background: #06b6d4; animation: thread-move 4s ease-in-out infinite; }
.t4 { color: #a855f7; background: #a855f7; animation: thread-move 2s ease-in-out infinite reverse; }

@keyframes thread-move {
    0% { transform: translate(-80px, -80px); }
    25% { transform: translate(80px, -80px); }
    50% { transform: translate(80px, 80px); }
    75% { transform: translate(-80px, 80px); }
    100% { transform: translate(-80px, -80px); }
}

.gcd-coordinator {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%) rotateX(-60deg) rotateY(-45deg);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 0 30px #fff;
    z-index: 10;
}
.gcd-coordinator::before {
    content: ''; position: absolute;
    width: 100px; height: 100px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* --- Slide 12: V2X Animation --- */
.v2x-animation {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v2x-container {
    position: relative;
    width: 350px;
    height: 350px;
}

.v2x-center-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 30px var(--accent-glow);
    z-index: 5;
}

.v2x-waves, .v2x-waves.delayed {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    opacity: 0;
    animation: v2x-broadcast 3s ease-out infinite;
}
.v2x-waves.delayed { animation-delay: 1.5s; }

.v2x-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.v2x-node .icon {
    width: 45px;
    height: 45px;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}
.v2x-node .node-label {
    background: var(--accent-orange);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Positioning */
.n-infrastructure { top: 10%; left: 50%; transform: translateX(-50%); }
.n-vehicle { bottom: 15%; right: 10%; }
.n-pedestrian { bottom: 15%; left: 10%; }
.n-cloud { top: 25%; right: 5%; }

.tech-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 15px var(--accent-cyan);
    letter-spacing: 3px;
}

@keyframes v2x-broadcast {
    0% { width: 60px; height: 60px; opacity: 1; border-width: 3px; }
    100% { width: 350px; height: 350px; opacity: 0; border-width: 1px; }
}

/* --- Slide 4: Gantt Animation --- */
.gantt-animation {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gantt-chart {
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    padding-bottom: 20px;
}
.gantt-row {
    height: 25px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
.gantt-bar {
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
    position: absolute;
    animation: gantt-grow 2s ease-out forwards;
}
.phase1 { background: var(--accent-cyan); width: 20%; left: 0%; }
.phase2 { background: var(--accent-orange); width: 30%; left: 15%; animation-delay: 0.5s; }
.phase3 { background: #a855f7; width: 30%; left: 40%; animation-delay: 1s; }
.phase4 { background: #ef4444; width: 20%; left: 65%; animation-delay: 1.5s; }
.phase5 { background: #10b981; width: 25%; left: 75%; animation-delay: 2s; }
.timeline-axis {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--glass-border);
}

@keyframes gantt-grow {
    0% { transform: scaleX(0); transform-origin: left; }
    100% { transform: scaleX(1); transform-origin: left; }
}

/* --- Slide 5: Budget Animation --- */
.budget-animation {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.budget-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        var(--accent-cyan) 0% 87%, 
        var(--accent-orange) 87% 99%, 
        #222 99% 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.5);
    position: relative;
    animation: rotate-in 1.5s ease-out;
}
.budget-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--bg-color);
    border-radius: 50%;
}
.total-cost {
    position: relative;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    z-index: 2;
}
.cost-label {
    position: relative;
    font-size: 0.7rem;
    color: var(--text-secondary);
    z-index: 2;
}
.cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 200px;
}
.cost-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #fff;
}
.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.color-dot.rrhh { background: var(--accent-cyan); box-shadow: 0 0 5px var(--accent-cyan); }
.color-dot.hw { background: var(--accent-orange); box-shadow: 0 0 5px var(--accent-orange); }
.color-dot.sw { background: #222; border: 1px solid #555; }

@keyframes rotate-in {
    from { transform: rotate(-90deg) scale(0); opacity: 0; }
    to { transform: rotate(0deg) scale(1); opacity: 1; }
}

/* --- Slide 14: Risk Animation --- */
.risk-animation {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.risk-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.risk-node, .solution-node {
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.risk-node {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #ef4444;
    animation: blink-danger 2s infinite;
}
.solution-node {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid #10b981;
    color: #10b981;
    animation: pulse-success 2s infinite 1s;
}
.mitigation-arrow {
    font-size: 2rem;
    color: var(--text-secondary);
    animation: flow-down 1.5s infinite;
}

@keyframes blink-danger {
    0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.6); }
}
@keyframes pulse-success {
    0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.6); }
}
@keyframes flow-down {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

/* --- Slide 2.5: Magic Quadrant Animation --- */
.magic-quadrant-animation {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quadrant-container {
    width: 400px;
    height: 400px;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}
.axis {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
}
.x-axis {
    bottom: 50%;
    left: 0;
    width: 100%;
    height: 2px;
}
.y-axis {
    left: 50%;
    top: 0;
    height: 100%;
    width: 2px;
}
.axis-label {
    position: absolute;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.x-label { bottom: 15px; right: 15px; }
.y-label { top: 15px; left: 15px; }

.quadrant-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: fade-in-node 0.5s ease-out forwards;
}
.quadrant-node .icon { font-size: 1.8rem; }

/* Positioning (0,0 is top left) */
.dashcam { top: 75%; left: 25%; animation-delay: 0.5s; border-color: rgba(239, 68, 68, 0.5); } /* Low cost, low fiabilidad */
.oem { top: 25%; left: 75%; animation-delay: 1.5s; border-color: rgba(249, 115, 22, 0.5); } /* High cost, high fiabilidad */
.comma { top: 45%; left: 65%; animation-delay: 2.5s; border-color: rgba(6, 182, 212, 0.5); } /* High cost, mid-high fiabilidad */
.smartdrive { top: 30%; left: 28%; animation-delay: 3.5s; border-color: var(--accent-cyan); box-shadow: 0 0 20px var(--accent-glow); background: rgba(0, 240, 255, 0.15); z-index: 5; } /* Low cost, High fiabilidad */

.smartdrive.pulse {
    animation: fade-in-node 0.5s ease-out 3.5s forwards, pulse-node 2s infinite 4s;
}

.star {
    position: absolute;
    top: -15px;
    right: -15px;
    color: #ffd700;
    font-size: 1.8rem;
    text-shadow: 0 0 15px #ffd700;
}

@keyframes fade-in-node {
    0% { transform: translate(-50%, -30%); opacity: 0; }
    100% { transform: translate(-50%, -50%); opacity: 1; }
}
@keyframes pulse-node {
    0%, 100% { box-shadow: 0 0 15px var(--accent-glow); transform: translate(-50%, -50%) scale(1); }
    50% { box-shadow: 0 0 35px var(--accent-glow); transform: translate(-50%, -50%) scale(1.05); }
}

/* Responsive */
@media (max-width: 1024px) {
    .glass-panel {
        flex-direction: column;
        height: auto;
        max-height: 85vh;
        overflow-y: auto;
        padding: 2rem;
    }
    
    .visual-note {
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding-left: 0;
        padding-top: 2rem;
        width: 100%;
        min-height: 250px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}
