/* ========================================
   ENTIRE PAGE
======================================== */

body {
    font-family: Arial, sans-serif;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.36),
            rgba(0, 0, 0, 0.36)
        ),
        url("fortnite-2025-global-championship.jpeg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: white;
    text-align: center;

    margin: 0;
    padding: 35px 20px;

    min-height: 100vh;
}


/* ========================================
   MAIN TITLE
======================================== */

h1 {
    font-size: 44px;

    margin-top: 5px;
    margin-bottom: 24px;

    color: white;

    text-shadow:
        2px 2px 6px rgba(0, 0, 0, 0.85),
        0 0 10px rgba(0, 0, 0, 0.35);
}


/* ========================================
   SEARCH AREA
======================================== */

.search-area {
    width: fit-content;

    margin: 0 auto;

    padding: 18px 22px;

    background-color: rgba(15, 27, 45, 0.62);

    border: 1px solid rgba(255, 255, 255, 0.28);

    border-radius: 14px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.28);

    backdrop-filter: blur(6px);

    -webkit-backdrop-filter: blur(6px);
}


/* ========================================
   PLAYER SEARCH BOX
======================================== */

input {
    width: 300px;

    padding: 13px 16px;

    font-size: 18px;

    border-radius: 9px;

    border: 2px solid rgba(255, 255, 255, 0.95);

    outline: none;

    background-color: #f7f7f7;

    color: #111827;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.20);
}


/* INPUT FOCUS */

input:focus {
    border-color: #d9a72e;

    box-shadow:
        0 0 0 3px rgba(217, 167, 46, 0.22),
        0 4px 12px rgba(0, 0, 0, 0.20);
}


/* ========================================
   BUTTONS
======================================== */

button {
    padding: 13px 24px;

    font-size: 18px;

    font-weight: bold;

    border: 2px solid white;

    border-radius: 9px;

    cursor: pointer;

    margin-left: 8px;

    background-color: #0f1b2d;

    color: white;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}


/* NORMAL BUTTON HOVER */

button:hover {
    background-color: #d9a72e;

    border-color: #d9a72e;

    transform: translateY(-1px);
}


/* GIVE UP BUTTON */

#giveUpButton {
    background-color: #8f3030;
}


/* GIVE UP HOVER */

#giveUpButton:hover {
    background-color: #b44545;

    border-color: #b44545;
}


/* DISABLED BUTTON */

button:disabled {
    opacity: 0.55;

    cursor: not-allowed;

    transform: none;
}


/* ========================================
   MESSAGE
======================================== */

#message {
    font-size: 21px;

    margin-top: 18px;

    margin-bottom: 4px;

    font-weight: bold;

    color: white;

    text-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.85),
        0 0 8px rgba(0, 0, 0, 0.5);
}


/* ========================================
   GUESS COUNTER
======================================== */

#guessCount {
    font-size: 19px;

    margin-top: 18px;

    font-weight: bold;

    color: white;

    text-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.85),
        0 0 8px rgba(0, 0, 0, 0.5);
}


/* ========================================
   RESULTS TABLE
======================================== */

table {
    margin: 26px auto;

    width: 90%;

    max-width: 1250px;

    border-collapse: separate;

    border-spacing: 1px;

    background-color: rgba(255, 255, 255, 0.72);

    border: 2px solid rgba(255, 255, 255, 0.9);

    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.26);
}


/* ========================================
   TABLE CELLS
======================================== */

th,
td {
    padding: 13px 12px;

    font-size: 18px;

    border: none;
}


/* TABLE HEADER */

th {
    background-color: #0f1b2d;

    color: white;

    font-weight: bold;

    border-bottom: 4px solid #d9a72e;

    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.5);
}


/* NORMAL DATA CELL */

td {
    background-color: #f4f4f4;

    color: #111827;

    font-weight: bold;
}


/* PLAYER NAME CELL */

td:first-child {
    background-color: #f4f4f4;

    color: #111827;

    font-weight: bold;
}


/* ========================================
   CORRECT / INCORRECT CELLS
======================================== */

/* CORRECT */

td.correct {
    background-color: #429f63 !important;

    color: white;
}


/* INCORRECT */

td.incorrect {
    background-color: #c95c5c !important;

    color: white;
}


/* ========================================
   FLAGS
======================================== */

td img {
    width: 27px;

    height: auto;

    vertical-align: middle;

    margin-right: 7px;

    border-radius: 2px;
}


/* ========================================
   STAT ARROWS
======================================== */

.stat-arrow {
    display: inline-block;

    font-size: 24px;

    font-weight: bold;

    margin-left: 5px;

    color: white;

    vertical-align: middle;
}


