@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

:root {
    --bg-1: #f7efe2;
    --bg-2: #d8e4f5;
    --card: rgba(255, 255, 255, 0.78);
    --card-border: rgba(255, 255, 255, 0.55);
    --text: #1f2a37;
    --muted: #5b6575;
    --accent: #0f9d8f;
    --accent-dark: #0b756a;
    --ring: rgba(15, 157, 143, 0.3);
    --output-bg: #ecfffc;
    --radius-lg: 22px;
    --radius-md: 14px;
    --shadow: 0 22px 40px rgba(18, 34, 58, 0.14);
}

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

body {
    font-family: "Outfit", "Segoe UI", sans-serif;
    color: var(--text);
    min-height: 100vh;
    padding: 34px 18px;
    background:
        radial-gradient(circle at 12% 12%, #fff7ea 0%, transparent 36%),
        radial-gradient(circle at 88% 22%, #d6f7ef 0%, transparent 34%),
        linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.main-heading {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    text-align: center;
    font-size: clamp(2rem, 5.2vw, 3.2rem);
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    color: #18324a;
    animation: slideDown 0.6s ease-out both;
}

.container {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    background: var(--card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    animation: fadeUp 0.7s ease-out both;
}

h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    margin-bottom: 8px;
    color: #1e3349;
}

form {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

input[type="text"],
textarea {
    width: 100%;
    border: 1px solid #c6d2e1;
    border-radius: var(--radius-md);
    padding: 13px 14px;
    font-size: 0.98rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.88);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--ring);
    transform: translateY(-1px);
}

button {
    justify-self: start;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(15, 157, 143, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 14px 24px rgba(15, 157, 143, 0.31);
}

button:active {
    transform: translateY(0);
}

#ans-loading,
#summary-loading {
    color: var(--muted);
    font-size: 0.94rem;
    margin-top: 4px;
}

#answer,
#summary {
    min-height: 46px;
    margin-top: 6px;
    padding: 13px 14px;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    background: var(--output-bg);
    color: #11374a;
    line-height: 1.45;
    animation: fadeIn 0.25s ease;
}

hr {
    margin: 28px 0;
    border: none;
    border-top: 1px solid rgba(95, 121, 151, 0.25);
}

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

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

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

@media (max-width: 768px) {
    body {
        padding: 18px 12px;
    }

    .container {
        padding: 20px 16px;
        border-radius: 18px;
    }

    button {
        width: 100%;
        justify-self: stretch;
    }
}