/* DAMP Smart Drinkware - Hero Animation Component */

/* Performance-Optimized Bubble Curtain Reveal with Massive Logo */

:root {
    --hero-animation-duration: 9s;
    --curtain-formation-duration: 2s;
    --curtain-reveal-duration: 3s;
    --text-sequence-duration: 4s;

    /* Artistic Bubble Colors - Pure Blues/Whites/Grays Only */
    --bubble-pure-white: rgb(255 255 255 / 95%);
    --bubble-crystal: rgb(245 250 255 / 90%);
    --bubble-ice-blue: rgb(220 235 255 / 85%);
    --bubble-silver: rgb(200 210 225 / 90%);
    --bubble-steel-blue: rgb(160 180 210 / 85%);

    /* Brand Colors - No Orange Except in Logo */
    --damp-primary-400: var(--color-primary-400, #26c6f9);
    --damp-primary-500: var(--color-primary-500, #00d4ff);
    --damp-primary-600: var(--color-primary-600, #00bce6);
    --damp-primary-700: var(--color-primary-700, #09c);
    --damp-dark-bg: var(--color-background-dark, #0f0f23);
}

/* FIXED: Ensure loading state works properly */
.page-loading .hero-section,
.page-loading main,
.page-loading section:not(.hero-animation-overlay) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.page-loaded .hero-section,
.page-loaded main,
.page-loaded section {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out !important;
}

/* Base Animation Overlay */
.hero-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg,
        var(--damp-dark-bg) 0%,
        #1a1a2e 30%,
        #16213e 70%,
        var(--damp-dark-bg) 100%);
    z-index: 9999;
    overflow: hidden;
    pointer-events: auto;
    opacity: 1;
    transition: opacity var(--hero-animation-duration) ease-out;
}

.hero-animation-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.hero-animation-overlay.hidden {
    display: none;
}

/* ==================== Massive Logo Behind Curtain ==================== */

.massive-logo-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    opacity: 0;
    scale: 0.6;
    transition: all 2s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* FIXED: Ensure it never overflows */
    max-width: 90vw;
    max-height: 90vh;
}

.massive-reveal-logo {
    /* FIXED: Responsive logo sizing that always fits */
    width: min(50vw, 400px);
    height: min(50vw, 400px);
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 0 100px rgb(0 212 255 / 80%))
            drop-shadow(0 0 200px rgb(0 212 255 / 40%))
            drop-shadow(0 0 300px rgb(0 212 255 / 20%));
    opacity: 0;
    scale: 0.3;
    transition: all 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.damp-brand-text {
    /* FIXED: Responsive text sizing that always fits */
    font-size: clamp(2rem, 8vw, 6rem);
    font-weight: 900;
    color: var(--damp-primary-500);
    background: linear-gradient(135deg,
        var(--damp-primary-400) 0%,
        var(--damp-primary-500) 50%,
        var(--damp-primary-600) 100%);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    margin-top: 1rem;
    letter-spacing: 0.15em;
    text-shadow: 0 0 60px rgb(0 212 255 / 60%);
    opacity: 0;
    scale: 0.5;
    transform: translateY(30px);
    transition: all 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    width: 100%;
}

.phase-logo-reveal .massive-logo-background {
    opacity: 1;
    scale: 1;
}

.phase-logo-reveal .massive-reveal-logo {
    opacity: 1;
    scale: 1;
    animation: massiveLogoReveal 4s ease-out forwards;
}

.phase-damp-text .damp-brand-text {
    opacity: 1;
    scale: 1;
    transform: translateY(0);
    animation: dampTextReveal 3s ease-out forwards;
}

@keyframes massiveLogoReveal {
    0% {
        opacity: 0;
        scale: 0.3;
        filter: drop-shadow(0 0 100px rgb(0 212 255 / 80%)) blur(20px);
    }

    30% {
        opacity: 0.7;
        scale: 1.05;
        filter: drop-shadow(0 0 150px rgb(0 212 255 / 90%))
                drop-shadow(0 0 300px rgb(0 212 255 / 50%)) blur(5px);
    }

    60% {
        opacity: 0.95;
        scale: 0.98;
        filter: drop-shadow(0 0 120px rgb(0 212 255 / 80%))
                drop-shadow(0 0 250px rgb(0 212 255 / 40%)) blur(1px);
    }

    100% {
        opacity: 1;
        scale: 1;
        filter: drop-shadow(0 0 100px rgb(0 212 255 / 80%))
                drop-shadow(0 0 200px rgb(0 212 255 / 40%))
                drop-shadow(0 0 300px rgb(0 212 255 / 20%)) blur(0);
    }
}

@keyframes dampTextReveal {
    0% {
        opacity: 0;
        scale: 0.5;
        transform: translateY(30px);
        text-shadow: 0 0 60px rgb(0 212 255 / 60%);
    }

    50% {
        opacity: 0.8;
        scale: 1.1;
        transform: translateY(-10px);
        text-shadow: 0 0 100px rgb(0 212 255 / 90%);
    }

    100% {
        opacity: 1;
        scale: 1;
        transform: translateY(0);
        text-shadow: 0 0 80px rgb(0 212 255 / 70%);
    }
}

/* ==================== Artistic Bubble Curtain System ==================== */

.artistic-bubble-curtain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    overflow: hidden;
}

.artistic-curtain-bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    backdrop-filter: blur(2px);
    border: 1px solid rgb(255 255 255 / 30%);

    /* Artistic formation animation */
    animation: artisticBubbleForm var(--bubble-delay) ease-out forwards;
}

