body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to right, #fce7f3, #ede9fe);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 12;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
    border-radius: 0.5rem;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    animation: fadeIn 0.3s;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
    text-decoration: none;
}

#picture-upload-modal {
    display: none;
    position: fixed;
    z-index: 13;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

#picture-upload-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
    border-radius: 0.5rem;
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

#picture-upload-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

#picture-upload-modal-close:hover,
#picture-upload-modal-close:focus {
    color: #000;
    text-decoration: none;
}

.modal-button {
    padding: 10px 20px;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    margin: 0.5rem;
    width: 100%;
    text-align: center;
}

.modal-button.take-picture {
    background-color: #3b82f6; /* Blue 500 */
    color: white;
}

.modal-button.take-picture:hover {
    background-color: #2563eb; /* Blue 700 */
}

#picture-preview {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin-top: 1rem;
    display: none;
}

/* Records screen styles */
#records-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 11;
    overflow-y: auto;
}

#records-screen-content {
    background-color: #fff;
    width: 95%;
    max-width: 600px;
    margin: 2rem auto;
    border-radius: 0.5rem;
    padding: 1.5rem;
    position: relative;
}

#records-screen-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
}

#records-screen-close:hover {
    color: #333;
}

/* Activity selection styles */
.activity-icon {
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 12px;
    object-fit: cover; /* Ensures the GIF maintains aspect ratio */
}

.activity-button {
    display: block;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.activity-button .flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.activity-button span {
    font-weight: 500;
    color: #6b7280;
    transition: color 0.2s ease;
    text-align: center;
}

.activity-button:hover {
    background-color: rgba(219, 234, 254, 0.3);
}

.activity-button:hover .activity-icon {
    transform: scale(1.08);
}

.activity-button:hover span {
    color: #4b5563;
}

/* Style for selected activity */
.selected-activity {
    background-color: rgba(219, 234, 254, 0.5); /* light blue bg */
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.2);
}

.selected-activity span {
    color: #1e40af; /* Blue 800 */
    font-weight: 600;
}

/* Responsive grid for activities */
#activity-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.record-image {
    max-width: 100px;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    display: block;
}

#upload-status {
    color: #4CAF50;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

/* Login page styles */
.login-container {
    animation: fadeIn 0.5s;
}

/* Animation for activity detail container */
#activity-detail-container {
    transition: all 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

#activity-detail-container.hidden {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
}

#activity-detail-container:not(.hidden) {
    opacity: 1;
    max-height: 1000px; /* Arbitrary large value to ensure all content shows */
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Edit record modal styles */
#edit-image-preview {
    max-width: 100%;
    max-height: 150px;
    border-radius: 0.375rem;
    object-fit: cover;
}

/* Record action buttons */
.record-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.action-button {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.edit-button {
    background-color: #3b82f6;
    color: white;
}

.edit-button:hover {
    background-color: #2563eb;
}

.delete-button {
    background-color: #ef4444;
    color: white;
}

.delete-button:hover {
    background-color: #dc2626;
}