:root {
    color-scheme: light;
    --bg: #f3f7fb;
    --card: rgba(255, 255, 255, 0.9);
    --ink: #102033;
    --muted: #637083;
    --primary: #315cff;
    --primary-dark: #2447c7;
    --success: #0f9f6e;
    --danger: #d92d20;
    --border: rgba(49, 92, 255, 0.14);
    --shadow: 0 24px 70px rgba(16, 32, 51, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top, rgba(49, 92, 255, 0.22), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(15, 159, 110, 0.16), transparent 28rem),
        var(--bg);
}

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

.hero-centered {
    max-width: 820px;
    margin: 0 auto 30px;
    text-align: center;
}

.hero h1 {
    max-width: 820px;
    margin: 10px 0 18px;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-copy {
    max-width: 680px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.16rem;
    line-height: 1.7;
}

.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.shortener-card {
    position: relative;
    overflow: hidden;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.shortener-card-centered {
    max-width: 760px;
    margin: 0 auto;
}

.shortener-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--success));
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.card-header h2 {
    margin: 8px 0 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--success);
    background: rgba(15, 159, 110, 0.1);
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.url-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.input-row {
    display: flex;
    gap: 12px;
}

input[type="url"] {
    min-width: 0;
    flex: 1;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid #d9e2ef;
    border-radius: 16px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="url"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(49, 92, 255, 0.12);
}

button {
    border: 0;
    border-radius: 16px;
    padding: 0 22px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    background: var(--primary-dark);
    box-shadow: 0 14px 30px rgba(49, 92, 255, 0.28);
    transform: translateY(-1px);
}

button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.result-card {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(15, 159, 110, 0.18);
    border-radius: 20px;
    background: rgba(15, 159, 110, 0.08);
}

.result-card p {
    margin: 0 0 10px;
    color: var(--success);
    font-weight: 800;
}

.short-url-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.short-url-row a {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--ink);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-button {
    min-height: 42px;
    padding: 0 16px;
    color: var(--primary);
    background: #fff;
}

.copy-button:hover {
    color: #fff;
}

.error {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--danger);
    background: rgba(217, 45, 32, 0.09);
    font-weight: 700;
}

.storage-note {
    margin: 18px 0 0;
    padding: 14px 16px;
    border: 1px solid rgba(49, 92, 255, 0.12);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(49, 92, 255, 0.06);
    font-size: 0.92rem;
    line-height: 1.55;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 28px;
}

.feature-grid div {
    padding: 16px;
    border: 1px solid #edf1f7;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
}

.feature-grid strong,
.feature-grid span {
    display: block;
}

.feature-grid strong {
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.feature-grid span {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.site-footer {
    max-width: 760px;
    margin: 24px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    color: var(--muted);
    font-size: 0.84rem;
    text-align: center;
}

.footer-links {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    margin-bottom: 4px;
}

.footer-links a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.site-footer span {
    display: inline-flex;
    align-items: center;
}

.site-footer span:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-left: 16px;
    border-radius: 999px;
    background: rgba(99, 112, 131, 0.45);
}

@media (max-width: 860px) {
    .page-shell {
        padding: 46px 0 28px;
    }

    .hero h1 {
        letter-spacing: -0.06em;
    }
}

@media (max-width: 620px) {
    .hero-centered {
        margin-bottom: 24px;
    }

    .shortener-card {
        padding: 28px 20px;
        border-radius: 24px;
    }

    .card-header,
    .input-row,
    .short-url-row {
        flex-direction: column;
    }

    button {
        width: 100%;
        min-height: 54px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        display: grid;
        gap: 8px;
    }

    .site-footer span:not(:last-child)::after {
        display: none;
    }
}

.landing-shell {
    width: min(900px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 76px 0 34px;
}

.landing-card {
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.landing-card h1 {
    margin: 10px 0 16px;
    font-size: clamp(2.4rem, 7vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.07em;
}

.landing-card p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.landing-list {
    display: grid;
    gap: 12px;
    margin: 26px 0;
    padding: 0;
    list-style: none;
}

.landing-list li {
    padding: 14px 16px;
    border: 1px solid #edf1f7;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
}

.primary-link {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    color: #fff;
    background: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.primary-link:hover {
    background: var(--primary-dark);
}

@media (max-width: 620px) {
    .landing-shell {
        padding: 46px 0 28px;
    }

    .landing-card {
        padding: 28px 20px;
        border-radius: 24px;
    }
}
