/* Reset and base */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-image:
        linear-gradient(rgba(5, 71, 42, 0.3), rgba(5, 71, 42, 0.3)),
        url('background.jpg'); /* Replace with your image URL */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #e6f0e8;
    height: 100vh;
    overflow: hidden;
}

/* Container */
.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(5, 71, 42, 0.85);
    padding: 20px 30px;
    border-radius: 10px;
    max-width: 95vw;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(5, 71, 42, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Scrollbar styling for WebKit browsers */
.container::-webkit-scrollbar {
    width: 14px; /* slightly wider */
}

.container::-webkit-scrollbar-track {
    background: rgba(5, 71, 42, 0.5); /* darker translucent track */
    border-radius: 12px;
}

.container::-webkit-scrollbar-thumb {
    background-color: #0a6b3a; /* richer evergreen */
    border-radius: 12px;
    border: 3px solid rgba(5, 71, 42, 0.5); /* more visible border */
}

.container::-webkit-scrollbar-thumb:hover {
    background-color: #0f7f4b; /* lighter on hover */
}

/* Scrollbar styling for Firefox */
.container {
    scrollbar-width: auto; /* wider scrollbar */
    scrollbar-color: #0a6b3a rgba(5, 71, 42, 0.5);
}


/* Headings */
h1, h2 {
    margin: 0 0 20px 0;
    font-weight: 700;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.8rem;
}

/* Upload form */
form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

input[type="file"] {
    display: none;
}

/* Styled label as button for file input */
label.upload-btn {
    padding: 14px 36px;
    font-size: 1.1em;
    font-weight: 700;
    color: #e6f0e8;
    background: linear-gradient(145deg, #0a6b3a, #05472a);
    border: 2px solid #0a6b3a;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(5, 71, 42, 0.7);
    user-select: none;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    text-align: center;
}

label.upload-btn:hover,
label.upload-btn:focus {
    background: linear-gradient(145deg, #0f7f4b, #0a6b3a);
    box-shadow: 0 10px 20px rgba(5, 71, 42, 0.9);
    transform: scale(1.05);
    outline: none;
}

/* Submit button */
button.upload-submit-btn {
    padding: 14px 28px;
    font-size: 1.1em;
    font-weight: 700;
    color: #e6f0e8;
    background: #0a6b3a;
    border: 2px solid #05472a;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(5, 71, 42, 0.7);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

button.upload-submit-btn:hover,
button.upload-submit-btn:focus {
    background: #05472a;
    box-shadow: 0 10px 20px rgba(5, 71, 42, 0.9);
    transform: scale(1.05);
    outline: none;
}

/* Gallery */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.gallery img {
    max-width: 100px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover,
.gallery img:focus {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(5, 71, 42, 0.8);
    outline: none;
}

/* Pagination */
.pagination {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.pagination a button,
.pagination button[disabled] {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    color: #e6f0e8;
    background-color: #0a6b3a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(5, 71, 42, 0.7);
    transition: background-color 0.3s ease;
}

.pagination a button:hover,
.pagination a button:focus {
    background-color: #05472a;
    outline: none;
}

.pagination button[disabled] {
    background-color: #022d18;
    cursor: default;
    opacity: 0.6;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal img,
.modal video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(5, 71, 42, 0.9);
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        top: 45%;
        transform: translate(-50%, -45%);
        padding: 15px 20px;
        max-height: 75vh;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .gallery img {
        max-width: 80px;
    }
    form {
        flex-direction: column;
        gap: 10px;
    }
}

.spinner {
    margin: 0 auto 8px auto;
    width: 32px;
    height: 32px;
    border: 4px solid rgba(230, 240, 232, 0.3);
    border-top-color: #0a6b3a; /* evergreen accent */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Close button */

.container .page-header {
  width: 100%;                /* full container width */
  display: flex;
  align-items: center;
  justify-content: center;     /* center heading */
  margin-bottom: 20px;
  position: relative;
  padding: 0 10px;            /* optional side padding */
}

.page-header h1 {
  margin: 0;
  font-size: 2em;             /* explicit original size */
  color: #e6f0e8;             /* explicit original color */
  font-weight: 600;           /* restore intended font weight */
  text-align: center;
  flex: 1;
}

.close-btn {
  position: absolute;
  top: 50%;                   /* vertically center relative to header */
  right: 10px;                /* align to container padding */
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1.2em;
  color: #e6f0e8;
  background: rgba(5,71,42,0.8);
  border-radius: 50%;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.close-btn:hover {
  background: #0a6b3a;
  transform: translateY(-50%) scale(1.1);
}

.close-btn:focus {
  outline: 2px solid #e6f0e8;
  outline-offset: 2px;
}

