 
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka',sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(180deg,#59c3ff,#8d6bff);
    height: 100vh;
    overflow: hidden;
    color: white;
}

.hidden {
    display: none !important;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    overflow-y: auto;
    padding: 15px;
}

button {
    border: none;
    cursor: pointer;
}

.logoBox {
    position: fixed;
    top: 5px;
    left: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    background: rgba(255, 255, 255, .15);
    padding: 5px 10px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.logo {
    width: 10vw;
    height: 10vw;
    background: white;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
}

.logoText {
    font-size: 5vw;
    font-weight: 700;
}

.topControls {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 999;
}

.controlBtn {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: white;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(0,0,0,.2);
}

.title {
    margin-top: 6vh;
    text-align: center;
    font-size: 7vw;
    font-weight: 700;
    line-height: 1.2;
}

.subtitle {
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
    opacity: .9;
    padding-inline: 20px;
}

.playerSetup {
    margin-top: 1vh;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(12px);
    padding: 3px 10px;
    border-radius: 30px;
}

.inputBox input {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 20px;
    font-size: 18px;
    outline: none;
}

.avatarTitle {
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}

.avatarGrid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 12px;
}

.avatar {
    background: white;
    height: 75px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    transition: .2s;
    border: 4px solid transparent;
}

    .avatar.selected {
        border-color: #ffe600;
        transform: scale(1.08);
    }

.startBtn {
    width: 100%;
    margin-top: 25px;
    padding: 18px;
    border-radius: 20px;
    background: #ffe600;
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.mapGrid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 15px;
    margin-top: 30px;
    padding-bottom: 50px;
}

.stageCard {
    height: 140px;
    border-radius: 25px;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: end;
    padding-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,.3);
    transition: .3s;
}

    .stageCard:active {
        transform: scale(.95);
    }

    .stageCard.locked {
        filter: grayscale(1) brightness(.4);
    }

.stageNum {
    background: rgba(0,0,0,.5);
    padding: 8px 15px;
    border-radius: 16px;
}

.playersArea {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
    margin-top: 110px;
}

.playerCard {
    background: rgba(255,255,255,.15);
    padding: 10px;
    border-radius: 22px;
    text-align: center;
    animation: pop .3s ease;
}

.playerAvatar {
    font-size: 40px;
    margin-bottom: 8px;
}

@keyframes pop {
    from {
        transform: scale(.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.countdown {
    font-size: 90px;
    text-align: center;
    margin-top: 60px;
    font-weight: 700;
}

.scoreTop {
    position: fixed;
    top: 8vh;
    right: 10px;
    background: rgba(0,0,0,.25);
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 700;
    z-index: 99;
    backdrop-filter: blur(10px);
}

.questionBox {
    margin-top: 13vh;
    background: rgba(255,255,255,.15);
    padding: 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.progressWrap {
    height: 22px;
    background: rgba(255,255,255,.25);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progressBar {
    height: 100%;
    width: 100%;
    background: #00ff88;
    transition: 1s linear;
}

.questionText {
    font-size: 26px;
    text-align: center;
    font-weight: 700;
    line-height: 1.4;
}

.readTimer {
    font-size: 40px;
    text-align: center;
    margin-top: 15px;
    font-weight: 700;
}

.answersGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 25px;
}

.answerBtn {
    padding: 18px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    transition: .2s;
}

    .answerBtn:active {
        transform: scale(.95);
    }

.red {
    background: #ff4d6d;
}

.blue {
    background: #4d96ff;
}

.green {
    background: #00c897;
}

.orange {
    background: #ff9f1c;
}

.purple {
    background: #9b5de5;
}

.yellow {
    background: #ffd60a;
    color: #222;
}

.board {
    margin-top: 120px;
    background: rgba(255,255,255,.15);
    padding: 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

    .board h2 {
        text-align: center;
        font-size: 34px;
        margin-bottom: 10px;
    }

.rankItem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: rgba(255,255,255,.12);
    border-radius: 18px;
    font-size: 18px;
    font-weight: 600;
}

.finalButtons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

    .finalButtons button {
        padding: 18px;
        border-radius: 18px;
        font-size: 20px;
        font-weight: 700;
    }

.homeBtn {
    background: #ffd60a;
}

.retryBtn {
    background: #00e676;
}

@media(min-width:700px) {

    .avatarGrid {
        grid-template-columns: repeat(6,1fr);
    }

    .playersArea {
        grid-template-columns: repeat(5,1fr);
    }

    .answersGrid {
        grid-template-columns: 1fr 1fr;
    }

    .mapGrid {
        grid-template-columns: repeat(4,1fr);
    }
}

.modeBtn {
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    color: gold;
    background-color: #3940a0;
    font-size: large;
    /*font-weight: bold;*/
    border-radius: 12px;
}
.active {
    background: #306d3b;
    color: wheat;
    box-shadow: 0 5px 15px rgb(251 204 41);
}
.stageCard {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.stageIcon {
    position: absolute;
    font-size: 110px;
    opacity: .18;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    pointer-events: none;
}
.stageNumber {
    position: relative;
    z-index: 2;
    font-size: 54px;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 10px rgba(0,0,0,.5), 0 0 20px rgba(0,0,0,.4);
}
.stageMode {
    position: relative;
    z-index: 2;
    margin-top: 8px;
    font-size: 13px;
    font-weight: bold;
    color: white;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: .9;
}
.stageCard.locked {
    filter: grayscale(1);
    opacity: .45;
}