@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
    font-family: 'Quicksand', helvetica, sans-serif;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    overscroll-behavior: none;
}

body {
    background-color: #21358e;
}

/********************
* GENERAL SCREENS
********************/

.app {
    min-height: 100vh;
    background-color: #21358e;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-with-top-logo.active {
    flex-direction: column;
    gap: 24px;
}

#gameScreen.active {
    display: block;
}

/********************
* LOGOS
********************/

.panel-logo {
    display: block;
    height: auto;
    margin: 0 auto 18px;
    object-fit: contain;
}

.panel-logo-blue {
    width: 180px;
    max-width: 180px;
}

.top-logo {
    width: 170px;
    max-width: 170px;
    height: auto;
    display: block;
    object-fit: contain;
}

.game-title {
    text-align: center;
    margin-top: 30px;
}

.game-logo {
    width: 190px;
    max-width: 190px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/********************
* PANELS
********************/

.panel {
    width: min(92vw, 420px);
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0,0,0,0.20);
}

.panel h1,
.panel h2 {
    margin: 0 0 12px;
    color: #19348c;
    font-weight: 800;
}

.panel h1 {
    font-size: 42px;
    letter-spacing: 1px;
}

.panel h2 {
    font-size: 30px;
}

.panel p {
    color: #333333;
    margin: 8px 0;
    font-weight: 500;
}

.small-text {
    font-size: 14px;
}

/********************
* BUTTONS
********************/

.main-btn,
.secondary-btn {
    border: 0;
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 16px;
}

.main-btn {
    background: #19348c;
    color: #ffffff;
}

.secondary-btn {
    background: #edf0ff;
    color: #19348c;
}

/********************
* CHARACTER SELECT
********************/

.character-panel {
    width: min(94vw, 680px);
    max-height: calc(100vh - 170px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
    max-height: min(56vh, 520px);
    overflow-y: auto;
    padding: 2px 6px 6px 2px;
    min-height: 0;
}

.character-card {
    border: 2px solid #d8def8;
    background: #ffffff;
    border-radius: 18px;
    padding: 10px 8px;
    cursor: pointer;
    min-height: 126px;
}

.character-card.selected {
    border-color: #19348c;
    background: #edf0ff;
}

.character-card img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    display: block;
    margin: 0 auto 8px;
}

.character-card span {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    color: #111111;
    display: block;
}

.character-card.selected span {
    color: #19348c;
}

#startGameBtn {
    flex: 0 0 auto;
    align-self: center;
    margin-top: 16px;
}

/********************
* GAME SCREEN
********************/

.game-screen {
    width: min(92vw, 360px);
    margin: 0 auto;
    position: relative;
    top: 30px;
    touch-action: none;
}

canvas {
    background-color: black;
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.game-description {
    color: #ffffff;
    line-height: 2em;
    text-align: center;
    font-weight: 700;
}

/********************
* REWARD SCREEN
********************/

.reward-panel {
    max-width: 390px;
    text-align: center;
}

.reward-panel h2 {
    margin-bottom: 18px;
}

.score-card {
    width: 180px;
    height: 125px;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: #edf0ff;
    border: 2px solid #19348c;

    position: relative;
    overflow: hidden;
}

.score-label {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);

    display: block;
    width: max-content;
    margin: 0;
    padding: 0;

    font-size: 14px;
    font-weight: 800;
    color: #19348c;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.score-card strong {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);

    display: block;
    width: max-content;
    margin: 0;
    padding: 0;

    font-size: 46px;
    line-height: 1;
    color: #19348c;
    font-weight: 800;
    text-align: center;
}

.reward-message {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 14px;
    color: #333333;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
}

.reward-main-line {
    display: block;
    color: #333333;
    font-weight: 800;
    margin-bottom: 8px;
}

.reward-second-line {
    display: block;
}

.reward-highlight {
    color: #19348c;
    font-weight: 800;
}

.voucher-box {
    display: none;
    width: 100%;
    max-width: 260px;
    margin: 14px auto 8px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff5d8;
    border: 2px dashed #19348c;
    text-align: center;
}

.voucher-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #19348c;
    margin-bottom: 6px;
}

.voucher-box strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: #19348c;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.voucher-box p {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #333333;
}

.reward-main-btn {
    display: block;
    width: fit-content;
    margin: 18px auto 8px;
}

#shopBtn {
    display: none;
}

.review-link-btn {
    background: transparent;
    border: 0;
    color: #19348c;
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 6px;
    padding: 6px 8px;
}

/********************
* MOBILE
********************/

@media (max-width: 760px) {
    .character-panel {
        width: min(94vw, 440px);
        max-height: calc(100vh - 145px);
        padding: 22px 14px;
    }

    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-height: 52vh;
    }

    .character-card {
        min-height: 112px;
        padding: 9px 6px;
    }

    .character-card img {
        width: 68px;
        height: 68px;
    }

    .character-card span {
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .panel {
        padding: 24px 16px;
    }

    .panel-logo-blue {
        width: 150px;
        max-width: 150px;
    }

    .top-logo {
        width: 145px;
        max-width: 145px;
    }

    .game-logo {
        width: 155px;
        max-width: 155px;
    }

    .game-screen {
        top: 18px;
    }

    .score-card {
        width: 165px;
        height: 115px;
    }

    .score-label {
        top: 25px;
        font-size: 13px;
    }

    .score-card strong {
        top: 52px;
        font-size: 42px;
    }

    .voucher-box {
        max-width: 245px;
        padding: 12px 14px;
    }

    .voucher-box strong {
        font-size: 25px;
    }
}