/* Reset und Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 40px 20px;
}

.header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Admin Link */
.admin-link {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    z-index: 1000;
}

.admin-link:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Ordner-Navigation */
.folder-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.folder-btn {
    background: rgba(255,255,255,0.9);
    color: #667eea;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.folder-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.folder-btn.active {
    background: #667eea;
    color: white;
}

/* Galerie Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Bild-Karte */
.image-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s;
    cursor: pointer;
}

.image-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

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

.image-info {
    padding: 20px;
}

.image-description {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
}

.image-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item strong {
    color: #667eea;
    min-width: 80px;
}

.price {
    color: #28a745;
    font-weight: 600;
    font-size: 16px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.lightbox.active {
    display: block;
}

.lightbox-content {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    min-height: 90vh;
    align-items: stretch !important;
}

.lightbox-image-container {
    flex: 1 1 60% !important;
    background: #000;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 90vh;
    min-width: 400px;
    max-width: calc(100% - 450px);
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.lightbox-sidebar {
    flex: 0 0 450px !important;
    display: flex !important;
    flex-direction: column !important;
    background: white !important;
    overflow-y: auto;
    max-height: 90vh;
    width: 450px !important;
    min-width: 450px !important;
}

.lightbox-details {
    padding: 30px;
    border-bottom: 3px solid #667eea;
    background: white !important;
    color: #333 !important;
}

.lightbox-details h2 {
    margin-bottom: 20px;
    color: #333 !important;
    font-size: 24px;
}

.lightbox-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lightbox-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333 !important;
}

.lightbox-meta .meta-item strong {
    color: #667eea !important;
    min-width: 100px;
}

.lightbox-meta .meta-item span {
    color: #333 !important;
}

.lightbox-comments {
    padding: 30px;
    background: #f8f9fa !important;
    flex: 1;
}

.lightbox-comments h3 {
    margin-bottom: 20px;
    color: #333 !important;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.95);
    color: #333;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.lightbox-close:hover {
    background: white;
    transform: rotate(90deg);
}

/* Kommentare */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.comment {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.comment-text {
    color: #333;
}

.comment-form {
    margin-top: 20px;
}

.comment-form h4 {
	padding: 10 px;
	margin-bottom: 10px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-form button {
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.comment-form button:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Visitor Counter */
.visitor-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    color: #667eea;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .lightbox-sidebar {
        flex: 0 0 350px !important;
        width: 350px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .folder-nav {
        flex-direction: column;
    }
    
    .folder-btn {
        width: 100%;
    }
    
    /* Lightbox umbricht auf Handy */
    .lightbox {
        padding: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .lightbox-content {
        flex-direction: column !important;
        min-height: auto !important;
        flex-wrap: nowrap !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .lightbox-image-container {
        min-height: auto !important;
        max-height: 70vh !important;
        padding: 10px !important;
        width: 100% !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    
    .lightbox-image {
        max-height: 70vh !important;
        max-width: calc(100vw - 20px) !important;
        width: auto !important;
        height: auto !important;
    }
    
    .lightbox-sidebar {
        flex: 1 1 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    .lightbox-details {
        padding: 10px !important;
    }
    
    .lightbox-comments {
        padding: 10px !important;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .admin-link {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .visitor-counter {
        bottom: 10px;
        left: 10px;
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* Footer */
.footer {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    margin-top: 60px;
    text-align: center;
    border-radius: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 20px;
}

.footer-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.footer-copyright {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    margin-top: 15px;
}

/* Lade-Animation */
.loading {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 18px;
}

.loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
