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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #3498db;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-outline {
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

.btn-outline:hover {
    background: #e74c3c;
    color: white;
}

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-photo {
    margin-bottom: 2rem;
}

.profile-photo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: white;
}

.about-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
}

/* Galleries Section */
.galleries-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.galleries-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

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

.gallery-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.gallery-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecf0f1;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.gallery-info p {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.gallery-info small {
    color: #95a5a6;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
}

.gallery-modal-content {
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.modal-header {
    background: #3498db;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.warning-text {
    color: #e74c3c;
    font-weight: 500;
    margin-top: 1rem;
}

/* Gallery Header Actions */
.gallery-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Image Selection Styles */
.gallery-image-item.selection-mode {
    position: relative;
}

.gallery-image-item.selection-mode .image-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    width: 20px;
    height: 20px;
    cursor: pointer;
    transform: scale(1.5);
    accent-color: #3498db;
    background-color: white;
    border: 2px solid #3498db;
    border-radius: 3px;
}

.gallery-image-item.selection-mode .image-checkbox:checked {
    background-color: #3498db !important;
    border-color: #2980b9 !important;
}

/* Add checkmark for better visibility */
.gallery-image-item.selection-mode .image-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: -2px;
    left: 2px;
}

.gallery-image-item.selected .image-overlay {
    background: rgba(52, 152, 219, 0.8) !important;
    border: 3px solid #3498db !important;
}

.gallery-image-item.selected {
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.gallery-image-item.selected::before {
    content: '✓ SELECTED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    z-index: 15;
    pointer-events: none;
}

.gallery-image-item.selection-mode .image-overlay {
    pointer-events: none;
}

.gallery-image-item.selection-mode .image-delete-btn {
    display: none;
}

/* Bulk delete button states */
#bulkDeleteBtn:disabled {
    background-color: #95a5a6 !important;
    color: #7f8c8d !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

#bulkDeleteBtn:not(:disabled) {
    background-color: #e74c3c !important;
    color: white !important;
    cursor: pointer !important;
    opacity: 1 !important;
}

#bulkDeleteBtn:not(:disabled):hover {
    background-color: #c0392b !important;
}

/* Login Form */
.login-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #3498db;
}

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

.gallery-image-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

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

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

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1rem 0.5rem 0.5rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-image-item:hover .image-overlay {
    transform: translateY(0);
}

.image-overlay h4 {
    font-size: 0.9rem;
    margin: 0;
}

/* Metadata styling */
.metadata-camera {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #fff;
}

.metadata-tech {
    font-size: 0.8rem;
    color: #e0e0e0;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.metadata-date {
    font-size: 0.75rem;
    color: #ccc;
    font-style: italic;
}

/* Lightbox metadata styling */
.lightbox-info .metadata-camera {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.lightbox-info .metadata-tech {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.lightbox-info .metadata-date {
    font-size: 0.9rem;
}

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

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
}

.lightbox-close:hover {
    opacity: 0.7;
}

#lightboxImage {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.4);
}

.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.lightbox-info h3 {
    margin: 0 0 0.5rem 0;
}

.lightbox-info p {
    margin: 0;
    opacity: 0.8;
}

/* Admin Page */
.admin-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2500;
    overflow-y: auto;
}

.admin-header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-content {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.admin-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

/* Admin Gallery List */
.admin-gallery-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-gallery-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.admin-gallery-item .gallery-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.admin-gallery-item .gallery-info p {
    margin: 0 0 0.25rem 0;
    color: #6c757d;
}

.admin-gallery-item .gallery-info small {
    color: #adb5bd;
}

.gallery-actions {
    display: flex;
    gap: 0.5rem;
}

/* Upload Section */
.upload-section {
    margin-top: 1rem;
}

.drop-zone {
    border: 3px dashed #bdc3c7;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
}

.drop-zone:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
    transform: translateY(-2px);
}

.drop-zone.dragover {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    border-style: solid;
}

.drop-zone p {
    margin: 0;
    color: #7f8c8d;
    font-size: 1.1rem;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-progress {
    margin-top: 1rem;
}

/* Gallery Preview */
.gallery-preview {
    margin: 1rem 0;
    padding: 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: #f8f9fa;
}

.gallery-preview h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.cover-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.current-cover-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.current-cover-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.no-cover-image {
    padding: 2rem;
    text-align: center;
    color: #7f8c8d;
    background: #ecf0f1;
    border-radius: 8px;
    border: 2px dashed #bdc3c7;
}

/* Cover Image Selection Modal */
.cover-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    z-index: 3000;
}

.cover-selection-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.cover-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.cover-option {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    border: 3px solid transparent;
}

.cover-option:hover {
    transform: scale(1.05);
    border-color: #3498db;
}

.cover-option.selected {
    border-color: #27ae60;
}

.cover-option img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.upload-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: #ecf0f1;
    border-radius: 5px;
}

.upload-item.success {
    background: #d5f4e6;
    color: #27ae60;
}

.upload-item.error {
    background: #fadbd8;
    color: #e74c3c;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .gallery-images {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .lightbox-nav {
        padding: 0 10px;
    }
    
    .nav-btn {
        font-size: 1.5rem;
        padding: 0.3rem 0.6rem;
    }
    
    .lightbox-info {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .admin-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-photo img {
        width: 120px;
        height: 120px;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .about-section,
    .galleries-section {
        padding: 60px 0;
    }
    
    .about-section h2,
    .galleries-section h2 {
        font-size: 2rem;
    }
    
    .gallery-images {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.3rem;
    }
}

/* Footer */
.footer {
    background: #fff;
    color: #333;
    padding: 1.5rem 0;
    margin-top: 4rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}

.footer-contact a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.footer-location {
    font-weight: 500;
    color: #333;
}

.footer-copyright {
    color: #333;
}

@media (max-width: 768px) {
    .footer-content {
        justify-content: space-around;
        font-size: 0.9rem;
    }
}