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

:root {
    --bg-color: #050505;
    --text-color: #f3f4f6;
    --accent-color: #8b5cf6;
    /* Vibrant Purple */
    --accent-hover: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.4);

    --panel-bg: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-hover: rgba(255, 255, 255, 0.06);

    --glow-spread: 20px;
    --blur: 16px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    /* Deep animated gradient mesh */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
}

.glow-container {
    width: 90%;
    max-width: 1600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    z-index: 20;
}

.app-header {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 20;
}

.app-header h1 {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: #ffffff;
    /* Subtle text glow */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-form {
    margin-left: -40%;
    width: 180%;
    will-change: transform;
    position: relative;
    z-index: 20;
}

.search-form.floating-mode input[type="text"] {
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.8);
    background: rgba(255, 255, 255, 0.08);
}

.input-wrapper {
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

input[type="text"] {
    flex: 1;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 1.25rem 4rem 1.25rem 2rem;
    font-size: 1.1rem;
    border-radius: 16px;
    color: #ffffff;
    font-family: inherit;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

input[type="text"]::placeholder {
    color: transparent;
}

.custom-placeholder {
    position: absolute;
    left: calc(2rem + 1px);
    top: 0;
    bottom: 0;
    width: 400px;
    overflow: hidden;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    font-size: 1.1rem;
    transition: opacity 0.2s ease;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 25%, black 40%, black 60%, transparent 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, transparent 25%, black 40%, black 60%, transparent 75%, transparent 100%);
}

.placeholder-track {
    position: absolute;
    top: calc(50% - 0.75rem);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.placeholder-item {
    height: 1.5rem;
    line-height: 1.5rem;
    display: flex;
    align-items: center;
    white-space: pre;
    /* Ensure spaces are preserved */
}

.static-target {
    opacity: 0;
    transition: opacity 0.15s ease-out;
    /* Fast fade in */
}

.static-target.show {
    opacity: 1;
}

input[type="text"]:focus {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.05);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.search-icon-btn {
    position: absolute;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.search-icon-btn svg {
    width: 28px;
    height: 28px;
}

.search-icon-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.search-icon-btn.zoom-ani svg {
    animation: magnify-zoom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes magnify-zoom {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3) rotate(5deg);
        color: var(--accent-color);
        filter: drop-shadow(0 0 8px var(--accent-color));
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}



/* Ambient HTML blobs */
.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
    transition: transform 0.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #8b5cf6;
    /* Purple */
    top: -200px;
    left: -100px;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: #38bdf8;
    /* Light Blue */
    bottom: -300px;
    right: -200px;
}

/* Balloon Button Styles */
.balloon-button {
    position: absolute;
    top: -135px;
    margin-top: var(--pull-y, 0px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    color: var(--accent-color);
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    pointer-events: auto;
    animation: balloon-appear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, balloon-float 3s ease-in-out infinite 0.6s;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--panel-border);
    transition: background 0.2s, border-color 0.2s, filter 0.2s;
}

.balloon-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
    cursor: pointer;
}

.balloon-button:active {
    filter: brightness(0.8);
}

.balloon-button::after {
    content: '';
    position: absolute;
    bottom: -90px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 90px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    border-radius: 2px;
}

.balloon-button.balloon-disappear {
    animation: balloon-vanish 0.2s ease-in forwards !important;
    pointer-events: none;
}

@keyframes balloon-appear {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5) translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
}

@keyframes balloon-float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-15px);
    }
}

@keyframes balloon-vanish {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.6) translateY(-40px);
    }
}