/* Grid background */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Montserrat', 'Quicksand', Arial, sans-serif;
    background: #f5f5f5;
    position: relative;
    color: #222;
}
.grid-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    background-image: linear-gradient(90deg, #e0e0e0 1px, transparent 1px),
                      linear-gradient(180deg, #e0e0e0 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}
.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
form#shortener-form {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 340px;
    max-width: 400px;
}
.form-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
    font-family: 'Quicksand', Arial, sans-serif;
    margin-bottom: 8px;
}
.form-input {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #ccc;
    font-size: 1.1rem;
    background: #f7f7f7;
    color: #222;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: border 0.2s;
}
.form-input:focus {
    border-color: #222;
    outline: none;
}
.form-btn {
    padding: 14px 0;
    border-radius: 12px;
    border: none;
    background: linear-gradient(90deg, #222 60%, #888 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Quicksand', Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s;
}
.form-btn:hover {
    background: linear-gradient(90deg, #444 60%, #aaa 100%);
}
.result {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    padding: 32px 24px;
    margin-left: 32px;
    min-width: 260px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    font-size: 1.1rem;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #222;
    gap: 12px;
    position: relative;
}
.result .loader-box {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
}
.short-label {
    font-weight: 700;
    color: #888;
    margin-bottom: 8px;
    font-size: 1rem;
    display: block;
}
.short-url {
    color: #222;
    font-weight: 700;
    text-decoration: none;
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 1.1rem;
    margin-top: 4px;
    display: inline-block;
    word-break: break-all;
}
.copy-btn {
    background: linear-gradient(90deg, #888 60%, #222 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1rem;
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.copy-btn:hover {
    background: linear-gradient(90deg, #aaa 60%, #444 100%);
}
.github-link {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #222;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 8px 16px;
    transition: background 0.2s;
}
.github-link:hover {
    background: #f0f0f0;
    color: #444;
}
.github-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    vertical-align: middle;
}
.loader {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #222;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Desktop layout */
.container {
    flex-direction: row;
    gap: 32px;
}
/* Mobile layout */
@media (max-width: 700px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 0;
        background: #f5f5f5;
    }
    .container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 0 0 32px 0;
        width: 100vw;
        max-width: 100vw;
        display: flex;
    }
    form#shortener-form {
        margin: 24px 0 18px 0;
        min-width: unset;
        max-width: unset;
        width: 92vw;
        padding: 24px 16px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
        border-radius: 16px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .form-label {
        font-size: 1.1rem;
        margin-bottom: 6px;
        text-align: center;
        width: 100%;
    }
    .form-input {
        padding: 12px;
        font-size: 1rem;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
    .form-btn {
        padding: 12px 0;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }
    .result {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 24px;
        width: 92vw;
        padding: 18px 14px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
        font-size: 1rem;
        border-radius: 14px;
        gap: 8px;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .short-url {
        font-size: 1rem;
        padding: 7px 10px;
        word-break: break-all;
        max-width: 60vw;
        text-align: center;
    }
    .copy-btn {
        padding: 7px 10px;
        font-size: 0.95rem;
        text-align: center;
    }
    .github-link {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    .github-icon {
        width: 18px;
        height: 18px;
    }
}
.footer {
    width: 100vw;
    text-align: center;
    padding: 18px 0 12px 0;
    font-size: 1rem;
    color: #888;
    background: transparent;
    font-family: 'Quicksand', Arial, sans-serif;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 20;
    letter-spacing: 0.5px;
}
@media (max-width: 700px) {
    .footer {
        font-size: 0.95rem;
        padding: 14px 0 10px 0;
    }
}