/* Optimized Bubble Types - Performance-Friendly */
.artistic-bubble-type-0 {
    background: radial-gradient(circle at 30% 30%, var(--bubble-pure-white), rgb(255 255 255 / 75%));
    box-shadow: 0 0 15px rgb(255 255 255 / 30%);
}

.artistic-bubble-type-1 {
    background: radial-gradient(circle at 30% 30%, var(--bubble-ice-blue), rgb(220 235 255 / 70%));
    box-shadow: 0 0 18px rgb(220 235 255 / 35%);
}

.artistic-bubble-type-2 {
    background: radial-gradient(circle at 30% 30%, var(--bubble-silver), rgb(200 210 225 / 75%));
    box-shadow: 0 0 20px rgb(200 210 225 / 30%);
}

/* Position bubbles */
.artistic-curtain-bubble {
    left: var(--bubble-x);
    top: var(--bubble-y);
    width: var(--bubble-size);
    height: var(--bubble-size);
}

/* Optimized Curtain Formation Animation */
@keyframes artisticBubbleForm {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    60% {
        opacity: var(--bubble-opacity, 0.9);
        transform: scale(1.1);
    }

    100% {
        opacity: var(--bubble-opacity, 0.9);
        transform: scale(1);
    }
}

/* ==================== Dramatic Curtain Reveal Effect ==================== */

.phase-logo-reveal .artistic-curtain-bubble {
    animation: dramaticCurtainReveal 3s ease-out var(--reveal-delay) forwards;
}

/* Optimized parting animation */
@keyframes dramaticCurtainReveal {
    0% {
        opacity: var(--bubble-opacity, 0.9);
        transform: scale(1) translate(0, 0);
    }

    40% {
        opacity: var(--bubble-opacity, 0.8);
        transform: scale(1.05) translate(calc(var(--reveal-distance) * 0.6), calc(var(--vertical-drift) * 0.5));
    }

    100% {
        opacity: 0;
        transform: scale(0.8) translate(var(--reveal-distance), var(--vertical-drift));
    }
}

/* ==================== Main Text Sequence ==================== */

.main-text-container {
    position: absolute;
    top: 82%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    text-align: center;
    width: 90%;
    max-width: 1000px;
}

