body {
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.gallery-container {
    max-width: 960px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 30px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.photo-item {
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 10px;
    background-color: #fff;
    overflow: hidden;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.photo-item img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.photo-label {
    font-size: 0.85em;
    color: #555;
    text-align: center;
    padding: 0 5px;
    line-height: 1.3;
    word-break: break-word;
}

.photo-label strong {
    color: #333;
    display: block;
    margin-bottom: 2px;
}

.back-link {
    display: block;
    width: fit-content;
    margin: 30px auto;
    padding: 8px 15px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.back-link:hover {
    background-color: #5a6268;
}

.photo-view-container {
    max-width: 1000px;
    margin: 40px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.photo-view-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photo-view-container h2 {
    color: #0056b3;
    margin-bottom: 5px;
}

.photo-view-container p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
}
