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


body {
    font-family: Arial, sans-serif;
    background: #f2f5f7;
    color: #222;
    padding-bottom: 40px;
}


header {
    background: #173f2b;
    color: white;
    text-align: center;
    padding: 25px 15px;
    margin-bottom: 20px;
}


header h1 {
    margin-bottom: 8px;
}


.card {
    width: 95%;
    max-width: 800px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}


.card h2 {
    margin-bottom: 15px;
}


.hidden {
    display: none;
}


input,
select {
    width: 100%;
    padding: 12px;
    margin: 8px 0 15px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 16px;
}


label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
}


.player-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}


.player {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    background: #fafafa;
}


.player:hover {
    background: #eeeeee;
}


.player.selected {
    background: #d8f3dc;
    border-color: #2d6a4f;
    font-weight: bold;
}


.selected-text {
    margin: 10px 0 20px;
    font-weight: bold;
}


.main-button {
    width: 100%;
    padding: 13px;
    margin-top: 10px;
    background: #173f2b;
    color: white;
    border: none;
    border-radius: 7px;
    font-size: 16px;
    cursor: pointer;
}


.main-button:hover {
    background: #245d40;
}


.score {
    text-align: center;
    padding: 20px;
    background: #edf7f0;
    border-radius: 10px;
    margin-bottom: 20px;
}


.score h1 {
    font-size: 40px;
}


.players-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}


.players-box div {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}


.run-buttons,
.extra-buttons,
.control-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 10px 0 20px;
}


.run-buttons button,
.extra-buttons button,
.control-buttons button {
    padding: 14px 8px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 15px;
}


.run-buttons button {
    background: #d8f3dc;
}


.extra-buttons button {
    background: #e9ecef;
}


.extra-buttons .wicket-button {
    background: #ffdddd;
    color: #b00000;
    font-weight: bold;
}


.control-buttons button {
    background: #ddd;
}


.new-batsman {
    background: #fff4d6;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #e0b84c;
}


.new-batsman h3 {
    margin-bottom: 8px;
}


table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}


th,
td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}


th {
    background: #173f2b;
    color: white;
}


.out {
    color: #d00000;
    font-weight: bold;
}


.not-out {
    color: #2d6a4f;
    font-weight: bold;
}


@media (max-width: 600px) {

    .player-list {
        grid-template-columns: 1fr;
    }

    .players-box {
        grid-template-columns: 1fr;
    }

    .run-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .extra-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .control-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .score h1 {
        font-size: 32px;
    }
}