.main-brand-text {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    color: var(--damp-primary-500);
    background: linear-gradient(135deg,
        var(--damp-primary-500) 0%,
        var(--damp-primary-600) 50%,
        var(--damp-primary-700) 100%);
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: 0.08em;
    text-shadow: 0 0 40px rgb(0 212 255 / 50%);
    opacity: 0;
    transform: translateY(40px);
    transition: all 2s ease-out;
}

.phase-main-text .main-brand-text {
    opacity: 1;
    transform: translateY(0);
    animation: mainTextReveal 2.5s ease-out forwards;
}

@keyframes mainTextReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
        text-shadow: 0 0 40px rgb(0 212 255 / 50%);
    }

    50% {
        opacity: 0.9;
        transform: translateY(-8px);
        text-shadow: 0 0 60px rgb(0 212 255 / 80%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        text-shadow: 0 0 50px rgb(0 212 255 / 60%);
    }
}

/* ==================== Responsive Design ==================== */

/* FIXED: Responsive Massive Logo */
@media (width <= 1024px) {
    .massive-reveal-logo {
        width: min(50vw, 400px);
        height: min(50vw, 400px);
        max-width: 400px;
        max-height: 400px;
    }

    .damp-brand-text {
        font-size: clamp(2rem, 8vw, 6rem);
        margin-top: 1rem;
        letter-spacing: 0.15em;
    }
}

/* FIXED: Enhanced Mobile Responsiveness */
@media (width <= 768px) {
    .massive-reveal-logo {
        width: min(60vw, 280px);
        height: min(60vw, 280px);
        max-width: 280px;
        max-height: 280px;
    }

    .damp-brand-text {
        font-size: clamp(1.5rem, 6vw, 3rem);
        margin-top: 0.5rem;
        letter-spacing: 0.1em;
    }

    .massive-logo-background {
        max-width: 95vw;
        max-height: 80vh;
    }

    .main-text-container {
        width: 95%;
        top: 85%;
    }

    .artistic-curtain-bubble {
        /* Smaller bubbles on mobile for better performance */
        --bubble-size: calc(var(--bubble-size) * 0.6);

        backdrop-filter: none; /* Remove backdrop filter on mobile */
    }

    /* Simplify animations on mobile */
    .phase-curtain-formation .artistic-curtain-bubble {
        animation: artisticBubbleForm 1s ease-out var(--bubble-delay) forwards;
    }

    .phase-logo-reveal .artistic-curtain-bubble {
        animation: dramaticCurtainReveal 2s ease-out var(--reveal-delay) forwards;
    }
}

@media (width <= 480px) {
    .massive-reveal-logo {
        width: min(70vw, 220px);
        height: min(70vw, 220px);
        max-width: 220px;
        max-height: 220px;
    }

    .damp-brand-text {
        font-size: clamp(1.2rem, 5vw, 2.5rem);
        margin-top: 0.3rem;
        letter-spacing: 0.08em;
    }

    .main-text-container {
        top: 87%;
    }

    .artistic-curtain-bubble {
        /* Even smaller bubbles on small mobile */
        --bubble-size: calc(var(--bubble-size) * 0.4);

        backdrop-filter: none; /* Remove backdrop filter on mobile */
        box-shadow: 0 0 8px rgb(255 255 255 / 20%); /* Simplified shadows */
    }

    /* Further simplify animations on small mobile */
    .phase-curtain-formation .artistic-curtain-bubble {
        animation: artisticBubbleForm 0.8s ease-out var(--bubble-delay) forwards;
    }

    .phase-logo-reveal .artistic-curtain-bubble {
        animation: dramaticCurtainReveal 1.5s ease-out var(--reveal-delay) forwards;
    }
}

/* FIXED: Ultra-small screens */
@media (width <= 320px) {
    .massive-reveal-logo {
        width: min(80vw, 180px);
        height: min(80vw, 180px);
        max-width: 180px;
        max-height: 180px;
    }

    .damp-brand-text {
        font-size: clamp(1rem, 4vw, 2rem);
        letter-spacing: 0.05em;
    }
}

