/* ======================================
   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:420px;

    max-width:92%;

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

    backdrop-filter:blur(18px);

    border:1px solid rgba(255,255,255,.2);

    border-radius:25px;

    padding:35px;

    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:600px){

#menu{

    width:95%;

    padding:25px;

}

#menu h1{

    font-size:30px;

}

.char{

    width:75px;

    height:75px;

}

#startBtn{

    font-size:18px;

}

}


.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;
}

}