@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter/Inter-VariableFont_opsz,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: italic;
}

:root {
    --primary-color: #000000;
    --bg-color: #ffffff;
    --border-color: #dfe1e5;
    --radius-size: 4px;
    --width-size: 800px;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-color);
    height: 100vh;
    overflow: hidden;
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 200px;
}

.top-nav {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    z-index: 10;
}

.nav-link-custom {
    color: #5f6368;
    text-decoration: none;
    font-size: 0.95rem;
    margin-left: 1.5rem;
}

.nav-link-custom:hover {
    color: #000;
}

.btn-connexion {
    background-color: #000;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-connexion:hover {
    background-color: #333;
    color: white;
}

.search-group {
    width: 100%;
    max-width: var(--width-size);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

.brand-title {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    color: #000;
    padding-left: 4px;
    position: absolute;
    left: 0;
    bottom: 72px;
}

.search-wrapper {
    width: 100%;
    position: relative;
    z-index: 2;
}

.modern-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    padding-right: 140px;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-size);
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.modern-input:hover,
.modern-input:focus {
    border-color: #000;
}

.modern-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    background-color: #000;
    color: white;
    border: none;
    border-radius: var(--radius-size);
    padding: 0 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.1s;
}

.modern-btn:hover {
    background-color: #333;
}

.modern-btn:active {
    transform: scale(0.98);
}

.result-wrapper,
.floating-alert {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: var(--width-size);
    margin-top: 1rem;
    animation: fadeIn 0.3s ease-out;
    z-index: 1;
}

.result-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-size);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
}

.links-group {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.short-link {
    font-size: 1.2rem;
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

.original-link {
    color: #5f6368;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Semantic Classes */

.page-title {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.alert-error {
    position: relative;
    padding: 0.5rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.3rem;
    color: #842029;
    background-color: #f8d7da;
    width: 100%;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
    border-radius: 50rem;
    color: #212529;
    border: 1px solid #212529;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    color: #fff;
    background-color: #212529;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    background-color: #000;
    border: none;
    border-radius: var(--radius-size);
    padding: 0 1.5rem;
    height: 48px;
    /* Match modern-btn height */
    font-weight: 500;
    transition: background-color 0.1s;
}

.btn-back:hover {
    background-color: #333;
}

.stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.stat-col {
    flex: 1;
    min-width: 250px;
}

.stat-card {
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.3rem;
    height: 100%;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: block;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.text-primary {
    color: #0d6efd;
}

.w-100 {
    width: 100%;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.text-break {
    word-wrap: break-word;
    word-break: break-word;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 0 20px;
    }

    .brand-title {
        font-size: 2.5rem;
        bottom: 140px;
        /* Adjust based on new input height */
        position: relative;
        bottom: 0;
        margin-bottom: 2rem;
    }

    .search-group {
        align-items: center;
    }

    .search-wrapper form {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .modern-input {
        padding-right: 1.5rem;
        /* Reset padding */
    }

    .modern-btn {
        position: static;
        width: 100%;
        justify-content: center;
        padding: 1rem;
        height: auto;
    }
}