
:root {
    --background: #11121a;
    --surface: #191a25;
    --surface-hover: #222331;
    --border: #2b2c3a;
    --text: #f5f5fa;
    --muted: #9293a5;
    --purple: #8969f5;
    --purple-light: #a58cff;
    --green: #4bd3a0;
    --danger: #f47782;
}

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

body {
    background: var(--background);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", sans-serif;
    min-height: 100vh;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    max-width: 1160px;
    margin: auto;
    padding: 0 32px;
}

.navbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 23px;
    font-weight: 750;
    text-decoration: none;
    letter-spacing: -1px;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    background: var(--purple);
    color: white;
    border-radius: 10px;
    font-size: 23px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.status-dot {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px #4bd3a055;
}

.hero {
    max-width: 760px;
    margin: 88px auto 90px;
    text-align: center;
}

.eyebrow {
    color: var(--purple-light);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 58px);
    line-height: 1.13;
    letter-spacing: -2.5px;
}

.hero h1 span {
    color: var(--purple-light);
}

.hero > p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 16px;
}

.shorten-form {
    display: flex;
    gap: 12px;
    margin-top: 38px;
    padding: 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 13px;
    min-width: 0;
}

.input-icon {
    color: var(--purple-light);
    font-size: 22px;
}

.input-wrapper input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text);
    font-size: 14px;
}

.input-wrapper input::placeholder {
    color: #77788b;
}

.shorten-form button {
    border: 0;
    border-radius: 9px;
    background: var(--purple);
    color: white;
    padding: 15px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    font-weight: 650;
    transition: background .2s, transform .2s;
}

.shorten-form button:hover {
    background: #7655e7;
    transform: translateY(-1px);
}

.shorten-form button:disabled {
    opacity: .6;
    cursor: wait;
}

.message {
    margin-top: 15px;
    min-height: 20px;
    font-size: 13px;
    color: var(--muted);
}

.message.error {
    color: var(--danger);
}

.message.success {
    color: var(--green);
}

.result-card {
    margin-top: 12px;
    padding: 19px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    text-align: left;
    border: 1px solid #7357dc66;
    background: #7657f510;
    border-radius: 12px;
}

.result-label {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1.3px;
    margin-bottom: 8px;
}

.result-card a {
    color: var(--purple-light);
    text-decoration: none;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.copy-button {
    padding: 10px 15px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    white-space: nowrap;
}

.dashboard {
    padding-bottom: 75px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-heading h2 {
    font-size: 25px;
    letter-spacing: -.7px;
}

.refresh-button {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--muted);
    font-size: 12px;
}

.refresh-button:hover {
    color: white;
    background: var(--surface-hover);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 23px;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.stat-icon {
    height: 34px;
    width: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 19px;
}

.purple {
    color: var(--purple-light);
    background: #8969f522;
}

.green {
    color: var(--green);
    background: #4bd3a022;
}

.stat-value {
    margin-top: 14px;
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -1px;
}

.stat-description {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.links-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    overflow: hidden;
}

.links-heading {
    padding: 23px;
}

.links-heading h3 {
    font-size: 16px;
}

.links-heading p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

thead {
    background: #20212c;
}

th {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 650;
    padding: 14px 18px;
}

td {
    padding: 16px 18px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

td a {
    color: var(--purple-light);
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

.original-link {
    max-width: 220px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #d2d2df;
}

.click-count {
    color: var(--green);
    font-weight: 700;
}

.action-group {
    display: flex;
    gap: 8px;
}

.action-button {
    background: var(--surface-hover);
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 11px;
}

.action-button:hover {
    color: white;
}

.delete-button:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.empty-state {
    padding: 50px 15px;
    text-align: center;
}

.empty-icon {
    color: var(--purple-light);
    font-size: 32px;
    margin-bottom: 12px;
}

.empty-state p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

.hidden {
    display: none !important;
}

@media (max-width: 650px) {
    .app-shell {
        padding: 0 17px;
    }

    .navbar {
        height: 65px;
    }

    .status-text {
        font-size: 11px;
    }

    .hero {
        margin: 65px auto 65px;
    }

    .hero h1 {
        letter-spacing: -1.5px;
    }

    .hero > p {
        font-size: 14px;
    }

    .shorten-form {
        flex-direction: column;
    }

    .input-wrapper {
        padding: 13px 8px;
    }

    .shorten-form button {
        justify-content: center;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 26px;
    }

    .result-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading h2 {
        font-size: 21px;
    }

    footer {
        gap: 10px;
        flex-wrap: wrap;
    }
}
