:root {
    --bg: #f4efe7;
    --surface: rgba(255, 252, 247, 0.82);
    --surface-strong: #fffdf9;
    --text: #1f2933;
    --muted: #5b6773;
    --accent: #c56a3d;
    --accent-deep: #8a3f1f;
    --accent-soft: #f3d3c1;
    --line: rgba(115, 90, 73, 0.18);
    --shadow: 0 24px 60px rgba(74, 50, 34, 0.16);
    --radius-xl: 28px;
    --radius-lg: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(197, 106, 61, 0.24), transparent 30%),
        radial-gradient(circle at bottom right, rgba(51, 98, 132, 0.18), transparent 26%),
        linear-gradient(145deg, #f8f4ed 0%, #efe5d8 52%, #e9dccd 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(12px);
    opacity: 0.55;
}

body::before {
    width: 220px;
    height: 220px;
    top: 72px;
    right: 8%;
    background: rgba(197, 106, 61, 0.18);
}

body::after {
    width: 280px;
    height: 280px;
    left: 6%;
    bottom: 40px;
    background: rgba(58, 113, 151, 0.14);
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0;
}

.hero-card,
.results-card {
    backdrop-filter: blur(14px);
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    padding: 36px;
    align-items: center;
}

.status-popup {
    position: fixed;
    top: 28px;
    right: 28px;
    width: min(360px, calc(100vw - 32px));
    padding: 16px 18px 16px 20px;
    border-radius: 18px;
    border: 1px solid transparent;
    box-shadow: 0 20px 38px rgba(31, 41, 51, 0.18);
    z-index: 20;
    opacity: 0;
    transform: translateX(24px);
    animation: toast-in 220ms ease forwards;
}

.status-popup p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.status-popup--success {
    background: #edf8f0;
    border-color: #9fd0ad;
    color: #1d5c33;
    border-left: 5px solid #2d8a4d;
}

.status-popup--error {
    background: #fff1f0;
    border-color: #e6a8a3;
    color: #8c2f28;
    border-left: 5px solid #c34b42;
}

.status-popup--hide {
    opacity: 0 !important;
    transform: translateX(24px) !important;
    transition: opacity 220ms ease, transform 220ms ease;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

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

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-deep);
}

.hero-copy h1,
.results-header h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -0.03em;
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    line-height: 0.98;
}

.hero-text {
    max-width: 34rem;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.7;
}

.shorten-form {
    padding: 28px;
    border-radius: calc(var(--radius-xl) - 6px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 246, 239, 0.9));
    border: 1px solid var(--line);
}

.input-group+.input-group {
    margin-top: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.input-group input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(91, 103, 115, 0.18);
    border-radius: 14px;
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.input-group input::placeholder {
    color: #8d98a3;
}

.input-group input:focus {
    outline: none;
    border-color: rgba(197, 106, 61, 0.65);
    box-shadow: 0 0 0 4px rgba(197, 106, 61, 0.14);
    transform: translateY(-1px);
}

button {
    width: 100%;
    margin-top: 22px;
    padding: 15px 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: #fff;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
    box-shadow: 0 18px 30px rgba(138, 63, 31, 0.22);
}

button:hover {
    transform: translateY(-2px);
    filter: saturate(1.06);
}

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

.results-card {
    margin-top: 24px;
    padding: 30px 36px 34px;
}

.results-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.shortened-list {
    list-style: none;
    margin: 24px 0 0;
    padding: 18px;
    min-height: 120px;
    border: 1px solid rgba(197, 106, 61, 0.16);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 239, 229, 0.9)),
        radial-gradient(circle at top right, rgba(197, 106, 61, 0.1), transparent 34%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.shortened-list:empty::before {
    content: "Your generated links will appear here.";
    color: var(--muted);
    font-size: 0.98rem;
    align-self: center;
    margin: auto 0;
}

.shortened-list li {
    width: 100%;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(197, 106, 61, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 243, 236, 0.9));
    box-shadow: 0 14px 24px rgba(95, 66, 47, 0.08);
    color: var(--muted);
    line-height: 1.6;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.short-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.shortened-list li:hover {
    transform: translateY(-2px);
    border-color: rgba(197, 106, 61, 0.28);
    box-shadow: 0 18px 30px rgba(95, 66, 47, 0.14);
}

.shortened-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: none;
    word-break: break-all;
}

.shortened-list a::before {
    content: "->";
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(197, 106, 61, 0.12);
    color: var(--accent-deep);
    font-size: 0.88rem;
}

.shortened-list a:hover {
    text-decoration: underline;
}

.short-link-destination {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
    word-break: break-word;
}

@media (max-width: 820px) {
    .page-shell {
        width: min(100% - 20px, 1120px);
        padding: 24px 0 32px;
    }

    .hero-card,
    .results-card {
        padding: 22px;
    }

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

    .status-popup {
        top: 16px;
        right: 10px;
        width: min(320px, calc(100vw - 20px));
    }

    .shorten-form {
        padding: 20px;
    }

    .shortened-list {
        padding: 14px;
    }

    .shortened-list li {
        padding: 14px;
    }
}