body {
    font-family: Arial, sans-serif;
    margin: 0;
    color: #333;
    background: #f5f5f5;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
    padding: 1.5rem 0;
}

.site-header {
    background: #2563eb;
    color: white;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header nav a {
    color: white;
    margin-left: 1rem;
    text-decoration: none;
}

h1, h2, h3 {
    margin: 0 0 0.75rem;
}

.alert {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.post-card,
.gallery-item,
.form-group {
    background: white;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.gallery-item img {
    width: 100%;
    display: block;
    border-radius: 0.75rem;
}

button {
    background: #2563eb;
    border: none;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

input[type="text"], input[type="file"], input[type="password"], input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
}

/* Gallery search */
.search-box {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.search-form button {
    padding: 0.75rem 1.5rem;
}

.search-info {
    background: #f0f9ff;
    padding: 1rem;
    border-left: 4px solid #2563eb;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.keywords {
    font-size: 0.85rem;
    color: #666;
    background: #f5f5f5;
    padding: 0.4rem 0.6rem;
    border-radius: 0.3rem;
    display: inline-block;
    margin: 0.25rem 0;
}

/* Gallery thumbnails */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.gallery-item {
    background: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.gallery-item a {
    display: block;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.2s;
}

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

.caption {
    font-size: 0.9rem;
    margin: 0.5rem 0;
    color: #555;
}

.photo-meta {
    font-size: 0.85rem;
    color: #999;
    margin: 0.5rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-link,
.pagination-current {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    border: 1px solid #cbd5e1;
    background: white;
    color: #2563eb;
}

.pagination-link:hover {
    background: #f0f9ff;
    border-color: #2563eb;
}

.pagination-current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    font-weight: bold;
}

/* Photo view */
.photo-view {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .photo-view {
        grid-template-columns: 1fr;
    }
}

.photo-container {
    background: white;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.full-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
}

.photo-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.photo-navigation a,
.photo-navigation span {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    border-radius: 0.5rem;
    text-decoration: none;
}

.nav-prev,
.nav-next {
    background: #2563eb;
    color: white;
    transition: background 0.2s;
}

.nav-prev:hover,
.nav-next:hover {
    background: #1d4ed8;
}

.nav-back {
    background: #64748b;
    color: white;
}

.nav-back:hover {
    background: #475569;
}

.nav-prev.disabled,
.nav-next.disabled {
    background: #cbd5e1;
    color: #999;
    cursor: not-allowed;
}

.photo-info {
    background: white;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.photo-details-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 1rem 0;
}

.photo-details-card h3 {
    margin-bottom: 0.35rem;
    color: #2563eb;
}

.photo-details-card p {
    margin: 0 0 0.75rem;
    white-space: pre-wrap;
}

/* Comments */
.comments-section {
    margin-top: 2rem;
}

.comments-list {
    margin: 1rem 0;
}

.comment-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid #2563eb;
}

.comment-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #2563eb;
}

.comment-item p {
    margin: 0.5rem 0;
}

.comment-item small {
    color: #999;
    font-size: 0.85rem;
}

.comment-form {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-family: Arial, sans-serif;
    resize: vertical;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background: #2563eb;
    color: white;
    font-weight: bold;
}

.admin-table tr:hover {
    background: #f8fafc;
}

/* Edit sections */
.edit-section {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border-left: 4px solid #2563eb;
}

.edit-section summary {
    cursor: pointer;
    font-weight: bold;
    color: #2563eb;
    user-select: none;
    padding: 0.5rem;
    margin: -0.5rem;
}

.edit-section summary:hover {
    text-decoration: underline;
}

.edit-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #cbd5e1;
}

.edit-form .form-group {
    margin-bottom: 0.75rem;
}

.edit-form button {
    background: #16a34a;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.edit-form button:hover {
    background: #15803d;
}

/* User edit inline form */
.user-edit-details {
    cursor: pointer;
}

.user-edit-details summary {
    color: #2563eb;
    text-decoration: underline;
    font-weight: normal;
    cursor: pointer;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.form-group-inline {
    flex: 1;
    min-width: 150px;
}

.form-group-inline input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.3rem;
    font-size: 0.9rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.3rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-small:hover {
    background: #1d4ed8;
}

