/*=========================================================
    SCORE TRACKER GAME
    style.css
    --------------------------------------------------------
    This file controls the appearance of the game.
=========================================================*/


/* Remove default browser spacing */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}


/* Page background */
body{

    font-family:Arial, Helvetica, sans-serif;

    background:#f2f5f9;

    padding:20px;

}


/* Main container */
.container{

    max-width:1200px;

    margin:auto;

    background:white;

    padding:25px;

    border-radius:12px;

    box-shadow:0 5px 15px rgba(0,0,0,0.15);

}


/* Main heading */
h1{

    text-align:center;

    color:#2c3e50;

    margin-bottom:20px;

}


/* Player name input section */
#setup{

    text-align:center;

    margin-bottom:20px;

}


/* Player name input */
#setup input{

    width:220px;

    padding:10px;

    margin:8px;

    border:1px solid #ccc;

    border-radius:6px;

    font-size:15px;

}


/* All buttons */
button{

    background:#007bff;

    color:white;

    border:none;

    padding:10px 18px;

    border-radius:6px;

    cursor:pointer;

    font-size:15px;

    margin:5px;

    transition:.3s;

}


/* Button hover */
button:hover{

    background:#0056b3;

}


/* Disabled buttons */
button:disabled{

    background:#999;

    cursor:not-allowed;

}


/* Round & Turn section */
.game-info{

    display:flex;

    justify-content:space-between;

    margin:20px 0;

    font-weight:bold;

}


/*=========================================================
    PLAYER CARDS
=========================================================*/

#gameArea{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:20px;

}


/* Individual player card */
.player-card{

    background:#fafafa;

    border:1px solid #ddd;

    border-radius:10px;

    padding:20px;

    box-shadow:0 2px 8px rgba(0,0,0,.1);

}


/* Player name */
.player-card h2{

    color:#34495e;

    margin-bottom:10px;

}


/* Score */
.player-card h3{

    color:#16a085;

    margin-bottom:10px;

}


/* Score input */
.player-card input{

    width:100%;

    padding:10px;

    border:1px solid #ccc;

    border-radius:5px;

    margin-bottom:10px;

}


/*=========================================================
    PROGRESS BAR
=========================================================*/

.progress{

    width:100%;

    height:20px;

    background:#ddd;

    border-radius:20px;

    overflow:hidden;

}


/* Progress fill */
.progress-fill{

    height:100%;

    width:0%;

    background:#28a745;

    transition:.5s;

}


/*=========================================================
    SCORE HISTORY
=========================================================*/

.player-card ul{

    margin-top:10px;

    padding-left:20px;

    max-height:120px;

    overflow-y:auto;

}


.player-card li{

    margin-bottom:5px;

}


/*=========================================================
    LEADERBOARD
=========================================================*/

.leaderboard{

    margin-top:30px;

}


.leaderboard h2{

    margin-bottom:15px;

    color:#8e44ad;

}


.leader-item{

    background:#ecf0f1;

    padding:12px;

    border-radius:6px;

    margin-bottom:8px;

    font-weight:bold;

}


/*=========================================================
    RESULT
=========================================================*/

#result{

    margin-top:25px;

    text-align:center;

}


/*=========================================================
    RESET BUTTON
=========================================================*/

.buttons{

    text-align:center;

    margin-top:20px;

}


/* Horizontal line */
hr{

    margin:25px 0;

}


/*=========================================================
    MOBILE RESPONSIVE
=========================================================*/

@media(max-width:768px){

    #gameArea{

        grid-template-columns:1fr;

    }

    .game-info{

        flex-direction:column;

        gap:10px;

    }

    #setup input{

        width:100%;

    }

}