/* Common styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container, .detail-container, .help-container {
    max-width: 1200px;
    margin: 0 auto;
}

.help-container {
    max-width: 800px;
}

.back-link {
    display: inline-block;
    padding: 10px 15px;
    background: #007bff; /* Default blue */
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.index-page .back-link {
    background: #6c757d; /* Gray for index page */
}

/* Index/Dashboard styles */
.latest-image {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.latest-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 5px;
}

.latest-image .datetime {
    font-size: 1.2em;
    margin-top: 10px;
    color: #666;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.hour-list, .day-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.time-link {
    display: block;
    padding: 15px;
    background: white;
    border-radius: 5px;
    text-decoration: none;
    color: #007bff;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.time-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

/* Hour and Day gallery styles */
.hour-title, .day-title {
    margin-bottom: 20px;
    color: #333;
}

.hour-gallery .image-grid, .day-gallery .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.image-item {
    text-align: center;
}

.thumbnail {
    width: 100%;
    height: 150px; /* Default for index page */
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.hour-gallery .thumbnail, .day-gallery .thumbnail {
    height: 200px;
}

.thumbnail:hover {
    transform: scale(1.03);
}

.image-datetime {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

/* Detail page styles */
.detail-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.detail-image {
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.detail-page .back-link {
    margin-top: 20px;
    padding: 10px 20px;
}

/* Help page styles */
.help-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.help-page h1, .help-page h2 {
    color: #333;
}

.endpoint {
    background: #f8f9fa;
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.endpoint h3 {
    margin-top: 0;
    color: #007bff;
}

.help-page .back-link {
    background: #6c757d;
}