/* FIXED: Landscape orientation on mobile */
@media (height <= 500px) and (orientation: landscape) {
    .massive-reveal-logo {
        width: min(30vh, 200px);
        height: min(30vh, 200px);
        max-width: 200px;
        max-height: 200px;
    }

    .damp-brand-text {
        font-size: clamp(1rem, 3vh, 2rem);
        margin-top: 0.2rem;
    }

    .massive-logo-background {
        max-height: 85vh;
    }
}

/* ==================== Enhanced Visual Effects ==================== */

/* Continuous logo pulsing after reveal */
.phase-damp-text .massive-reveal-logo {
    animation: massiveLogoReveal 4s ease-out forwards,
               massiveLogoPulse 6s ease-in-out infinite 3s;
}

@keyframes massiveLogoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 100px rgb(0 212 255 / 80%))
                drop-shadow(0 0 200px rgb(0 212 255 / 40%))
                drop-shadow(0 0 300px rgb(0 212 255 / 20%));
    }

    50% {
        filter: drop-shadow(0 0 130px rgb(0 212 255 / 90%))
                drop-shadow(0 0 260px rgb(0 212 255 / 50%))
                drop-shadow(0 0 400px rgb(0 212 255 / 30%));
    }
}

/* DAMP text pulsing effect */
.phase-main-text .damp-brand-text {
    animation: dampTextReveal 3s ease-out forwards,
               dampTextPulse 5s ease-in-out infinite 2s;
}

@keyframes dampTextPulse {
    0%, 100% {
        text-shadow: 0 0 80px rgb(0 212 255 / 70%);
    }

    50% {
        text-shadow: 0 0 120px rgb(0 212 255 / 90%);
    }
}

/* Simplified bubble formation without shimmer for better performance */
.phase-curtain-formation .artistic-curtain-bubble {
    animation: artisticBubbleForm 1.5s ease-out var(--bubble-delay) forwards;
}

/* ==================== Accessibility & Performance ==================== */

/* Respect user's motion preferences and optimize for low-end devices */
@media (prefers-reduced-motion: reduce) {
    .artistic-curtain-bubble,
    .massive-reveal-logo,
    .main-brand-text,
    .damp-brand-text,
    .massive-logo-background {
        animation-duration: 0.5s !important;
        animation-iteration-count: 1 !important;
    }

    .hero-animation-overlay {
        transition-duration: 0.5s !important;
    }

    .artistic-curtain-bubble {
        animation: curtainSimpleReveal 1s ease-out var(--reveal-delay) forwards;
    }
}

@keyframes curtainSimpleReveal {
    0% { opacity: var(--bubble-opacity, 0.9); }
    100% { opacity: 0; }
}

/* Additional performance optimizations for low-end devices */
@media (width <= 480px) and (height <= 800px) {
    .artistic-curtain-bubble {
        will-change: transform, opacity;
        transform: translateZ(0); /* Force hardware acceleration */
    }

    /* Reduce visual complexity on very small screens */
    .artistic-bubble-type-1,
    .artistic-bubble-type-2 {
        background: var(--bubble-pure-white);
        box-shadow: 0 0 10px rgb(255 255 255 / 20%);
    }
}

/* High contrast mode support */

/* @media (prefers-contrast: high) { */
    .main-brand-text,
    .damp-brand-text {
        color: var(--damp-primary-500) !important;
        -webkit-text-fill-color: var(--damp-primary-500) !important;
    }

    .artistic-curtain-bubble {
        border: 3px solid rgb(255 255 255 / 90%);
        background: rgb(255 255 255 / 95%) !important;
    }

    .massive-reveal-logo {
        filter: drop-shadow(0 0 100px var(--damp-primary-500)) !important;
    }

/* } */

