* {
    box-sizing: border-box;
}

body {
    margin: 0;

    min-height: 100vh;

    font-family: Arial, sans-serif;

    background:
        radial-gradient(
            circle at top,
            #26314d 0%,
            #111827 45%,
            #070b12 100%
        );

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.hero {
    width: min(100%, 760px);

    text-align: center;
}

.logo-box {
    width: 90px;
    height: 90px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            #7c8cff,
            #8d62ff
        );

    font-size: 58px;

    box-shadow:
        0 15px 35px rgba(90, 100, 255, 0.35);
}

.small-title {
    margin: 0 0 12px;

    color: #9ca8c7;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 3px;
}

h1 {
    margin: 0;

    font-size: clamp(
        38px,
        7vw,
        64px
    );

    line-height: 1.05;

    letter-spacing: -2px;
}

.description {
    max-width: 600px;

    margin: 20px auto 30px;

    color: #aeb6ca;

    font-size: 17px;

    line-height: 1.6;
}

.search-card {
    width: min(100%, 560px);

    margin: 0 auto;

    padding: 26px;

    text-align: left;

    background:
        linear-gradient(
            145deg,
            #171d2e,
            #0d1220
        );

    border:
        1px solid rgba(255,255,255,0.08);

    border-radius: 22px;

    box-shadow:
        0 20px 50px rgba(0,0,0,0.35);
}

.search-card label {
    display: block;

    margin-bottom: 9px;

    color: #d7dcef;

    font-size: 14px;
    font-weight: bold;
}

#username {
    width: 100%;

    height: 52px;

    padding: 0 15px;

    border:
        1px solid rgba(255,255,255,0.12);

    border-radius: 12px;

    outline: none;

    background: #0c1120;

    color: white;

    font-size: 16px;
}

#username::placeholder {
    color: #6f7890;
}

#username:focus {
    border-color: #7c8cff;

    box-shadow:
        0 0 0 3px rgba(124,140,255,0.15);
}

#searchBtn {
    width: 100%;

    margin-top: 14px;

    padding: 14px;

    border: none;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #6675ff,
            #8d62ff
        );

    color: white;

    font-size: 16px;
    font-weight: 800;

    cursor: pointer;

    transition: 0.2s;
}

#searchBtn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(103,117,255,0.3);
}

#message {
    min-height: 20px;

    margin: 14px 0 0;

    text-align: center;

    color: #ffb7b7;

    font-size: 14px;
}

@media (max-width: 600px) {

    body {
        padding: 14px;
    }

    .logo-box {
        width: 74px;
        height: 74px;

        font-size: 48px;
    }

    h1 {
        font-size: 40px;
    }

    .description {
        font-size: 15px;
    }

    .search-card {
        padding: 18px;

        border-radius: 18px;
    }
}
/* =========================
   GAMES SECTION
========================= */

.games-section {
    width: min(100%, 760px);
    margin: 45px auto 0;
    text-align: left;
}

.games-section[hidden] {
    display: none;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 4px 0 0;
    font-size: 28px;
}

#gamesCount {
    color: #8f98b2;
    font-size: 14px;
}


/* =========================
   GAME CARDS
========================= */

.games-list {
    display: grid;
    gap: 12px;
}

.game-result-card {
    padding: 18px;

    background:
        linear-gradient(
            145deg,
            #171d2e,
            #0d1220
        );

    border:
        1px solid rgba(255,255,255,0.08);

    border-radius: 16px;

    box-shadow:
        0 10px 25px rgba(0,0,0,0.22);
}

.game-main-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.game-result-card h3 {
    margin: 10px 0 8px;
    font-size: 20px;
}

.game-result-card p {
    margin: 5px 0;
    color: #aab2c7;
    font-size: 14px;
}


/* =========================
   RESULT BADGES
========================= */

.game-result {
    display: inline-block;

    padding: 5px 10px;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;

    text-transform: uppercase;
}

.game-result.win {
    color: #8df0a4;
    background: rgba(55, 190, 90, 0.14);
}

.game-result.loss {
    color: #ff9c9c;
    background: rgba(220, 70, 70, 0.14);
}

.game-result.draw {
    color: #ffd589;
    background: rgba(220, 165, 60, 0.14);
}

.game-meta {
    color: #78829d !important;
}


/* =========================
   ANALYZE BUTTON
========================= */

.analyze-btn {
    flex-shrink: 0;

    padding: 12px 20px;

    border: none;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #6675ff,
            #8d62ff
        );

    color: white;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition: 0.2s;
}

.analyze-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(103,117,255,0.3);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .section-header h2 {
        font-size: 23px;
    }

    .game-main-info {
        align-items: stretch;
        flex-direction: column;
    }

    .analyze-btn {
        width: 100%;
    }
}