:root {
    --primary-color: #8b5cf6;
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-bg: rgba(255, 255, 255, 0.9);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-color);
}

/* Background Animation */
.background-animate {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -2;
    background:
        radial-gradient(circle at calc(20% + var(--mouse-x) * 150px) calc(20% + var(--mouse-y) * 150px), rgba(236, 72, 153, 0.4), transparent 40%),
        radial-gradient(circle at calc(80% - var(--mouse-x) * 150px) calc(80% - var(--mouse-y) * 150px), rgba(139, 92, 246, 0.4), transparent 40%),
        radial-gradient(circle at calc(50% + var(--mouse-x) * 100px) calc(50% - var(--mouse-y) * 100px), rgba(59, 130, 246, 0.3), transparent 50%),
        conic-gradient(from 0deg at 50% 50%, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1), rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    filter: blur(80px) hue-rotate(calc(var(--mouse-x) * 50deg));
    transform: translate(calc(var(--mouse-x) * -50px), calc(var(--mouse-y) * -50px));
    transition: transform 0.2s ease-out, filter 0.2s ease-out;
    animation: none;
    /* Disable auto animation to let mouse take control, or keep it subtle */
}

@keyframes moveBlobs {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.glass-overlay {
    display: none;
    /* Removed dark overlay for light theme */
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 50;
}

.logo-container .logo {
    height: 48px;
    width: auto;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-color);
}

.container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.input-section {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    z-index: 20;
}

.input-section.moved-down {
    top: 85%;
    transform: translateY(-50%);
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 640px;
    transition: all 0.5s ease;
}

.input-section.moved-down .content-wrapper {
    gap: 0;
}

.input-section.moved-down .hero-title,
.input-section.moved-down .hero-subtitle {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0;
    text-align: center;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
    font-weight: 400;
}

.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    padding: 8px;
    border-radius: 9999px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px white;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: box-shadow 0.3s ease;
}

.input-wrapper:focus-within {
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 4px 6px -2px rgba(0, 0, 0, 0.025),
        0 0 0 2px rgba(139, 92, 246, 0.2);
}

input[type="text"] {
    flex: 1;
    border: none;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
    color: var(--text-color);
    width: 100%;
}

input[type="text"]::placeholder {
    color: #94a3b8;
}

#generateBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 4px;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.25);
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(139, 92, 246, 0.3);
}

#generateBtn:active {
    transform: translateY(0);
}

.qr-section {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    pointer-events: none;
}

.qr-section.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

#qrCode {
    padding: 24px;
    background: white;
    border-radius: 32px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.01),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#qrCode::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

#qrCode:hover {
    transform: translateY(-8px);
    box-shadow:
        0 25px 50px -12px rgba(139, 92, 246, 0.15),
        0 0 0 1px rgba(139, 92, 246, 0.1);
}

#qrCode:hover::before {
    opacity: 1;
}

#qrCode img {
    display: block;
    width: 200px;
    height: 200px;
}

.instruction {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    animation: slideUpFade 0.5s ease 0.8s forwards;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .header {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .input-wrapper {
        padding: 4px;
        margin: 0 1.5rem;
        /* Add side margin to reduce width */
        width: auto;
        /* Allow auto width to respect margins */
    }

    input[type="text"] {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    #generateBtn {
        width: 44px;
        height: 44px;
    }

    .qr-section {
        width: 100%;
        top: 40%;
    }
}