@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;1,9..40,400&display=swap');

html, body {
    height: 100%;
    margin: 0;
    color: white;
    position: relative;
    overflow-v: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: -20px;
    background-image: url("/media/bg.jpg");
    background-color: black;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(4px);
    z-index: -1;
}

.body-overlay {
    position: fixed;
    inset: 0;
    background-color: black;
    opacity: 0.45;
    z-index: 0;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding: 60px 0;
    box-sizing: border-box;
}

.center-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

main {
    position: relative;
    z-index: 1;
}

.title-wrapper {
    position: relative;
    height: 140px;
    width: min(800px, 90vw);
    overflow: visible;
    z-index: 2;
}

.title-main, .title-sub {
    position: absolute;
    margin: 0;
    width: 100%;
    text-align: center;
    transition: transform 1.4s ease, opacity 1.4s ease;
    white-space: nowrap;
}

.title-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.06em;
}

.title-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transform: translateY(40px);
    opacity: 0;
    top: 50%;
    transform: translateY(calc(50% + 20px));
}

.title-main.slide-out {
    transform: translateY(-40px);
    opacity: 0;
}

.title-sub.slide-in {
    transform: translateY(50%);
    opacity: 1;
}

.input-wrapper {
    display: flex;
    align-items: center;
    width: min(800px, 90vw);
    height: 140px;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.input-wrapper > .chat-input-inner {
    display: flex;
    align-items: center;
    width: min(640px, 88vw);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    will-change: opacity, transform;
    padding: 6px 6px 6px 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 32px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper > .chat-input-inner:focus-within {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.chat-input-inner.shake {
    animation: shake 0.3s ease;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.02em;
    caret-color: white;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    color: black;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.15s ease;
}

.chat-submit:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.05);
}

.chat-submit:active {
    transform: scale(0.97);
}

.description-container {
    position: relative;
    z-index: 1;
    display: block;
    width: min(660px, 88vw);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 28px 36px;
    transition: transform 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

.description-container:hover {
    transform: translateY(-8px);
    background: white;
    border-color: white;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.description-container:hover h2 {
    color: black;
}

.description-container h2 {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
}

.description-container h3 {
    font-family: 'DM Sans', sans-serif;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.3s ease;
}

.description-container:hover h3 {
    color: black;
}

.answer-container {
    display: none;
    width: min(660px, 88vw);
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    scroll-behavior: smooth;
}

.answer-container::-webkit-scrollbar {
    width: 4px;
}

.answer-container::-webkit-scrollbar-track {
    background: transparent;
}

.answer-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.answer-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.answer-bubble {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 28px 36px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: fit-content;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: bounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-6px); opacity: 1; }
}

@keyframes shake {
    0%,100% { translate: 0 0; }
    25% { translate: -6px 0; }
    75% { translate: 6px 0; }
}

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

.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 56px;
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.topnav-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
    color: white;
    user-select: none;
}

.topnav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topnav-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.topnav-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.07);
}

header {
    padding-top: 116px !important;
}

.topnav-btn--danger {
    color: rgba(255, 80, 80, 0.7);
    border-color: rgba(255, 80, 80, 0.2);
}

.topnav-btn--danger:hover {
    color: rgba(255, 80, 80, 1);
    border-color: rgba(255, 80, 80, 0.5);
    background: rgba(255, 80, 80, 0.07);
}

.answer-bubble .gecko-h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.95);
    margin: 18px 0 6px;
}

.answer-bubble .gecko-h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin: 16px 0 4px;
}

.answer-bubble .gecko-p {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.88);
}

.answer-bubble .gecko-p:last-child {
    margin-bottom: 0;
}

.answer-bubble .gecko-list {
    margin: 6px 0 12px;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.answer-bubble .gecko-list li {
    position: relative;
    padding-left: 18px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.answer-bubble .gecko-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.35);
}

.answer-bubble .gecko-list--ordered {
    list-style: none;
    counter-reset: gecko-counter;
}

.answer-bubble .gecko-list--ordered li {
    counter-increment: gecko-counter;
    padding-left: 28px;
}

.answer-bubble .gecko-list--ordered li::before {
    content: counter(gecko-counter) ".";
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.answer-bubble strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
}

.answer-bubble em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
}

.answer-bubble > *:first-child {
    margin-top: 0;
}

@media (max-width: 480px) {

    html, body {
        overflow-y: hidden;
    }

    .title-sub {
        white-space: normal;
        text-align: center;
    }

    header {
        padding: 0 !important;
        padding-top: 58px !important;
        min-height: 100dvh;
        align-items: flex-start;
    }

    .center-stack {
        width: 100%;
        padding: 24px 16px;
        box-sizing: border-box;
        gap: 14px;
        justify-content: flex-start;
        min-height: 100%;
    }

    .title-wrapper {
        height: 120px;
    }

    .input-wrapper {
        width: 100%;
        height: 120px;
        padding: 0;
        box-sizing: border-box;
    }

    .description-container {
        padding: 18px 20px;
        border-radius: 18px;
        width: 100%;
        box-sizing: border-box;
    }

    .description-container h2 {
        font-size: 0.9rem;
    }

    .description-container h3 {
        font-size: 0.82rem;
        margin-top: 6px;
    }

    .answer-container {
        width: 100%;
        box-sizing: border-box;
        max-height: calc(100dvh - 280px);
    }

    .answer-bubble {
        padding: 20px;
        border-radius: 18px;
        font-size: 0.88rem;
    }

    .chat-input-inner {
        width: 100%;
        box-sizing: border-box;
        will-change: opacity, transform;
        padding: 6px 6px 6px 16px;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        opacity: 0;
        transform: translateY(16px);
    }

    .topnav {
        padding: 0 18px;
        height: 50px;
        display: flex;
        align-items: center;
        gap: 14px;
        position: fixed;
    }

    .topnav-logo {
        flex: 0 0 auto;
        min-width: max-content;
        position: relative;
        z-index: 5;
    }

    .topnav-links {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
    }

    .topnav-links::-webkit-scrollbar {
        display: none;
    }

    .topnav-btn {
        flex: 0 0 auto;
        font-size: 0.75rem;
        padding: 5px 10px;
        letter-spacing: 0.03em;
        scroll-snap-align: start;
    }

    .topnav::before,
    .topnav::after {
        content: "";
        position: absolute;
        top: 0;
        width: 24px;
        height: 100%;
        pointer-events: none;
        z-index: 3;
    }

    .topnav::before {
        left: 60px;
        background: linear-gradient(to right, #0b0b0b, transparent);
    }

    .topnav::after {
        right: 0;
        background: linear-gradient(to left, #0b0b0b, transparent);
    }
}