/* ========================================
   PLAYER SUGGESTIONS
======================================== */

#suggestions {
    width: 300px;

    margin: 4px auto 0;

    text-align: left;

    background-color: white;

    color: #111827;

    position: relative;

    z-index: 10;

    border-radius: 7px;

    overflow: hidden;

    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.28);
}


/* INDIVIDUAL SUGGESTION */

#suggestions div {
    padding: 10px 14px;

    cursor: pointer;

    border-bottom: 1px solid #e5e7eb;

    font-weight: bold;

    background-color: white;
}


/* SUGGESTION HOVER */

#suggestions div:hover {
    background-color: #0f1b2d;

    color: white;
}


/* ========================================
   HIDDEN ELEMENTS
======================================== */

.hidden {
    display: none !important;
}


/* ========================================
   RESULT POPUP OVERLAY
======================================== */

#winOverlay {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.72);

    display: flex;

    justify-content: center;

    align-items: center;

    z-index: 1000;

    backdrop-filter: blur(4px);

    -webkit-backdrop-filter: blur(4px);
}


/* ========================================
   RESULT POPUP BOX
======================================== */

#winBox {
    width: 90%;

    max-width: 480px;

    padding: 30px 32px;

    background:
        linear-gradient(
            145deg,
            #0f1b2d,
            #172944
        );

    border: 3px solid #d9a72e;

    border-radius: 22px;

    color: white;

    text-align: center;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.65),
        0 0 30px rgba(217, 167, 46, 0.20);

    animation: popupAppear 0.25s ease;
}


/* ========================================
   POPUP ANIMATION
======================================== */

@keyframes popupAppear {

    from {
        opacity: 0;

        transform: scale(0.88);
    }

    to {
        opacity: 1;

        transform: scale(1);
    }
}


/* ========================================
   CORRECT / GIVE UP TITLE
======================================== */

#winBox h2 {
    font-size: 32px;

    margin-top: 0;

    margin-bottom: 8px;

    color: white;

    text-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.5);
}


/* ========================================
   CORRECT PLAYER NAME
======================================== */

#winPlayerName {
    font-size: 34px;

    margin-top: 8px;

    margin-bottom: 20px;

    color: #d9a72e;

    text-transform: uppercase;

    letter-spacing: 1px;
}


/* ========================================
   PLAYER INFORMATION BOX
======================================== */

#winPlayerInfo {
    background-color: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.12);

    padding: 14px 20px;

    border-radius: 14px;

    margin-bottom: 18px;

    text-align: left;
}


/* PLAYER INFO ROW */

#winPlayerInfo p {
    margin: 9px 0;

    padding-bottom: 7px;

    font-size: 17px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.08);
}


/* REMOVE BORDER FROM LAST STAT */

#winPlayerInfo p:last-child {
    border-bottom: none;

    padding-bottom: 0;
}


/* POPUP LABELS */

#winPlayerInfo strong {
    color: #d9a72e;
}


/* FLAG INSIDE POPUP */

#winPlayerInfo img {
    width: 26px;

    height: auto;

    vertical-align: middle;

    border-radius: 2px;
}


/* ========================================
   POPUP GUESS COUNT
======================================== */

#winGuessCount {
    font-size: 20px;

    font-weight: bold;

    margin-top: 18px;

    margin-bottom: 20px;

    color: white;
}


/* ========================================
   PLAY AGAIN BUTTON
======================================== */

#playAgainButton {
    background-color: #d9a72e;

    color: white;

    border: 2px solid #d9a72e;

    padding: 13px 30px;

    font-size: 18px;

    font-weight: bold;

    border-radius: 10px;

    cursor: pointer;

    margin: 0;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}


/* PLAY AGAIN HOVER */

#playAgainButton:hover {
    background-color: #edbd43;

    border-color: #edbd43;

    transform: scale(1.05);
}


/* ========================================
   MOBILE SUPPORT
======================================== */

@media (max-width: 900px) {

    body {
        padding: 24px 10px;
    }


    h1 {
        font-size: 32px;
    }


    .search-area {
        padding: 14px;
    }


    input {
        width: 210px;
    }


    #suggestions {
        width: 210px;
    }


    table {
        width: 100%;

        display: block;

        overflow-x: auto;
    }


    th,
    td {
        padding: 10px;

        font-size: 15px;

        white-space: nowrap;
    }


    #winBox {
        width: 82%;

        padding: 25px 20px;
    }


    #winBox h2 {
        font-size: 27px;
    }


    #winPlayerName {
        font-size: 29px;
    }


    #winPlayerInfo p {
        font-size: 16px;
    }
}