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

body {
    font-family: 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a2947 0%, #2c3e50 50%, #1a2947 100%);
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Erweiterte geometrische Hintergrundformen - inspiriert von der Einladung */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.08) 0%, transparent 40%),
        linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.05) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 40%, rgba(26, 41, 71, 0.8) 50%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Zusätzliche geometrische Elemente */


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.header {
    background: linear-gradient(135deg, #1a2947 0%, #2c3e50 100%);
    color: white;
    padding: 40px 30px;
    padding-top: 80px;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.2);
    overflow: hidden;
}

/* HUK-inspirierte Dekoration im Header */
.header::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.header::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 160px;
    height: 160px;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.1) 50%, transparent 70%);
    transform: rotate(-30deg);
    pointer-events: none;
}

.header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    font-weight: 900;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    letter-spacing: -0.02em;
}

/* #5yrs Style für Haupttitel */
.header h1::before {
    content: "#5yrs";
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.4em;
    color: #FFD700;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header h1::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    border-radius: 2px;
}

.header p {
    position: relative;
    z-index: 2;
    opacity: 0.95;
    font-size: 1.1em;
    font-weight: 500;
    margin-top: 10px;
}

/* Simple & Great Tagline */
.header p::after {
    content: "simple & great";
    display: block;
    margin-top: 10px;
    color: #FFD700;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: lowercase;
    text-align: center;
}

/* Motto-Beschreibung Styling */
#mottoDescription {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ffffff;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* HTML-Formatierung in Motto-Beschreibungen */
#mottoDescription b,
#mottoDescription strong {
    font-weight: 900;
    color: #FFD700;
    font-size: 1.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#mottoDescription i,
#mottoDescription em {
    font-style: italic;
    color: #FFD700;
    font-weight: 600;
}

#mottoDescription u {
    text-decoration: underline;
    text-decoration-color: #FFD700;
    text-decoration-thickness: 2px;
}

#mottoDescription br {
    line-height: 2;
}

.user-info {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 3;
}

.user-info span {
    font-size: 0.9em;
    color: #FFD700;
    font-weight: 600;
}

.logout-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a2947;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
}

@media (max-width: 768px) {
    .user-info {
        position: static;
        margin-top: 20px;
        justify-content: center;
    }

    .header {
        text-align: center;
        padding-top: 40px;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .header h1::before {
        font-size: 0.5em;
        top: -30px;
    }
}

.upload-section {
    background: rgba(255, 255, 255, 0.97);
    color: #1a2947;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}



.upload-section h2 {
    color: #1a2947;
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 1.8em;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #1a2947;
    font-size: 1.1em;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 15px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #1a2947;
    font-weight: 500;
}

input[type="text"]:focus,
input[type="file"]:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.25);
    transform: translateY(-2px);
}

