@font-face {
    font-family: "gg-sans-bold";
    src: url("/static/gg sans Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "gg-sans-semibold";
    src: url("/static/gg sans Semibold.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "gg-sans-medium";
    src: url("/static/gg sans Medium.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "gg-sans-regular";
    src: url("/static/gg sans Regular.ttf") format("truetype");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "MyFont";
    src: url("/fonts/MyFont-Medium.woff2") format("woff2");
    font-weight: 500;
}

@font-face {
    font-family: "MyFont";
    src: url("/fonts/MyFont-Bold.woff2") format("woff2");
    font-weight: 700;
}

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
    color: #202124;
}

.centre {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Logo / title */
.logo {
    font-size: 64px;
    font-weight: 500;
    letter-spacing: -4px;
    margin-bottom: 32px;
}

.logo span:nth-child(1) { color: #4285f4; }
.logo span:nth-child(2) { color: #ea4335; }
.logo span:nth-child(3) { color: #fbbc05; }
.logo span:nth-child(4) { color: #4285f4; }
.logo span:nth-child(5) { color: #34a853; }
.logo span:nth-child(6) { color: #ea4335; }

/* Search form */
#form {
    width: min(600px, 100%);
    display: flex;
    gap: 10px;
}

#username {
    flex: 1;
    height: 52px;
    padding: 0 20px;
    font-size: 16px;
    color: #202124;

    border: 1px solid #dfe1e5;
    border-radius: 28px;
    outline: none;

    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.12);
    font-family: "gg-sans-medium", Arial, sans-serif;

    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

#username:hover {
    box-shadow: 0 2px 8px rgba(32, 33, 36, 0.18);
}

#username:focus {
    border-color: #4285f4;
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.18);
}

#form button {
    height: 52px;
    padding: 0 24px;

    border: none;
    border-radius: 26px;

    background: #1a73e8;
    color: white;

    font-size: 15px;
    font-weight: 500;
    font-family: "gg-sans-medium", Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(32, 33, 36, 0.18);

    cursor: pointer;

    transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.1s ease;
}

#form button:hover {
    background: #1765cc;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

#form button:active {
    transform: scale(0.97);
}

/* Results */
#result {
    width: min(600px, 100%);
    margin-top: 24px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.award {
    transition: all .1s;
    padding: 18px 20px;

    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 14px;

    font-size: 16px;

    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.12);
    font-family: "gg-sans-medium", Arial, sans-serif;

    animation: appear 0.25s ease both;
}

.award:hover {
    box-shadow: 0 3px 10px rgba(60, 64, 67, 0.16);
}

/* Empty/loading states */
.message {
    text-align: center;
    color: #5f6368;
    padding: 20px;
}

.loading {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Popup */
.popup {
    position: fixed;
    left: 50%;
    bottom: 30px;

    transform: translate(-50%, 100px);
    opacity: 0;

    background: #202124;
    color: white;

    padding: 14px 20px;
    border-radius: 10px;

    font-size: 14px;

    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;

    pointer-events: none;
}

.popup.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .logo {
        font-size: 48px;
        margin-bottom: 24px;
    }


    #username {
        width: 100%;
        height: 52px;
        min-height: 52px;
        max-height: 52px;
        flex: none;
        padding: 0 20px;
        font-size: 16px;
    }

    #form {
        flex-direction: column;
    }

    #form button {
        width: 100%;
    }

    #username {
        width: 100%;
    }
}
