/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif;
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 25%, #DEB887 50%, #F4A460 75%, #8B4513 100%);
    min-height: 100vh;
    color: #2D2D2D;
    overflow-x: hidden;
}

/* Falling Leaves Animation */
.falling-leaves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.falling-leaves::before,
.falling-leaves::after {
    content: '🍂';
    position: absolute;
    font-size: 20px;
    animation: fall 15s linear infinite;
    opacity: 0.7;
}

.falling-leaves::before {
    left: 10%;
    animation-delay: 0s;
}

.falling-leaves::after {
    left: 80%;
    animation-delay: 7s;
    content: '🍃';
}

@keyframes fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Password Screen */
.password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.9) 0%, rgba(205, 133, 63, 0.9) 50%, rgba(139, 69, 19, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.password-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.password-header h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: #8B4513;
    margin-bottom: 1rem;
}

.password-header p {
    color: #5D4037;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.password-form input {
    padding: 1rem;
    border: 2px solid #DEB887;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Lora', serif;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.password-form input:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.password-form button {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #8B4513, #CD853F);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Lora', serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 69, 19, 0.3);
}

.password-error {
    color: #D32F2F;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Gallery Content */
.gallery-content {
    min-height: 100vh;
    z-index: 2;
    position: relative;
}

/* Gallery Header */
.gallery-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    color: #8B4513;
    margin-bottom: 0.5rem;
}

.header-content p {
    color: #5D4037;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.gallery-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid #DEB887;
    border-radius: 25px;
    color: #8B4513;
    font-family: 'Lora', serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover,
.nav-btn.active {
    background: linear-gradient(45deg, #8B4513, #CD853F);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

/* Gallery Grid */
.gallery-main {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f5f5f5;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .category-tag {
    background: rgba(139, 69, 19, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #8B4513;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #DEB887;
    border-top: 4px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.end-message {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #8B4513;
    font-weight: 600;
}

/* Fullscreen Modal */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2001;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.download-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(45deg, #8B4513, #CD853F);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-family: 'Lora', serif;
    font-weight: 600;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 69, 19, 0.3);
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.nav-arrow {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.nav-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.image-info {
    text-align: center;
    color: white;
    flex: 1;
}

.image-info span {
    display: block;
    margin: 0.25rem 0;
}

#imageCounter {
    font-size: 1.1rem;
    font-weight: 600;
}

#imageCategory {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: capitalize;
}

/* Responsive Design */
@media (max-width: 768px) {
    .password-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .password-header h1 {
        font-size: 2rem;
    }
    
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .nav-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .gallery-nav {
        gap: 0.5rem;
    }
    
    .modal-navigation {
        padding: 0.5rem 1rem;
    }
    
    .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .download-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .close-btn {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 200px;
    }
} 