body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

nav button {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    background-color: #5c67f2;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
}

nav button:hover {
    background-color: #4a54e1;
}

#btn-generate-stats{
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    background-color: #5c67f2;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
}

#btn-generate-stats:hover{
    background-color: #4a54e1;
}

main {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.btn{
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    background-color: #5c67f2;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
}

.btn{
    background-color: #4a54e1;
}

.select{
    width: 60% !important;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin: .75rem 0;
}

.hidden {
    display: none !important;
}

.form{
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f4f4f9;
    padding: 1rem 0;
    border-radius: 5px;
    text-align: center;
    flex-direction: column;
    width: 100%;
}

.form-title{
    font-size: 1.5rem;
    margin: 0;
}

#date-selection, #individual-day-selection {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: #f4f4f9;
    padding: 1rem;
    border-radius: 5px;
}

#date-selection label {
    font-weight: bold;
}

input[type="date"] {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#stats-container {
    margin-top: 20px;
}

.day-stats {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: #fafafa;
}

.day-stats h2 {
    color: #5c67f2;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.day-stats h3 {
    margin-top: 20px;
    color: #333;
}

.data-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.data-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#calendar-view {
    margin-bottom: 20px;
    text-align: center;
}

#calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

#calendar-header button {
    background-color: #5c67f2;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
}

#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    padding: 15px;
    background-color: #e9e9f2;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #d1d1e6;
}

.calendar-day.active {
    background-color: #5c67f2;
    color: white;
    font-weight: bold;
}

.calendar-day.inactive {
    background-color: #f4f4f9;
    color: #ccc;
    cursor: default;
}

#charts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-top: 20px;
}

#charts-container-full {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

#charts-container-full .chart-card{
    max-width: 100%;
}

.chart-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-grow: 1;
    max-width: 45%;
}

.people-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.location-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.person-card, .location-card{
    background-color: #f4f4f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-basis: calc(50% - 15px); /* Two cards per row on wider screens */
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.person-card h4, .location-card h4{
    color: #5c67f2;
    font-size: 1.25rem;
    margin: 0;
}

.person-card p, .location-card p{
    margin: 5px 0;
}

.macaron{
    background-color: #5c67f2;
    padding: .25rem .5rem;
    font-weight: bold;
    border-radius: 5px;
    color: white;
    font-size: .75rem;
}

.person-time-total .location-time-total {
    font-size: 0.9em;
    color: #666;
}

.location-list {
    min-width: unset;
}

@media (max-width: 768px) {
    .chart-card {
        max-width: 100%;
    }
    .person-card {
        flex-basis: 100%; /* Full width on smaller screens */
    }
}

#location-stats-view {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.location-selection-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

#location-select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}
