@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Mono:wght@400;500&display=swap");

:root {
    color-scheme: dark;
    --ink: #171018;
    --paper: #fff7e8;
    --acid: #d9ff43;
    --pink: #ff477e;
    --orange: #ff7a00;
    --violet: #7a42ff;
    --line: rgba(23, 16, 24, 0.22);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 10%, #6c35d7 0, transparent 34rem),
        radial-gradient(circle at 100% 80%, #f14d58 0, transparent 38rem),
        #23142c;
    color: var(--paper);
    font-family: "DM Mono", monospace;
}

.glow {
    position: fixed;
    z-index: -1;
    width: 22rem;
    height: 22rem;
    border-radius: 47% 53% 64% 36%;
    filter: blur(2px);
    opacity: 0.45;
    animation: drift 13s ease-in-out infinite alternate;
}

.glow-one {
    top: -9rem;
    right: -5rem;
    background: var(--orange);
}

.glow-two {
    bottom: -10rem;
    left: -6rem;
    background: var(--violet);
    animation-delay: -5s;
}

main {
    width: min(760px, calc(100% - 28px));
    margin: 0 auto;
    padding: clamp(42px, 8vh, 86px) 0 90px;
}

header {
    margin-bottom: 28px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--acid);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
.submit-button {
    font-family: "Archivo Black", sans-serif;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(3.25rem, 13vw, 7.5rem);
    line-height: 0.82;
    letter-spacing: -0.075em;
    text-shadow: 5px 5px 0 var(--pink);
}

.intro {
    margin-bottom: 0;
    color: rgba(255, 247, 232, 0.8);
    font-size: clamp(0.85rem, 2.4vw, 1rem);
    line-height: 1.6;
}

.oracle-card,
.result-card {
    border: 3px solid var(--ink);
    border-radius: 22px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 9px 9px 0 var(--ink);
}

.oracle-card {
    padding: clamp(20px, 5vw, 38px);
}

.oracle-card > label,
legend {
    display: block;
    margin-bottom: 12px;
    font-family: "Archivo Black", sans-serif;
    font-size: clamp(1.15rem, 4vw, 1.7rem);
    line-height: 1.1;
}

textarea {
    width: 100%;
    min-height: 118px;
    resize: vertical;
    border: 3px solid var(--ink);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--ink);
    font: 500 1rem/1.5 "DM Mono", monospace;
    padding: 15px;
}

textarea:focus {
    box-shadow: 0 0 0 4px var(--acid);
}

.again-button,
#connectionButton {
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: 500 0.72rem "DM Mono", monospace;
    letter-spacing: 0.08em;
    padding: 8px 12px;
    cursor: pointer;
}

.submit-button {
    width: 100%;
    border: 3px solid var(--ink);
    border-radius: 12px;
    background: var(--acid);
    color: var(--ink);
    font-size: clamp(1rem, 3vw, 1.35rem);
    margin-top: 18px;
    padding: 18px;
    box-shadow: 5px 5px 0 var(--ink);
    cursor: pointer;
}

.submit-button:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--ink);
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.status {
    min-height: 1.25em;
    margin: 14px 0 -6px;
    color: #9b274b;
    font-size: 0.76rem;
    text-align: center;
}

.result-card {
    position: relative;
    margin-top: 28px;
    padding: clamp(22px, 6vw, 44px);
    background: var(--acid);
}

.result-card[hidden] {
    display: none;
}

.result-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.drink-type,
.drink-price,
.oracle-mark {
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    padding: 7px 11px;
}

.result-badges {
    display: flex;
    gap: 7px;
}

.drink-price {
    background: var(--pink);
    font-family: "Archivo Black", sans-serif;
}

.result-card h2 {
    max-width: 650px;
    margin-bottom: 9px;
    font-size: clamp(2.2rem, 9vw, 5.4rem);
    line-height: 0.91;
    letter-spacing: -0.055em;
}

.tagline {
    max-width: 580px;
    margin-bottom: 30px;
    font-size: clamp(0.9rem, 2.8vw, 1.1rem);
    line-height: 1.5;
}

.recipe-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    padding: 24px 0;
}

.recipe-grid h3 {
    margin-bottom: 10px;
    font-family: "Archivo Black", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

ul,
ol {
    margin: 0;
    padding-left: 1.35rem;
    font-size: 0.84rem;
    line-height: 1.65;
}

.why {
    margin: 22px 0 18px;
    font-size: 0.85rem;
    line-height: 1.55;
}

.why::before {
    content: "WHY: ";
    font-weight: 500;
}

.again-button {
    border-width: 2px;
    background: var(--ink);
    color: var(--paper);
}

footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 2px solid var(--paper);
    background: rgba(23, 16, 24, 0.94);
    padding: 10px 18px;
    backdrop-filter: blur(12px);
    font-size: 0.65rem;
}

#connectionButton {
    flex: 0 0 auto;
    border-color: var(--acid);
    color: var(--acid);
    padding: 7px 11px;
}

#connectionButton.connected {
    border-color: rgba(255, 247, 232, 0.35);
    color: rgba(255, 247, 232, 0.6);
}

@keyframes drift {
    to {
        border-radius: 63% 37% 43% 57%;
        transform: translate(40px, 30px) rotate(22deg);
    }
}

@media (max-width: 600px) {
    main {
        padding-top: 35px;
    }

    h1 {
        text-shadow: 3px 3px 0 var(--pink);
    }

    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    footer span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .glow {
        animation: none;
    }
}
