/* ===========================
   GENERAL
=========================== */

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    transition:background .3s,color .3s;
}

/* ===========================
   THEMES
=========================== */

body.dark{
    background:#000;
    color:#fff;
}

body.light{
    background:hsl(50,100%,50%);
    color:#000;
}

/* ===========================
   HEADER
=========================== */

header{
    padding:20px;
    text-align:center;
}

h1{
    margin-bottom:15px;
}

/* ===========================
   TABS
=========================== */

nav{
    margin-bottom:20px;
}

.tab{
    border:none;
    border-radius:8px;
    padding:12px 20px;
    margin:5px;
    cursor:pointer;
    font-size:16px;
}

.active{
    background:#3b82f6;
    color:white;
}

/* ===========================
   TOOLBAR
=========================== */

.toolbar{
    text-align:center;
    margin:20px 0;
}

button{
    padding:10px 16px;
    margin:5px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    font-size:15px;
}

button:hover{
    opacity:.9;
}

/* ===========================
   SCANNER
=========================== */

#reader{
    width:320px;
    max-width:95%;
    margin:25px auto;
}

/* ===========================
   LIST
=========================== */

ul{
    list-style:none;
    padding:0;
    max-width:900px;
    margin:auto;
}

li{
    display:flex;
    justify-content:space-between;
    align-items:center;

    margin:10px;

    padding:12px;

    border-radius:8px;

    word-break:break-word;
}

body.dark li{
    background:#222;
}

body.light li{
    background:#fff3a0;
}

/* ===========================
   GAMES GRID
=========================== */

#gamesPage{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(280px,1fr));

    gap:24px;

    padding:20px;

}

.gameCard{

    border-radius:12px;

    padding:20px;

    text-align:center;

    transition:transform .2s;

}

.gameCard:hover{

    transform:translateY(-5px);

}

body.dark .gameCard{

    background:#222;

}

body.light .gameCard{

    background:#fff3a0;

}

.gameCard h2{

    margin-top:0;

}

.gameCard p{

    margin-bottom:20px;

}

.gameCard button{

    width:100%;

    margin-bottom:20px;

}

.gameQR{

    width:100%;

    max-width:220px;

    display:block;

    margin:auto;

    border-radius:10px;

    cursor:pointer;

}

/* ===========================
   TOGGLE SWITCH
=========================== */

.switch{

    position:relative;

    display:inline-block;

    width:60px;

    height:34px;

}

.switch input{

    opacity:0;

    width:0;

    height:0;

}

.slider{

    position:absolute;

    inset:0;

    background:#666;

    border-radius:34px;

    cursor:pointer;

    transition:.4s;

}

.slider:before{

    position:absolute;

    content:"";

    width:26px;

    height:26px;

    left:4px;

    bottom:4px;

    background:white;

    border-radius:50%;

    transition:.4s;

}

input:checked + .slider{

    background:#ffcc00;

}

input:checked + .slider:before{

    transform:translateX(26px);

}

/* ===========================
   COLOR SLIDER
=========================== */

input[type="range"]{

    width:250px;

}

/* ===========================
   MOBILE
=========================== */

@media (max-width:700px){

    #gamesPage{

        grid-template-columns:1fr;

    }

    button{

        width:90%;

    }

}
