/* H3X Presentation - Enhanced UX & Visual Polish */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    background: #0a0a0a;
    color: #ffffff;
}

/* Custom Scrollbar Styling - Enhanced */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00d4ff 0%, #00ff88 100%);
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ff88 0%, #00d4ff 100%);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
    transform: scale(1.1);
}

/* Firefox Scrollbar */
* {
    scrollbar-color: linear-gradient(180deg, #00d4ff 0%, #00ff88 100%) rgba(0, 0, 0, 0.3);
    scrollbar-width: thin;
}

:root {
    /* Core color palette */
    --h3x-cyan: #00d4ff;
    --h3x-green: #00ff88;
    --h3x-yellow: #ffdd00;
    --h3x-purple: #9b59b6;
    --h3x-red: #ff6b6b;
    
    /* Semantic colors */
    --color-scarcity: var(--h3x-red);
    --color-centralization: var(--h3x-purple);
    --color-lattice: var(--h3x-cyan);
    --color-convergence: var(--h3x-yellow);
    --color-abundance: var(--h3x-green);
    
    /* Background gradients */
    --gradient-primary: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    --gradient-highlight: linear-gradient(135deg, var(--h3x-cyan), var(--h3x-green));
    --gradient-card: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(26,26,46,0.7) 100%);
}

/* Progress Indicator Bar - Enhanced */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #00ff88 50%, #ffdd00 100%);
    width: 0%;
    transition: width 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.8), inset 0 0 8px rgba(0, 255, 136, 0.4);
}

/* Loading Screen - Enhanced */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loading-content {
    text-align: center;
    max-width: 400px;
    animation: fadeInScale 0.8s ease-out;
}

.loading-logo {
    margin-bottom: 3rem;
    position: relative;
}

.loading-logo::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0,212,255,0.25) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -1;
    animation: expandPulse 2s ease-in-out infinite;
}

@keyframes expandPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.3;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.h3x-logo {
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-highlight);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.loading-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    letter-spacing: 1px;
    animation: slideUp 0.8s ease-out 0.2s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #00ff88 50%, #ffdd00 100%);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
}

.loading-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Presentation Container */
.presentation-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--gradient-primary);
}

/* Slide Styles - Enhanced */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(100px) rotateY(10deg);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 2rem;
    perspective: 1000px;
}

.slide.active {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
    z-index: 10;
}

.slide.prev {
    transform: translateX(-100px) rotateY(-10deg);
    z-index: 5;
}

/* Slide Background with enhanced patterns */
.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(0, 255, 136, 0.15) 0%, transparent 50%);
    z-index: -1;
    overflow: hidden;
}

/* Add subtle grid pattern to backgrounds */
.slide-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
    animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(20px, 20px);
    }
}

/* Add floating particles to background */
.slide-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 212, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0, 255, 136, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 221, 0, 0.15), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(155, 89, 182, 0.15), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(0, 212, 255, 0.2), transparent),
        radial-gradient(1px 1px at 30% 80%, rgba(0, 255, 136, 0.2), transparent),
        radial-gradient(1px 1px at 10% 10%, rgba(255, 107, 107, 0.15), transparent);
    background-repeat: no-repeat;
    background-size: 200% 200%;
    animation: float 25s ease-in-out infinite;
    z-index: -1;
}

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

/* Slide Content - Enhanced */
.slide-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
    animation: slideInContent 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

@keyframes slideInContent {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Title - Enhanced */
.slide-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #00d4ff 50%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        filter: drop-shadow(0 0 0px rgba(0, 212, 255, 0));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
    }
}

.slide-subtitle {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    animation: fadeInUp 0.9s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    font-weight: 300;
    animation: fadeInUp 0.9s ease-out 0.4s both;
}

.slide-text.large {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 2rem;
    animation: fadeInUp 0.9s ease-out 0.5s both;
}

/* Highlight colors - Enhanced */
.highlight-cyan {
    color: #00d4ff;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transition: all 0.3s ease;
}

.highlight-cyan:hover {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    filter: brightness(1.2);
}

.highlight-green {
    color: #00ff88;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    transition: all 0.3s ease;
}

.highlight-green:hover {
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    filter: brightness(1.2);
}

.highlight-yellow {
    color: #ffdd00;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 221, 0, 0.5);
    transition: all 0.3s ease;
}

.highlight-yellow:hover {
    text-shadow: 0 0 20px rgba(255, 221, 0, 0.8);
    filter: brightness(1.2);
}

.highlight-blue {
    color: #4a9eff;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
    transition: all 0.3s ease;
}

.highlight-blue:hover {
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.8);
    filter: brightness(1.2);
}

/* Feature List - Enhanced */
.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

@media (max-width: 768px) {
    .feature-list {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.feature-item:hover::before {
    left: 100%;
}

.feature-item:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.15);
}

.feature-item i {
    font-size: 1.5rem;
    color: #00d4ff;
    flex-shrink: 0;
    margin-top: 0.2rem;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.feature-item span {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Navigation Controls - Enhanced */
.navigation-controls {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    padding: 1.2rem;
    border-radius: 60px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
    animation: slideUp 0.6s ease-out 0.5s both;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-btn:hover::before {
    width: 100px;
    height: 100px;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(0, 212, 255, 0.25);
    transform: scale(1.12);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.nav-btn.playing {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
    }
}

.auto-advance-btn.active {
    background: rgba(255, 221, 0, 0.2);
    color: #ffdd00;
    box-shadow: 0 0 20px rgba(255, 221, 0, 0.4);
}

/* Slide Indicator - Enhanced */
.slide-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    z-index: 100;
    animation: slideUp 0.6s ease-out 0.6s both;
    transition: all 0.3s ease;
}

.slide-indicator:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 212, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

/* Audio Progress Display - Enhanced */
.audio-progress-display {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: slideUp 0.6s ease-out 0.7s both;
}

.audio-progress-display.visible {
    opacity: 1;
}

.audio-progress-display:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 212, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

/* Tech Demo Button - Enhanced */
.tech-demo-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(15px);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.6s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tech-demo-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.tech-demo-btn:hover::before {
    left: 100%;
}

.tech-demo-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
}

.tech-demo-btn:active {
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .slide-title {
        font-size: 2.5rem;
    }
    
    .slide-subtitle {
        font-size: 1.4rem;
    }
    
    .slide-text {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .slide {
        padding: 1rem;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1.1rem;
    }
    
    .slide-text {
        font-size: 0.95rem;
    }
    
    .navigation-controls {
        bottom: 1rem;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .slide-indicator {
        bottom: 1rem;
        right: 1rem;
        font-size: 0.85rem;
    }
    
    .audio-progress-display {
        bottom: 1rem;
        left: 1rem;
        font-size: 0.8rem;
    }
    
    .tech-demo-btn {
        top: 1rem;
        right: 1rem;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Cursor enhancement */
body {
    cursor: default;
}

button, [role="button"], a[href], input[type="checkbox"], input[type="radio"] {
    cursor: pointer;
}

/* Focus states for accessibility */
button:focus-visible, [role="button"]:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Text selection enhancement */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.3);
    color: #ffffff;
}
