/* ============================================
   Z-IMAGE TURBO - PREMIUM LIQUID GLASS STYLE
   ============================================ */

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

body {
    font-family: 'DM Sans', sans-serif;
    background: #000000;
    color: #e8e8e8;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* ============================================
   ANIMATED BACKGROUND ORBS
   ============================================ */

.background-orbs {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: float 6s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    top: -10%;
    left: -15%;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
    top: 40%;
    right: -10%;
    animation-delay: 2s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    33% {
        transform: translateY(-30px) translateX(20px);
    }
    66% {
        transform: translateY(20px) translateX(-15px);
    }
}

/* ============================================
   PREMIUM GLASS CONTAINER
   ============================================ */

.glass-container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   HUGGING FACE LOGO SECTION
   ============================================ */

.hf-logo-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

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

.hf-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hf-logo-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 209, 30, 0.3);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 32px rgba(255, 209, 30, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hf-logo {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 8px rgba(255, 209, 30, 0.3));
    transition: transform 0.3s ease;
}

.hf-logo-link:hover .hf-logo {
    transform: scale(1.1) rotate(5deg);
}

.hf-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f5f5f5;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ============================================
   HEADER SECTION
   ============================================ */

.header-section {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.turbo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #60a5fa;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.08));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 50px;
    box-shadow: 
        0 4px 16px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.badge-icon {
    width: 14px;
    height: 14px;
    color: #60a5fa;
    filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.5));
}

.main-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.gradient-text {
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(96, 165, 250, 0.4));
    animation: shimmer 3s linear infinite;
    background-size: 200% auto;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    max-width: 650px;
    margin: 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================
   MAIN APPLICATION CARD
   ============================================ */

.app-main {
    width: 100%;
    max-width: 1300px;
    position: relative;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.glow-effect {
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    border-radius: 28px;
    filter: blur(30px);
    opacity: 0.5;
    animation: glow 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

.app-card {
    position: relative;
    background: rgba(15, 15, 15, 0.5);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.05) inset;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.1) inset;
}

.card-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    animation: shimmer 3s infinite;
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   GRADIO EMBED STYLING
   ============================================ */

.gradio-embed {
    min-height: 650px;
    width: 100%;
    border-radius: 24px;
    position: relative;
    z-index: 2;
}

gradio-app {
    border-radius: 24px;
    min-height: 650px;
}

/* ============================================
   FOOTER SECTION
   ============================================ */

.footer-section {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    animation: fadeIn 1s ease-out 0.8s both;
}

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

.footer-text {
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.01em;
}

.footer-link {
    color: #60a5fa;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.3);
}

.footer-link:hover {
    color: #93c5fd;
    border-bottom-color: #93c5fd;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .glass-container {
        padding: 1.5rem 1rem;
    }

    .hf-logo-section {
        margin-bottom: 1.5rem;
    }

    .hf-logo {
        width: 28px;
        height: 28px;
    }

    .hf-text {
        font-size: 0.8rem;
    }

    .header-section {
        margin-bottom: 2rem;
    }

    .badge-container {
        margin-bottom: 1rem;
    }

    .turbo-badge {
        padding: 0.4rem 1rem;
        font-size: 0.65rem;
        gap: 0.4rem;
    }

    .badge-icon {
        width: 12px;
        height: 12px;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .app-card {
        border-radius: 20px;
    }

    .gradio-embed {
        min-height: 500px;
    }

    .orb-1, .orb-2, .orb-3 {
        width: 300px;
        height: 300px;
        filter: blur(80px);
    }
}

@media (max-width: 480px) {
    .hf-logo-link {
        padding: 0.6rem 1.2rem;
        gap: 0.6rem;
    }

    .hf-logo {
        width: 24px;
        height: 24px;
    }

    .hf-text {
        font-size: 0.75rem;
    }

    .main-title {
        margin-bottom: 1rem;
    }

    .app-card {
        border-radius: 16px;
    }

    .gradio-embed {
        min-height: 450px;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}