/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    line-height: 1.6;
    scroll-behavior: smooth;
    padding: 0 20px; /* Consistent padding on both sides */
    margin: 0 auto;
    max-width: 1200px;
}

header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    background-size: 400% 400%;
    animation: gradientBG 35s ease infinite; /* Slowed down from 25s to 35s */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header h1 {
    font-family: 'Verdana', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav li {
    margin: 0.5rem 1rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.album {
    padding: 2rem;
    margin: 1rem 0;
    background-color: #2d2d2d;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    scroll-margin-top: 80px;
}

.album h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #9370db; /* Soft purple color for album titles */
    text-align: center;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.photo-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.photo-container:hover {
    transform: scale(1.05);
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.photo-container:hover img {
    opacity: 0.7;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.photo-container:hover .overlay {
    transform: translateY(0);
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 200;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff6b6b;
}

.album-title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff8c42;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    z-index: 10;
}

.caption {
    margin: 1rem auto;
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
    max-width: 90%;
}

/* Admin section */
.admin-section {
    padding: 2rem;
    margin: 1rem 0;
    background-color: #3a3a3a;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.admin-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

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

.admin-form input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: none;
    background-color: #4a4a4a;
    color: white;
    font-size: 1rem;
}

.admin-form button {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.3rem 0;
    }
    
    .album {
        padding: 1rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .photo-container {
        height: 250px;
    }
    
    .album h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .photo-container {
        height: 300px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .album h2 {
        font-size: 1.3rem;
    }
}

/* Animation for photo containers */
.photo-container {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Additional styling for better visual appeal */
.album:nth-child(even) {
    background-color: #353535;
}

.album:nth-child(odd) {
    background-color: #2d2d2d;
}

/* Admin login page styles */
.admin-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background-color: #2d2d2d;
}

.error-message {
    color: #ff6b6b;
    margin-bottom: 1rem;
    text-align: center;
}

/* Navigation arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    cursor: pointer;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.nav-arrow:hover {
    opacity: 1;
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

/* Photo description in lightbox */
.photo-description {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    max-width: 80%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    display: none;
}

/* Admin content styles */
.admin-content {
    margin-top: 2rem;
}

.admin-controls {
    margin-bottom: 2rem;
    text-align: center;
}

.admin-controls button {
    background: linear-gradient(135deg, #4a6491, #2c3e50);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 100, 145, 0.4);
}

.photo-list ul {
    list-style-type: none;
    padding: 0;
}

.photo-list li {
    background-color: #4a4a4a;
    margin: 0.5rem 0;
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-form {
    background-color: #4a4a4a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

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

.photo-form input,
.photo-form textarea,
.photo-form select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: none;
    background-color: #3a3a3a;
    color: white;
    font-size: 1rem;
}

.photo-form button {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.photo-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}