/* Enhanced skip button */
.hero-skip-button {
    font-family: inherit;
    z-index: 10002; /* Higher than navigation and auth elements */
}

.hero-skip-button:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* ==================== ENHANCED DESKTOP EXPERIENCE ==================== */

/* Desktop Hero Animation - Massive and Stunning */
@media (width >= 1024px) {
    .massive-reveal-logo {
        width: min(45vw, 600px);
        height: min(45vw, 600px);
        max-width: 600px;
        max-height: 600px;
        filter: drop-shadow(0 0 120px rgb(0 212 255 / 90%))
                drop-shadow(0 0 240px rgb(0 212 255 / 50%))
                drop-shadow(0 0 360px rgb(0 212 255 / 30%));
    }

    .damp-brand-text {
        font-size: clamp(4rem, 8vw, 10rem);
        letter-spacing: 0.2em;
        margin-top: 2rem;
        text-shadow: 0 0 80px rgb(0 212 255 / 80%);
    }

    .massive-logo-background {
        max-width: 70vw;
        max-height: 80vh;
    }

    /* Enhanced bubble effects for desktop */
    .artistic-curtain-bubble {
        opacity: 0.9;
        backdrop-filter: blur(20px);
    }

    .artistic-bubble-type-0 {
        box-shadow: 0 0 40px rgb(255 255 255 / 30%);
    }

    .artistic-bubble-type-1 {
        box-shadow: 0 0 35px rgb(220 235 255 / 40%);
    }

    .artistic-bubble-type-2 {
        box-shadow: 0 0 45px rgb(160 180 210 / 50%);
    }
}

/* Ultra-wide desktop (1440px+) */
@media (width >= 1440px) {
    .massive-reveal-logo {
        width: min(40vw, 700px);
        height: min(40vw, 700px);
        max-width: 700px;
        max-height: 700px;
    }

    .damp-brand-text {
        font-size: clamp(5rem, 9vw, 12rem);
        letter-spacing: 0.25em;
        margin-top: 3rem;
    }
}

/* 4K Desktop (2560px+) */
@media (width >= 2560px) {
    .massive-reveal-logo {
        width: min(35vw, 800px);
        height: min(35vw, 800px);
        max-width: 800px;
        max-height: 800px;
    }

    .damp-brand-text {
        font-size: clamp(6rem, 10vw, 15rem);
        letter-spacing: 0.3em;
        margin-top: 4rem;
    }
}

/* FIXED: Animation phases with proper timing and no overlaps */

/* Phase 1: Bubble curtain formation (0s) */
.phase-curtain-formation .artistic-curtain-bubble {
    opacity: 0.8;
    animation: bubbleFormation 2s ease-in-out forwards;
}

@keyframes bubbleFormation {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.5);
    }

    100% {
        opacity: 0.8;
        transform: translateY(0) scale(1);
    }
}

/* Phase 2: Bubbles rise up screen (2s) */
.phase-curtain-rise .artistic-curtain-bubble {
    animation: bubbleRise 1.5s ease-in-out forwards;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-50vh) scale(1.2);
        opacity: 0.9;
    }
}

/* Phase 3: Bubbles completely disappear (3.5s) */
.phase-curtain-disappear .artistic-curtain-bubble {
    animation: bubbleDisappear 0.5s ease-in-out forwards;
}

