/* GENERAL STYLING */

/* General body styling for both pages */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 5px; /* Add padding to prevent content from touching the screen edges */
    text-align: center;
    box-sizing: border-box; /* Ensure padding doesn't affect element width */
}

/* Header (H1) styling for both pages */
h1 {
    font-size: 2em;
    color: black;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

/* Anchor link styling for both pages */
a {
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    /* Removed the background-color and border-radius */
}

/* Add a little padding for everything to avoid touching the screen edges */
* {
    box-sizing: border-box; /* Ensure padding and border don't affect width/height calculations */
    padding-left: 5px;
    padding-right: 5px;
}


/* TABLE STYLING */

/* Table styling for both pages */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: center; /* Keep all columns centered by default */
}

th {
    background-color: #007BFF;
    color: white;
    font-size: 1.1em;
}

/* Left-align the first column (Match column) */
th:first-child, td:first-child {
    text-align: left; /* Left-align the first column */
    /* padding-left: 20px;  Optional: Add some padding for better readability */
}


tr {
    transition: background-color 0.3s ease;
}

th:first-child, td:first-child {
    text-align: left; /* Left-align the first column (match column) */
    /* padding-left: 20px;  Optional: Add some padding for better readability */
}

/* Hover effect for all rows */
tr:hover {
    background-color: #f1f1f1;
}

/* Responsive table for smaller screens */
@media (max-width: 768px) {
    table, th, td {
        font-size: 0.9em;
    }
}


/* LEADERBOARD PAGE SPECIFIC STYLING */

/* Completed matches - darker gray background for distinction */
.completed {
    background-color: #c2c2c2;
    color: #333;
}

/* In-progress matches - soft green background */
.in-progress {
    background-color: #d4edda;
    color: #155724;
}

/* Not-started matches - default white background */
.not-started {
    background-color: white;
}

/* Total score section styling */
#total-score {
    text-align: center;
    font-size: 1.5em;
    margin-top: 20px;
}

h2, h4 {
    color: #333;
}

/* Bold leading team */
.bold {
    font-weight: bold;
}


/* MATCH SCORING PAGE SPECIFIC STYLING */

/* General button styling */
button {
    font-size: 1em;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

/* Hover state on buttons for non-mobile devices */
@media (hover: hover) {
    button:hover {
        background-color: #0056b3; /* Change button background to blue on hover */
        color: white;
    }
}

/* Styling for "Complete Match", "Re-start Match", and "View Leaderboard" buttons */
#complete-btn, #leaderboard-btn {
    margin-top: 10px;
    padding: 15px;
    font-size: 1.2em;
    cursor: pointer;
    background-color: #007BFF;
    color: white;
    border: none;
    width: 90%;
    max-width: 500px;
    border-radius: 5px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    transition: background-color 0.3s ease;
}

#complete-btn:hover {
    background-color: #0056b3;
}

#leaderboard-btn {
    background-color: gray;
    color: white;
}

#leaderboard-btn:hover {
    background-color: darkgray;
}

/* Styling for the "Re-start Match" button with a soft red color */
#restart-btn {
    margin-top: 15px;
    padding: 15px;
    font-size: 1.2em;
    cursor: pointer;
    background-color: #dc3545; /* Soft red color */
    color: white;
    border: none;
    width: 90%;
    max-width: 500px;
    border-radius: 5px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    transition: background-color 0.3s ease;
}

#restart-btn:hover {
    background-color: #c82333; /* Slightly darker red on hover */
}

/* Styling for the score div */
#score {
    text-align: center;
    margin-top: 20px;
    font-size: 1.75em; /* Adjusted font size */
    font-weight: bold;
    color: #333;
}

/* Selected button state styling */
button.selected {
    background-color: green;
    color: white;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.5); /* Gives a "depressed" look */
}
