@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
    --primary: #1a2b5f;
    --primary-dark: #0f1a3d;
    --accent: #00c9a7;
    --accent-light: #e8faf7;
    --text-primary: #1a2b5f;
    --text-secondary: #5a6a8a;
    --text-muted: #8a9ab0;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(26, 43, 95, 0.08);
    --shadow-lg: 0 8px 40px rgba(26, 43, 95, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

.slider-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Bar */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 100%);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.top-bar.hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.top-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.top-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Version Toggle */
.version-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px;
}

.version-btn {
    padding: 8px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.version-btn:hover {
    color: var(--text-secondary);
}

.version-btn.active {
    background: var(--primary);
    color: white;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px;
}

.lang-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 100px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-secondary);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* Fullscreen Button */
.fullscreen-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

.fullscreen-btn svg {
    width: 20px;
    height: 20px;
}

.fullscreen-btn .icon-compress {
    display: none;
}

.fullscreen-btn.active .icon-expand {
    display: none;
}

.fullscreen-btn.active .icon-compress {
    display: block;
}

/* Slider */
.slider {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-light);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.slider img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.slider * {
    -webkit-user-drag: none;
}

.slides-wrapper {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    padding: 100px 60px 140px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-category {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent), #00a88a);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

.slide[data-category="ai-reports"] .slide-category {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
}

.slide-content {
    flex: 1;
    display: flex;
    gap: 48px;
    align-items: center;
}

.slide-image {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.slide-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.slide-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.feature-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.slide-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 100px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bottom-nav.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
    pointer-events: none;
}

.nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    color: var(--primary);
    background: var(--bg-light);
}

.nav-btn svg {
    width: 20px;
    height: 20px;
}

.dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: var(--text-muted);
}

.dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 5px;
}

/* Auto Toggle */
.auto-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 4px;
    border-left: 1px solid var(--border);
    padding-left: 16px;
    border-radius: 0;
}

.auto-toggle:hover {
    color: var(--primary);
}

.auto-toggle.active {
    color: var(--accent);
}

.auto-toggle svg {
    width: 16px;
    height: 16px;
}

.auto-toggle .icon-play {
    display: none;
}

.auto-toggle.active .icon-pause {
    display: block;
}

.auto-toggle.active .icon-play {
    display: none;
}

.auto-toggle:not(.active) .icon-pause {
    display: none;
}

.auto-toggle:not(.active) .icon-play {
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .slide-content {
        flex-direction: column;
        gap: 32px;
    }

    .slide-image {
        width: 100%;
    }

    .slide-image img {
        max-height: 280px;
    }

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

    .slide-title {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 16px 20px;
    }

    .top-title {
        font-size: 0.9rem;
    }

    .top-controls {
        gap: 8px;
    }

    .slide {
        padding: 80px 24px 120px;
        gap: 20px;
    }

    .slide-category {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .slide-image img {
        max-height: 240px;
    }

    .bottom-nav {
        bottom: 28px;
        padding: 8px 12px;
        gap: 12px;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
    }

    .dots {
        gap: 6px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .dot.active {
        width: 20px;
    }

    .auto-toggle {
        width: 32px;
        height: 32px;
        padding-left: 12px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide.active .slide-content {
    animation: fadeIn 0.5s ease forwards;
}

/* Keyboard focus styles */
.nav-btn:focus-visible,
.dot:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Touch swipe indicator */
@media (pointer: coarse) {
    .slider::after {
        content: '';
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
