/* ═══════════════════════════════════════════════════════
   VARIABLES & THEME
   ═══════════════════════════════════════════════════════ */
:root {
    --primary-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --accent-color: #00d4ff;
    --accent-secondary: #7b2ff7;
    --text-primary: #ffffff;
    --text-secondary: #b0b8d1;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.1);
    --focus-ring: 0 0 0 3px rgba(0, 212, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    line-height: 1.5;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(123, 47, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 107, 107, 0.08) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* ═══════════════════════════════════════════════════════
   PRESENTATION CONTAINER
   ═══════════════════════════════════════════════════════ */
.presentation-wrapper {
    position: relative;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-container {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    outline: none;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    max-height: 90vh;
    animation: slideFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    overflow-y: auto;
    outline: none;
}

.slide.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes slideFadeIn {
    from { opacity: 0; transform: translateX(40px) scale(0.97); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes slideFadeInReverse {
    from { opacity: 0; transform: translateX(-40px) scale(0.97); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.slide.going-back {
    animation: slideFadeInReverse 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ═══════════════════════════════════════════════════════
   SLIDE TYPE: COVER
   ═══════════════════════════════════════════════════════ */
.slide-cover {
    text-align: center;
    padding: 40px 30px;
    width: 100%;
}

.slide-cover .cover-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
}

.slide-cover h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 50%, #7b2ff7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slide-cover .cover-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.slide-cover .cover-author {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cover-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    border-radius: 2px;
    margin: 1.5rem auto;
}

/* ═══════════════════════════════════════════════════════
   SLIDE TYPE: TITLE + BULLETS
   ═══════════════════════════════════════════════════════ */
.slide-bullets {
    padding: 15px 30px;
    width: 100%;
}

.slide-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
    width: 100%;
}

.slide-header .header-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    border-radius: 1px;
}

.slide-header h2 {
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
}

.slide-header .header-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.bullets-list {
    list-style: none;
    padding: 0;
    width: 100%;
    max-width: 900px;
}

.bullets-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: bulletAppear 0.4s ease forwards;
    opacity: 0;
}

.bullets-list li:nth-child(1) { animation-delay: 0.1s; }
.bullets-list li:nth-child(2) { animation-delay: 0.2s; }
.bullets-list li:nth-child(3) { animation-delay: 0.3s; }
.bullets-list li:nth-child(4) { animation-delay: 0.4s; }
.bullets-list li:nth-child(5) { animation-delay: 0.5s; }

@keyframes bulletAppear {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.bullets-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(8px);
}

.bullet-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    color: white;
    margin-top: 2px;
}

.bullet-text {
    font-size: clamp(1rem, 2vw, 1.8rem);
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

.bullet-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   SLIDE TYPE: TITLE + IMAGE
   ═══════════════════════════════════════════════════════ */
.slide-image-only {
    padding: 15px 30px;
    width: 100%;
}

.slide-image-only .image-wrapper {
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--card-border);
    background: var(--card-bg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.slide-image-only .image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.image-caption {
    text-align: center;
    margin-top: 1rem;
    font-size: clamp(0.8rem, 1.3vw, 1rem);
    color: var(--text-secondary);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   SLIDE TYPE: TITLE + PARAGRAPHS + IMAGE
   ═══════════════════════════════════════════════════════ */
.slide-paragraphs-image {
    padding: 15px 30px;
    width: 100%;
}

.content-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 1100px;
}

.content-split.reverse .text-content { order: 2; }
.content-split.reverse .image-content { order: 1; }

.text-content p {
    font-size: clamp(1rem, 1.8vw, 1.6rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.text-content p:last-child { margin-bottom: 0; }

.highlight-box {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 47, 247, 0.1));
    border-left: 4px solid var(--accent-color);
    border-radius: 0 12px 12px 0;
    padding: 20px;
    margin: 1.5rem 0;
}

.highlight-box p {
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: clamp(1.1rem, 2vw, 1.8rem) !important;
}

/* ═══════════════════════════════════════════════════════
   SLIDE TYPE: CHART
   ═══════════════════════════════════════════════════════ */
.slide-chart {
    padding: 15px 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-container {
    width: 100%;
    max-width: 900px;
    height: 50vh;
    max-height: 400px;
    min-height: 250px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

/* ═══════════════════════════════════════════════════════
   SLIDE TYPE: TIMELINE
   ═══════════════════════════════════════════════════════ */
.slide-timeline {
    padding: 15px 30px;
    width: 100%;
}

.timeline-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-left: 30px;
    border-left: 4px solid var(--accent-color);
}

.timeline-step {
    position: relative;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: timelineAppear 0.5s ease forwards;
}

@keyframes timelineAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-icon {
    position: absolute;
    left: -52px;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 25px;
    backdrop-filter: blur(10px);
}

.timeline-time {
    color: var(--accent-color);
    font-weight: 700;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    margin-bottom: 5px;
}

.timeline-title {
    color: var(--text-primary);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 800;
    margin-bottom: 5px;
}

.timeline-text {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    line-height: 1.5;
}

.timeline-text strong {
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */
.image-content {
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--card-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.image-content img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    display: block;
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */
.nav-btn {
    position: fixed;
    bottom: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    color: var(--text-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */
.nav-btn {
    position: fixed;
    bottom: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    color: var(--text-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.nav-btn.disabled {
    opacity: 0.2;
    pointer-events: none;
}

.nav-prev { left: 40px; }
.nav-next { right: 40px; }

/* ═══════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════ */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 200;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    border-radius: 0 2px 2px 0;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════════════════════════════════════════════════════
   SLIDE COUNTER & DOTS
   ═══════════════════════════════════════════════════════ */
.slide-counter {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 8px 20px;
}

.slide-counter .current-slide {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
}

.slide-counter .separator {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.slide-counter .total-slides {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dot-indicators {
    position: fixed;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(0, 212, 255, 0.4);
}

.dot:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.dot.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════
   FULLSCREEN & UTILS
   ═══════════════════════════════════════════════════════ */
.fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    color: var(--text-secondary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.fullscreen-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.keyboard-hint {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.6;
    pointer-events: none;
}

.key-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.7rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    .nav-prev { left: 10px; }
    .nav-next { right: 10px; }

    .content-split {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .content-split.reverse .text-content { order: 1; }
    .content-split.reverse .image-content { order: 2; }

    .slide-container { padding: 10px 40px; }
    .slide { padding: 10px; }
    .slide-header { margin-bottom: 1rem; }
    .slide-header h2 { font-size: clamp(1.2rem, 4vw, 1.8rem); }
    .keyboard-hint { display: none; }
    
    .bullets-list li { padding: 8px 12px; gap: 10px; margin-bottom: 8px; }
    .bullet-icon { width: 28px; height: 28px; font-size: 0.8rem; }
    .bullet-text { font-size: 0.95rem; line-height: 1.4; }
    
    .text-content p { font-size: 0.95rem; line-height: 1.4; }
    .highlight-box { padding: 12px; margin: 1rem 0; }
    .highlight-box p { font-size: 1rem !important; }
    
    .timeline-step { margin-bottom: 15px; }
    .timeline-content { padding: 12px 15px; }
    .timeline-title { font-size: 1rem; margin-bottom: 2px; }
    .timeline-text { font-size: 0.85rem; line-height: 1.4; }
    
    .dot-indicators { bottom: 65px; }
    .slide-counter { bottom: 18px; padding: 6px 16px; }
}

@media (max-width: 480px) {
    .slide-cover .cover-icon { font-size: 3rem; }
    .nav-btn { width: 40px; height: 40px; font-size: 1rem; }
}

/* ═══════════════════════════════════════════════════════
   SCROLLBAR & ACCESSIBILITY
   ═══════════════════════════════════════════════════════ */
.slide::-webkit-scrollbar { width: 4px; }
.slide::-webkit-scrollbar-track { background: transparent; }
.slide::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════
   REMOTE & PUBLIC MODE OVERRIDES
   ═══════════════════════════════════════════════════════ */
.is-remote-mode .nav-btn,
.is-remote-mode .progress-bar-container,
.is-remote-mode .slide-counter,
.is-remote-mode .dot-indicators,
.is-remote-mode .fullscreen-btn,
.is-remote-mode .keyboard-hint,
.is-public-mode .nav-btn,
.is-public-mode .progress-bar-container,
.is-public-mode .slide-counter,
.is-public-mode .dot-indicators,
.is-public-mode .keyboard-hint {
    display: none !important;
}

.is-remote-mode .slide-container {
    padding-bottom: 80px; /* espacio para el botón mostrar */
}

.btn-mostrar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-mostrar:hover {
    transform: translateX(-50%) scale(1.05);
}

.btn-mostrar.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body::before { animation: none; }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --card-bg: rgba(0, 0, 0, 0.3);
        --card-border: rgba(255, 255, 255, 0.4);
    }
    .nav-btn, .fullscreen-btn, .dot {
        border-color: var(--text-primary);
    }
}