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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f5f7;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px;
}

.page {
    width: 100%;
    max-width: 680px;
    text-align: center;
}

/* Brand heading, e.g. "Short URL by YourBrand" */
.brand {
    font-size: 36px;
    font-weight: 800;
    color: #2f7bd6;
    margin-bottom: 28px;
}

.brand-by {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-left: 6px;
    vertical-align: middle;
}

.brand-name {
    color: #2fa8e0;
}

/* Card */
.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px 40px 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-heading {
    font-size: 22px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 20px;
}

/* Input + button row */
.url-form {
    display: flex;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.url-input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    outline: none;
    font-size: 15px;
    color: #374151;
}

.url-input::placeholder {
    color: #9ca3af;
}

.shorten-btn {
    padding: 14px 28px;
    background: #2f7bd6;
    color: #ffffff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.shorten-btn:hover {
    background: #2563b8;
}

.tagline {
    margin-top: 18px;
    font-size: 13.5px;
    color: #4b5563;
    line-height: 1.6;
}

/* Alerts */
.alert {
    margin-top: 20px;
    padding: 14px;
    border-radius: 8px;
    text-align: left;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.result-box {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.result-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    font-size: 14px;
}

.result-box button {
    padding: 10px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: #2f7bd6;
    text-decoration: none;
    font-size: 14px;
}

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

/* Stats page table (unchanged look, reused) */
.container.wide {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px 40px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.stats-table th, .stats-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.stats-table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
}

.stats-table .truncate {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .url-form {
        flex-direction: column;
        border: none;
        gap: 10px;
    }
    .url-input {
        border: 1px solid #d1d5db;
        border-radius: 6px;
    }
    .shorten-btn {
        border-radius: 6px;
    }
}
