:root {
    --bg: #F7FBFE;
    --card: #FFFFFF;
    --line: #E9EEF3;
    --ink: #2B3A45;
    --sub: #8A97A3;
    --point: #4E90C4;
    --point-bg: #DCEBF5;
    --btn-grad-start: #7AB4E0;
    --btn-grad-end: #4A8CC4;
    --error: #C0392B;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a { color: var(--point); text-decoration: none; }

/* ---------- nav ---------- */
.nav {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.nav-logo { width: 26px; height: 26px; object-fit: contain; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}

.nav-link { color: var(--ink); font-weight: 500; }

.nav-username { color: var(--sub); }

.nav-logout-form { display: inline; margin: 0; }

.nav-link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--ink);
    font-weight: 500;
    cursor: pointer;
}

.btn-pill {
    background: linear-gradient(135deg, var(--btn-grad-start), var(--btn-grad-end));
    color: #fff;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

/* ---------- buttons / inputs (shared) ---------- */
.btn-gradient {
    background: linear-gradient(135deg, var(--btn-grad-start), var(--btn-grad-end));
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.text-input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 14px;
    color: var(--ink);
}

.text-input:focus { outline: 2px solid var(--point-bg); border-color: var(--point); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.field label { font-size: 13px; font-weight: 600; color: var(--ink); }

.error { color: var(--error); font-size: 12.5px; margin-top: 4px; }

/* ---------- landing ---------- */
.landing {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 64px 20px 96px;
    overflow: hidden;
}

.landing-blob {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--point-bg);
    opacity: 0.6;
    z-index: 0;
    filter: blur(2px);
}

.landing-blob-left { top: 40px; left: -60px; }
.landing-blob-right { top: 160px; right: -60px; }

.landing-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    background: var(--point-bg);
    color: var(--point);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.landing-hero h1 {
    font-size: 34px;
    line-height: 1.35;
    margin: 0 0 16px;
}

.landing-hero h1 .accent { color: var(--point); }

.landing-hero .sub {
    color: var(--sub);
    font-size: 15px;
    margin: 0 0 32px;
}

.shorten-form {
    display: flex;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(43, 58, 69, 0.06);
}

.shorten-form .text-input {
    /* .text-input's base "width: 100%" becomes this item's flex-basis in a row layout,
       so it demands 100% of the row's width on its own (growing with the container on
       wide screens) and squeezes the button out — override with flex:1 + min-width:0 so
       it shares space with the button instead of fighting the flex algorithm for it. */
    flex: 1;
    min-width: 0;
    width: auto;
    border: none;
    background: transparent;
    padding: 10px 12px;
}
.shorten-form .text-input:focus { outline: none; }
.shorten-form .btn-gradient { flex-shrink: 0; }

.hint { color: var(--sub); font-size: 13px; margin-top: 16px; }

.feature-cards {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 56px;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(43, 58, 69, 0.04);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--point-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.feature-icon img { width: 20px; height: 20px; object-fit: contain; }

.feature-card strong { display: block; font-size: 15px; margin-bottom: 4px; }
.feature-card p { color: var(--sub); font-size: 13px; margin: 0; }

/* ---------- auth (signup / login) ---------- */
.auth-split {
    max-width: 960px;
    margin: 48px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(43, 58, 69, 0.08);
}

.auth-intro {
    background: linear-gradient(160deg, var(--btn-grad-start), var(--btn-grad-end));
    color: #fff;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-intro-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-intro-icon img { width: 22px; height: 22px; }

.auth-intro h2 { font-size: 24px; margin: 0 0 12px; line-height: 1.4; }
.auth-intro p { font-size: 13.5px; opacity: 0.9; margin: 0 0 20px; line-height: 1.5; }

.auth-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.auth-checklist li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }

.auth-checklist .check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.auth-card {
    background: var(--card);
    padding: 40px 32px;
}

.auth-card h2 { font-size: 22px; margin: 0 0 6px; }
.auth-card .sub { color: var(--sub); font-size: 13.5px; margin: 0 0 24px; }

.auth-card form { display: flex; flex-direction: column; }

.auth-card .btn-gradient { width: 100%; margin-top: 8px; }

.auth-footer { text-align: center; font-size: 13px; color: var(--sub); margin-top: 20px; }

.alert {
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error { background: #FBEAE7; color: var(--error); }
.alert-success { background: var(--point-bg); color: var(--point); }
.alert-info { background: var(--point-bg); color: var(--point); }

.auth-center {
    max-width: 400px;
    margin: 64px auto;
    padding: 0 20px;
}

.login-card {
    background: var(--card);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 12px 32px rgba(43, 58, 69, 0.08);
    text-align: center;
}

.login-card .login-logo { width: 48px; height: 48px; margin-bottom: 16px; }
.login-card h2 { margin: 0 0 24px; }
.login-card form { text-align: left; }

/* ---------- dashboard ---------- */
.dashboard {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.dashboard h1 { font-size: 22px; margin: 0 0 24px; }

.banner {
    background: var(--point-bg);
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.banner-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }

.banner-row .text-input { background: var(--card); border-color: var(--line); flex: 1; }

.btn-copy {
    background: var(--point);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
}

.banner .meta { color: var(--sub); font-size: 13px; }

.link-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
}

.link-table th, .link-table td {
    text-align: left;
    padding: 14px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--line);
}

.link-table th { color: var(--sub); font-weight: 600; font-size: 12.5px; }

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

.link-table .original-url { color: var(--sub); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

.link-cell { display: flex; align-items: center; gap: 6px; }

.copy-icon-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sub);
    cursor: pointer;
    flex-shrink: 0;
}

.copy-icon-btn:hover { background: var(--point-bg); color: var(--point); }
.copy-icon-btn.copied { color: #2E9E5B; }

.btn-delete {
    background: none;
    border: 1px solid var(--line);
    color: var(--error);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 12.5px;
    cursor: pointer;
}

.empty-state { color: var(--sub); font-size: 14px; padding: 24px; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
    .feature-cards { grid-template-columns: 1fr; }
    .landing-hero h1 { font-size: 26px; }
    .shorten-form { flex-direction: column; }
    .auth-split { grid-template-columns: 1fr; }
    .auth-intro { display: none; }
    .nav-actions { font-size: 13px; gap: 10px; }
    .link-table .original-url { max-width: 120px; }
}
