:root {
    --mango-500: #ff9a3d;
    --mango-600: #ff7a1a;
    --mango-700: #f2600a;
    --leaf-500: #3aa66b;
    --ink-900: #1c1d21;
    --ink-700: #45464f;
    --ink-500: #6b6d78;
    --ink-300: #b9bac3;
    --ink-100: #e9e9ee;
    --surface: #ffffff;
    --surface-muted: #f6f5f8;
    --danger: #e0454d;
    --shadow-color: rgba(28, 29, 33, 0.10);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink-900);
    background: radial-gradient(circle at 0% 0%, #f5ffd9 0%, transparent 50%),
                radial-gradient(circle at 100% 0%, #f3dcbc 0%, transparent 50%),
                #fbfaf8;
    display: flex;
    justify-content: center;
    padding: 48px 20px;
}

.page {
    width: 100%;
    max-width: 728px;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.header-link {
    color: var(--ink-500);
    font-size: 0.92rem;
    text-decoration: none;
}

.header-link:hover {
    color: var(--mango-700);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: inherit;
    text-decoration: none;
}

.top-bar .brand {
    margin-bottom: 0;
}

.brand-mark {
    display: block;
    width: 44px;
    height: 44px;
}

.brand-name {
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px var(--shadow-color), 0 16px 40px -12px var(--shadow-color);
    padding: 36px 36px 32px;
    border: 1px solid rgba(28, 29, 33, 0.04);
}

.card-header {
    margin-bottom: 24px;
}

.card-header h1,
.card-header h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.card-header p {
    margin: 0 0 28px;
    color: var(--ink-500);
    font-size: 0.95rem;
    line-height: 1.5;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 7px;
}

.field .hint {
    font-weight: 400;
    color: var(--ink-500);
    font-size: 0.8rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"] {
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink-900);
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--ink-100);
    background: var(--surface-muted);
    outline: none;
    transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="url"]::placeholder {
    color: var(--ink-300);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="url"]:hover,
input[type="date"]:hover {
    border-color: var(--ink-300);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="date"]:focus {
    background: var(--surface);
    border-color: var(--mango-500);
    box-shadow: 0 0 0 4px rgba(255, 154, 61, 0.16);
}

input.field-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(224, 69, 77, 0.12) !important;
}

.error-text {
    display: none;
    color: var(--danger);
    font-size: 0.78rem;
    margin-top: 6px;
    font-weight: 500;
}

.error-text.visible {
    display: block;
    animation: fade-in 140ms var(--ease);
}

.divider {
    height: 1px;
    background: var(--ink-100);
    margin: 28px 0 20px;
}

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title span.label {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--ink-700);
}

.section-title span.sub {
    font-size: 0.78rem;
    color: var(--ink-500);
}

.submit-row {
    margin-top: 28px;
}

.submit-btn {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--mango-500), var(--mango-700));
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 8px 20px -6px rgba(255, 122, 26, 0.55);
    transition: transform 140ms var(--ease), box-shadow 140ms var(--ease), filter 140ms var(--ease);
}

.submit-btn:hover {
    filter: brightness(1.04);
    box-shadow: 0 10px 24px -6px rgba(255, 122, 26, 0.65);
}

.submit-btn:active {
    transform: translateY(1px) scale(0.995);
}

.form-error-banner {
    background: rgba(224, 69, 77, 0.08);
    border: 1px solid rgba(224, 69, 77, 0.25);
    color: var(--danger);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.87rem;
    margin-bottom: 22px;
}

.success-card {
    text-align: center;
}

.success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(58, 166, 107, 0.12);
    color: var(--leaf-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    animation: pop-in 260ms var(--ease);
}

.success-card h1,
.success-card h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.success-card p {
    color: var(--ink-500);
    margin: 0 0 22px;
    font-size: 0.92rem;
}

.short-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-muted);
    border: 1.5px solid var(--ink-100);
    border-radius: var(--radius-sm);
    padding: 6px 6px 6px 16px;
}

.short-link-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--mango-700);
    font-size: 0.95rem;
    padding: 8px 0;
}

.short-link-box input:focus {
    outline: none;
}

.short-link-box a {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: var(--mango-700);
    font-size: 0.95rem;
    padding: 8px 0;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.short-link-box a:hover {
    text-decoration: underline;
}

.copy-btn {
    flex-shrink: 0;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--ink-900);
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 140ms var(--ease);
}

.copy-btn:hover {
    background: #000;
}

.destination-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 24px 0 0;
    font-size: 0.85rem;
    text-align: left;
}

.destination-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--ink-100);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.destination-table tr:last-child td {
    border-bottom: none;
}

.destination-row-default td {
    font-weight: 700;
    color: var(--ink-900);
}

.destination-label {
    width: 42%;
    font-weight: 600;
    color: var(--ink-700);
}

.destination-flag {
    margin-right: 6px;
}

.destination-url {
    padding-left: 12px;
    color: var(--ink-500);
}

.create-another {
    display: inline-block;
    margin-top: 20px;
    color: var(--ink-500);
    font-size: 0.87rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 140ms var(--ease), border-color 140ms var(--ease);
}

.create-another:hover {
    color: var(--mango-700);
    border-color: var(--mango-700);
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(-2px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 480px) {
    .card {
        padding: 26px 20px 24px;
    }
}