.upload-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a2947;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.upload-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gallery-section {
    background: rgba(255, 255, 255, 0.97);
    color: #1a2947;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}



.gallery-header {
    text-align: center;
    margin-bottom: 35px;
}

.gallery-header h2 {
    color: #1a2947;
    font-size: 2.2em;
    margin-bottom: 15px;
    font-weight: 700;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

/* Erweiterte Lazy Loading Styles */
.lazy-image {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    will-change: opacity;
    transform: translateZ(0);
}

.lazy-image.loaded {
    opacity: 1;
    will-change: auto;
}

.photo-card {
    border: 2px solid rgba(26, 41, 71, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    background: white;
    position: relative;
    cursor: pointer;
}

.photo-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

.photo-card:hover::before {
    opacity: 1;
}

.photo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.photo-card:hover img,
.photo-card:active img {
    transform: scale(1.05);
}

.photo-info {
    padding: 20px;
    background: white;
}

.photo-motto-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    display: inline-block;
    text-transform: capitalize;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: mottoTagPulse 2s ease-in-out infinite alternate;
}

@keyframes mottoTagPulse {
    0% { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    100% { box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3); }
}

.photo-station {
    font-size: 1.3em;
    font-weight: 700;
    color: #1a2947;
    margin-bottom: 8px;
}

.photo-name {
    font-size: 1.1em;
    color: #7f8c8d;
    margin-bottom: 8px;
    font-weight: 500;
}

.photo-date-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-date {
    font-size: 0.95em;
    color: #95a5a6;
    font-weight: 500;
}

.photo-delete-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 18px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.photo-delete-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.message {
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: none;
    font-weight: 600;
    font-size: 1.1em;
}

.success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.loading {
    text-align: center;
    padding: 25px;
    color: #7f8c8d;
    font-size: 1.1em;
    font-weight: 500;
}

.drop-zone {
    border: 4px dashed #FFD700;
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    background: rgba(255, 215, 0, 0.08);
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #FFA500;
    background: rgba(255, 215, 0, 0.15);
    transform: scale(1.02);
}

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

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.drop-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.drop-hint {
    font-size: 0.95em;
    color: #7f8c8d;
    font-weight: 500;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.file-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
}

.preview-info {
    flex: 1;
    text-align: left;
}

.remove-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.remove-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* iOS File Input Fix */
.file-input-ios-fix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    font-size: 0;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .drop-zone {
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        touch-action: manipulation;
        /* Bessere Touch-Ziele für iOS */
        min-height: 120px;
        -webkit-appearance: none;
        -webkit-border-radius: 20px;
    }

    /* Label-spezifische iOS-Optimierungen */
    .drop-zone:active {
        background: rgba(255, 215, 0, 0.2);
        transform: scale(0.98);
    }

    .file-input-ios-fix {
        -webkit-appearance: none;
        appearance: none;
    }
}

/* Verbesserte Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 41, 71, 0.96);
    display: none;
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
    padding-bottom: 30px;
    padding-left: 15px;
    padding-right: 15px;
    backdrop-filter: blur(15px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    padding: 15px;
    gap: 25px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 15px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-info {
    background: rgba(255, 255, 255, 0.98);
    padding: 0px;
    border-radius: 20px;
    text-align: center;
    min-width: 400px;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    flex-grow: 1;
    min-height: 0;
    max-height: 40vh;
    overflow-y: auto;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.lightbox-station {
    font-size: 1.2em;
    font-weight: 700;
    color: #1a2947;
    margin-bottom: 4px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1;
}

.lightbox-name {
    font-size: 1em;
    color: #7f8c8d;
    margin-bottom: 4px;
    font-weight: 500;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1;
}

.lightbox-date {
    font-size: 0.9em;
    color: #95a5a6;
    font-weight: 500;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 215, 0, 0.95);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    color: #1a2947;
    font-weight: 700;
}

.lightbox-nav:hover {
    background: rgba(255, 215, 0, 1);
    transform: translateY(-50%) scale(1.1);
}

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

.lightbox-nav:disabled:hover {
    transform: translateY(-50%) scale(1);
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}

.lightbox-counter {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 215, 0, 0.95);
    color: #1a2947;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    z-index: 1002;
    backdrop-filter: blur(10px);
}

.lightbox-delete {
    position: absolute;
    bottom: 25px;
    right: 25px;
    background: rgba(220, 53, 69, 0.95);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.lightbox-delete:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.05);
}

/* Erweiterte Hover-Effekte */
.photo-card::after {
    content: "🔍";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5em;
    color: white;
    background: rgba(26, 41, 71, 0.85);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.photo-card:hover::after,
.photo-card:active::after {
    opacity: 1;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a2947;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 50px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.load-more-btn:hover,
.load-more-btn:active {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.load-more-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Zusätzliche Branding-Elemente */
.photo-count {
    color: #7f8c8d;
    font-style: italic;
    font-weight: 500;
}

.no-photos {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.2em;
    padding: 50px;
    font-weight: 500;
}

/* Erweiterte Animationen */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Staggered Animation für Container */
.container > * {
    animation: fadeInUp 0.8s ease-out;
}

.container > *:nth-child(1) { animation-delay: 0.1s; }
.container > *:nth-child(2) { animation-delay: 0.2s; }
.container > *:nth-child(3) { animation-delay: 0.3s; }

/* Mobile Optimierungen */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 15px;
    }

    .upload-section,
    .gallery-section {
        padding: 25px;
    }

    .photo-card {
        min-height: 320px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.1);
    }

    .photo-card img {
        height: 200px;
    }

    .lightbox-nav {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    .lightbox-close {
        width: 45px;
        height: 45px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }

    .lightbox-counter {
        top: 15px;
        font-size: 14px;
        padding: 10px 16px;
    }

    .lightbox-delete {
        bottom: 15px;
        right: 15px;
        padding: 10px 20px;
        font-size: 14px;
    }

    @media (max-width: 768px) {
        .lightbox-info {
            min-width: 300px;
            padding: 0px;
            max-height: 35vh;
        }

        .lightbox-station {
            font-size: 1.1em;
        }

        .lightbox-name {
            font-size: 0.95em;
        }

        .lightbox-date {
            font-size: 0.85em;
        }

    .drop-zone {
        padding: 35px;
    }

    .drop-icon {
        font-size: 3em;
    }
}

/* Zusätzliche Performance-Optimierungen */
.photo-card img {
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    will-change: transform;
}

.photo-card:hover img {
    will-change: auto;
}

/* Accessibility Verbesserungen */
.photo-card:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

.upload-btn:focus,
.load-more-btn:focus,
.logout-btn:focus {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

/* HUK-spezifische Akzente */
.gallery-header h2::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Zusätzliche geometrische Dekoration */
.upload-section::after {
    content: "";
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.gallery-section::after {
    content: "";
    position: absolute;
    top: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.08) 50%, transparent 70%);
    transform: rotate(45deg);
    border-radius: 20%;
    pointer-events: none;
}
