/* styles.css (Add styles for login/logout area) */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 20px;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
}

h1, h2 {
    color: #343a40;
    text-align: center;
    margin-bottom: 1.5rem;
}
h2 {
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}


.container {
    max-width: 760px;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #dee2e6;
}

.input-group {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}
.input-group:last-of-type {
     margin-bottom: 1rem;
}
/* Specific style for auth section */
#authSection {
    background-color: #e9ecef; /* Slightly darker background */
    border-color: #ced4da;
}
#loggedInInfo span {
    font-weight: bold;
    margin-right: 15px;
    color: #28a745; /* Green color for logged in user */
}
#loggedInInfo button {
    background-color: #dc3545; /* Red for logout */
    padding: 0.5rem 1rem; /* Smaller padding for logout */
}
#loggedInInfo button:hover {
    background-color: #c82333;
}


label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
    display: inline-block;
    width: calc(33% - 16px); /* Default width */
    padding: 0.75rem;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.95rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    vertical-align: middle;
}
/* Make login select wider */
#loginPersonSelect {
    width: calc(100% - 120px); /* Adjust width considering button */
}

input:disabled, select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}


input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Specific widths for add person/chore inputs */
.input-group label[for="personName"] + input {
     width: calc(100% - 140px);
     margin-right: 10px;
}
.input-group label + input#choreName {
    width: calc(50% - 80px);
     margin-right: 10px;
}
.input-group label + input#chorePoints {
     width: calc(50% - 80px);
     margin-right: 10px;
}


button {
    background-color: #007bff;
    color: white;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    vertical-align: middle;
    margin-left: 5px;
    line-height: 1.5;
}

button:hover {
    background-color: #0056b3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Style secondary buttons differently */
#actionsSection .input-group button:not(:first-of-type), /* Buttons after first in action groups */
#actionsSection > button /* Buttons directly under actions */
 {
    background-color: #6c757d;
    margin-top: 10px;
    margin-right: 10px;
}
#actionsSection .input-group button:not(:first-of-type):hover,
#actionsSection > button:hover {
    background-color: #5a6268;
}


#leaderboard, .chore-list {
    margin-top: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1.5rem;
    background-color: #ffffff;
}


ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

ul li {
    padding: 0.85rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.98rem;
}
ul li span:first-child {
    font-weight: 500;
}


ul li:last-child {
    border-bottom: none;
}

#weeklyWinner {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    display: none; /* Hidden by default */
}

#statusMessage {
    margin-top: 1rem;
    border-radius: 4px;
    font-style: normal;
    font-weight: 500;
    min-height: 1.5em;
    display: none;
    text-align: center;
}

hr {
    border: 0;
    height: 1px;
    background-color: #dee2e6;
    margin: 2rem 0;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="date"],
    select {
        width: calc(50% - 12px); /* Two per line */
    }
    .input-group label[for="personName"] + input,
    .input-group label + input#choreName,
    .input-group label + input#chorePoints {
        width: calc(100% - 140px);
    }
    #loginPersonSelect {
        width: calc(100% - 120px);
    }

}


@media (max-width: 600px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.3rem; }
    .container { padding: 15px; }
    .input-group { padding: 1rem; }

    input[type="text"],
    input[type="number"],
    input[type="date"],
    select {
        width: 100%; /* Full width on small screens */
        margin-right: 0;
        margin-bottom: 10px;
    }
    .input-group label[for="personName"] + input,
    .input-group label + input#choreName,
    .input-group label + input#chorePoints {
        width: 100%;
        margin-bottom: 10px;
    }
     #loginPersonSelect {
        width: 100%;
        margin-bottom: 10px;
     }


     button {
         width: 100%;
         margin-top: 10px;
         margin-left: 0;
         padding: 0.8rem 1rem;
     }
     #loggedInInfo button { /* Ensure logout button isn't full width */
         width: auto;
         display: inline-block;
         margin-left: 10px;
     }

    #leaderboard, .chore-list { padding: 1rem; }
    ul li { font-size: 0.95rem; padding: 0.75rem 0;}

}