/* ======================================
   Funny Runner
   style.css
====================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
    overflow:hidden;
    touch-action:manipulation;
    font-family:Poppins,sans-serif;
}

#gameCanvas{
    display:block;
    width:100vw;
    height:100vh;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Poppins,sans-serif;
}

body{

    overflow:hidden;

    background:linear-gradient(135deg,#7c3aed,#ec4899);

    height:100vh;

}

/* ==========================
MENU
========================== */

#menu{

    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);

    width:700px;
    max-width:90%;

    background: rgba(255,0,128,.22);
    backdrop-filter: blur(20px);
    border:1px solid rgba(255,255,255,.2);
    border-radius:25px;

    padding:45px;

    text-align:center;
    color:#fff;

    box-shadow:0 25px 60px rgba(0,0,0,.35);

    z-index:999;

}

#menu h1{

    font-size:38px;

    margin-bottom:25px;

    font-weight:800;

    text-shadow:0 4px 15px rgba(0,0,0,.25);

}

/* ==========================
INPUT
========================== */

#playerName{

    width:100%;

    padding:15px;

    border:none;

    border-radius:15px;

    outline:none;

    font-size:18px;

    margin-bottom:18px;

}

#faceUpload{

    width:100%;

    color:#fff;

    margin-bottom:25px;

}

/* ==========================
CHARACTER
========================== */

.characters{

    display:flex;

    justify-content:center;

    gap:15px;

    flex-wrap:wrap;

}

.char{

    width:95px;

    height:95px;

    border-radius:20px;

    cursor:pointer;

    padding:10px;

    background:rgba(255,255,255,.18);

    transition:.25s;

    border:3px solid transparent;

}

.char:hover{

    transform:translateY(-8px) scale(1.05);

}

.char.active{

    border:3px solid #FFD700;

    background:#ffffff;

}

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

#startBtn{

    width:100%;

    padding:16px;

    margin-top:25px;

    border:none;

    border-radius:18px;

    background:linear-gradient(90deg,#ff0080,#ff6b6b);

    color:#fff;

    font-size:22px;

    font-weight:bold;

    cursor:pointer;

    transition:.25s;

}

#startBtn:hover{

    transform:scale(1.03);

    box-shadow:0 12px 30px rgba(255,0,120,.45);

}

/* ==========================
CANVAS
========================== */

#gameCanvas{

    display:block;

    width:100vw;

    height:100vh;

    background:#87CEEB;

}

/* ==========================
RESPONSIVE
========================== */

@media (max-width:768px){

    #menu{

        width:94%;
        padding:25px;

    }

    .game-title h1{

        font-size:34px;

    }

    .title-cat{

        width:55px;
        height:55px;

    }

    #playerName{

        font-size:18px;
        padding:14px;

    }

    .char{

        width:80px;
        height:80px;

    }

    #facePreview{

        width:100px;
        height:100px;

    }

    #startBtn{

        font-size:20px;
        padding:15px;

    }

}


.preview{

margin:20px 0;

}

#facePreview{

width:120px;

height:120px;

border-radius:50%;

object-fit:cover;

border:5px solid white;

display:none;

box-shadow:0 10px 30px rgba(0,0,0,.35);

}

@media (max-width:768px){

.player-name{
    font-size:18px;
}

button{
    height:60px;
    font-size:18px;
}

.character-grid img{
    max-width:90px;
}

}

.game-title{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    margin-bottom:20px;
}

.title-cat{
    width:60px;
    height:60px;
    object-fit:contain;
    animation:bounce 1s infinite alternate;
}

.game-title h1{
    margin:0;
    font-size:48px;
    color:#fff;
    font-weight:700;
}

@keyframes bounce{
    from{
        transform:translateY(0) rotate(-5deg);
    }
    to{
        transform:translateY(-8px) rotate(5deg);
    }
}

.upload-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin:20px 0;
}

.upload-box{
    flex:1;
}

.preview{
    width:120px;
    display:flex;
    justify-content:center;
    align-items:center;
}

#facePreview{
    width:110px;
    height:110px;
    border-radius:50%;
    object-fit:cover;
    border:5px solid #fff;
    display:none;
    box-shadow:0 10px 30px rgba(0,0,0,.35);
}

@media(max-width:768px){

    .upload-row{
        gap:15px;
    }

    .preview{
        width:90px;
    }

    #facePreview{
        width:85px;
        height:85px;
    }

}

.field-label{
    display:block;
    text-align:left;
    margin-bottom:8px;
    color:#fff;
    font-size:17px;
    font-weight:600;
}

.field-label span{
    color:#7CFFB2;
    font-size:14px;
    font-weight:600;
}