@keyframes bubbleDisappear {
    0% {
        transform: translateY(-50vh) scale(1.2);
        opacity: 0.9;
    }

    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

/* Phase 4: Logo appears (4s) */
.phase-logo-reveal .massive-logo-background {
    opacity: 1;
    animation: logoAppear 2s ease-out forwards;
}

.phase-logo-reveal .massive-reveal-logo {
    animation: logoReveal 2s ease-out forwards;
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes logoReveal {
    0% {
        opacity: 0;
        scale: 0.3;
        filter: blur(20px);
    }

    100% {
        opacity: 1;
        scale: 1;
        filter: blur(0);
    }
}

/* Phase 5: Logo fully visible (6s) */
.phase-logo-display .massive-reveal-logo {
    opacity: 1;
    scale: 1;
    filter: drop-shadow(0 0 100px rgb(0 212 255 / 80%));
}

/* Phase 6: Logo starts fading (7.5s) */
.phase-logo-fade .massive-reveal-logo {
    animation: logoFadeOut 1s ease-in-out forwards;
}

@keyframes logoFadeOut {
    0% {
        opacity: 1;
        scale: 1;
        filter: drop-shadow(0 0 100px rgb(0 212 255 / 80%));
    }

    100% {
        opacity: 0;
        scale: 0.8;
        filter: drop-shadow(0 0 0 rgb(0 212 255 / 0%));
    }
}

/* Phase 7: Logo completely gone (8.5s) */
.phase-logo-gone .massive-logo-background {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
}

/* Phase 8: DAMP text appears (9s) */
.phase-damp-text .damp-brand-text {
    opacity: 1;
    animation: dampTextAppear 1s ease-out forwards;
}

@keyframes dampTextAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Phase 9: Main text appears (10s) */
.phase-main-text .main-brand-text {
    opacity: 1;
    animation: mainTextAppear 1.5s ease-out forwards;
}

@keyframes mainTextAppear {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FIXED: Ensure all elements start hidden */
.massive-logo-background,
.damp-brand-text,
.main-brand-text {
    opacity: 0;
}

.artistic-curtain-bubble {
    opacity: 0;
}

/* FIXED: Mobile responsive timing */
@media (width <= 768px) {
    @keyframes bubbleFormation {
        0% {
            opacity: 0;
            transform: translateY(50px) scale(0.5);
        }

        100% {
            opacity: 0.7;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes bubbleRise {
        0% {
            transform: translateY(0) scale(1);
            opacity: 0.7;
        }

        100% {
            transform: translateY(-40vh) scale(1.1);
            opacity: 0.8;
        }
    }
}

/* ==================== SEQUENTIAL ANIMATION STYLES ==================== */

/* Animation overlay for sequential system */
.hero-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg,
        var(--damp-dark-bg) 0%,
        #1a1a2e 30%,
        #16213e 70%,
        var(--damp-dark-bg) 100%);
    z-index: 9999;
    overflow: hidden;
    pointer-events: auto;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bubbles container */
.bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Animation elements positioning */
.animation-logo,
.animation-damp-text,
.animation-main-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    text-align: center;
    z-index: 10;
}

/* Skip button */
.animation-skip-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002; /* Higher than navigation and auth elements */
    background: rgb(255 255 255 / 20%);
    color: white;
    border: 1px solid rgb(255 255 255 / 30%);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.animation-skip-button:hover {
    background: rgb(255 255 255 / 30%);
    transform: scale(1.05);
}

.animation-skip-button:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== SEQUENTIAL ANIMATION KEYFRAMES ==================== */

/* Bubble rise animation */
@keyframes bubbleRise {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0.5);
    }

    50% {
        opacity: 1;
        transform: translateY(50vh) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateY(-20vh) scale(0.8);
    }
}

/* Bubble disappear animation */
@keyframes bubbleDisappear {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* Fade in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Fade out animation */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */

/* Mobile-specific bubble sizing */
@media (width <= 768px) {
    .animation-bubble {
        width: 15px !important;
        height: 15px !important;
    }

    .animation-logo img {
        width: min(60vw, 250px) !important;
        height: min(60vw, 250px) !important;
    }

    .animation-damp-text h1 {
        font-size: clamp(2rem, 12vw, 4rem) !important;
    }

    .animation-main-text h2 {
        font-size: clamp(1.2rem, 6vw, 2rem) !important;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .animation-bubble,
    .animation-logo,
    .animation-damp-text,
    .animation-main-text {
        animation-duration: 0.1s !important;
    }
}
