* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #2c3e50, #1a472a);
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.header-content h2 {
    font-size: 1.3rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.event-date {
    font-size: 1rem;
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

.admin-bar {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-login-form {
    display: flex;
    gap: 0.5rem;
}

.admin-login-form input {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
}

.admin-login-form button, .btn-admin {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.admin-login-form button:hover, .btn-admin:hover {
    background: #ffb300;
}

.logout {
    background: #e74c3c;
    color: white;
}

.logout:hover {
    background: #c0392b;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.alert {
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    text-align: center;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.media-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.media-thumb {
    width: 100%;
    height: 220px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.media-thumb img:hover {
    transform: scale(1.02);
}

.video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.media-caption {
    padding: 0.8rem;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.admin-actions {
    padding: 0.5rem;
    text-align: center;
    background: #f9f9f9;
}

.delete-btn {
    color: #e74c3c;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: #e74c3c;
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    gap: 0.5rem;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
}

.pagination a.active, .pagination a:hover {
    background: #1a472a;
    color: white;
    border-color: #1a472a;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

#lightbox-caption {
    color: white;
    margin-top: 1rem;
    text-align: center;
    font-size: 1rem;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Upload form */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input[type="file"], .form-group input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #777;
    font-size: 0.8rem;
}

.btn-submit {
    background: #1a472a;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #0e2e1c;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background: #2c3e50;
    color: white;
    margin-top: 2rem;
}

.no-media {
    text-align: center;
    grid-column: 1 / -1;
    padding: 2rem;
    background: white;
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    .media-thumb {
        height: 180px;
    }
    .header-content h1 {
        font-size: 1.4rem;
    }
}