/* ========================================
   Grundeinstellungen
   ======================================== */

@media (min-width: 800px) {

    main {
        padding-top: 50px;
    }

    body {
        background-position: center center;
    }

    h1 {
        font-size: 2rem;
    }

}

@supports not (backdrop-filter: blur(18px)) {

    .glass-card {
        background: rgba(255, 255, 255, 0.80);
    }

}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background-image: url("../backgrounds/party-balloon-konfetti.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: #333;

    -webkit-text-size-adjust: 100%;
}

body::before {
    content: "";

    position: fixed;
    inset: 0;

    z-index: 0;

    background:
        radial-gradient(ellipse at center,
            rgba(255, 255, 255, 0.38) 0%,
            rgba(255, 255, 255, 0.28) 35%,
            rgba(255, 255, 255, 0.12) 65%,
            rgba(255, 255, 255, 0.02) 100%);

    pointer-events: none;
}


/* ========================================
   Hauptbereich
   ======================================== */

main {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 650px;

    margin: 0 auto;
    padding: 24px 16px 40px;
}


/* ========================================
   Überschrift
   ======================================== */

h1 {
    margin: 8px 0 10px;

    font-size: 1.8rem;
    line-height: 1.2;
    font-weight: 700;

    text-align: center;
}

.subtitle {
    margin: 0 auto 28px;

    max-width: 500px;

    color: #666;

    font-size: 1rem;
    line-height: 1.5;

    text-align: center;
}


/* ========================================
   Upload-Bereich
   ======================================== */

.upload-form {
    width: 100%;
}


/* ========================================
   Datei auswählen
   ======================================== */

.file-input-wrapper {
    width: 100%;
    margin-bottom: 20px;
}


/*
 * Das eigentliche File-Input verstecken.
 */

.file-input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;

    pointer-events: none;
}


/*
 * Button für die Dateiauswahl
 */

.file-input-label {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 58px;

    padding: 14px 20px;

    border: 2px dashed #aaa;
    border-radius: 14px;

    background: #fff;

    color: #444;

    font-size: 1rem;
    font-weight: 600;

    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}

.file-input-label:active {
    transform: scale(0.98);
}

.file-input-label:hover {
    background: #fafafa;
    border-color: #7f7e7e;
}


/* ========================================
   Ausgewählte Dateien
   ======================================== */

.selected-files {
    width: 100%;

    margin-bottom: 20px;

    padding: 18px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.80);

    color: #666;

    line-height: 1.5;

    overflow-wrap: anywhere;
}


/*
 * Anzahl
 */

.file-count {
    margin: 0 0 4px;

    color: #333;

    font-size: 1.05rem;
    font-weight: 600;
}


/*
 * Gesamtgröße
 */

.file-size {
    margin: 0 0 14px;

    color: #777;

    font-size: 0.95rem;
}


/*
 * Dateiliste
 */

.file-list {
    margin: 12px 0 0;
    padding: 0;

    list-style: none;

    border-top: 1px solid #eee;
}

.file-item {
    padding: 9px 0;

    border-bottom: 1px solid #eee;

    font-size: 0.9rem;

    color: #555;

    overflow-wrap: anywhere;
}


/* ========================================
   Fehlermeldungen
   ======================================== */

.upload-error {
    margin: 12px 0;
    padding: 12px 14px;

    border-radius: 10px;

    background: #fff0f0;

    color: #a33;

    font-size: 0.95rem;
    line-height: 1.45;
}

.upload-error p {
    margin: 0 0 5px;
}

.upload-error p:last-child {
    margin-bottom: 0;
}


.error-list {
    margin: 8px 0 0;
    padding-left: 20px;
}

.error-list li {
    margin-bottom: 4px;
}


/* ========================================
   Erfolgsmeldung
   ======================================== */

.upload-success {
    margin: 0;

    color: #287a45;

    font-size: 1rem;
    font-weight: 600;

    line-height: 1.5;
}


/* ========================================
   Fortschrittsanzeige
   ======================================== */

.upload-progress {
    width: 100%;

    margin-bottom: 20px;
    padding: 18px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.55);
}


/*
 * Beschriftung
 */

.progress-label {
    margin-bottom: 10px;

    color: #444;

    font-size: 0.95rem;
    font-weight: 600;
}


/*
 * Hintergrund des Fortschrittsbalkens
 */

.progress-bar-container {
    width: 100%;
    height: 12px;

    overflow: hidden;

    border-radius: 999px;

    background: #e5e5e5;
}


/*
 * Eigentliche Fortschrittsanzeige
 */

.progress-bar {
    width: 0;
    height: 100%;

    border-radius: inherit;

    background: #7f7e7e;

    transition: width 0.15s ease;
}


/*
 * Prozentanzeige
 */

.progress-percentage {
    margin-top: 8px;

    color: #666;

    font-size: 0.9rem;

    text-align: right;
}


/* ========================================
   Upload-Button
   ======================================== */

.upload-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 58px;

    padding: 14px 20px;

    border: none;
    border-radius: 14px;

    background: #7f7e7e;

    color: #fff;

    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        opacity 0.2s ease,
        transform 0.1s ease;
}

.upload-button:active:not(:disabled) {
    transform: scale(0.98);
}

.upload-button:hover:not(:disabled) {
    background: #6f6e6e;
}


/*
 * Deaktivierter Upload-Button
 */

.upload-button:disabled {
    opacity: 0.45;

    cursor: not-allowed;
}

/* ========================================
   Foto-Vorschau
   ======================================== */

.photo-preview-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;

    margin-top: 16px;
}


/*
 * Einzelnes Vorschaubild
 */

.photo-preview-item {
    min-width: 0;

    overflow: hidden;

    border-radius: 10px;

    background: #f1f1f1;
}


/*
 * Bild
 */

.photo-preview-image {
    display: block;

    width: 100%;
    aspect-ratio: 1 / 1;

    object-fit: cover;
}


/*
 * Dateiname
 */

.photo-preview-name {
    padding: 6px 7px 0;

    color: #555;

    font-size: 0.72rem;
    line-height: 1.2;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/*
 * Dateigröße
 */

.photo-preview-size {
    padding: 2px 7px 7px;

    color: #888;

    font-size: 0.7rem;
}

/* ========================================
   Foto entfernen
   ======================================== */

.photo-preview-item {
    position: relative;
}


.photo-remove-button {
    position: absolute;

    top: 6px;
    right: 6px;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.65);

    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
}


.photo-remove-button:active {
    transform: scale(0.9);
}

/* ========================================
   Begrüßungsbereich
   ======================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.68);

    border: 1px solid rgba(255, 255, 255, 0.75);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.10);

    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
}
.welcome {
    margin-bottom: 28px;

    padding: 28px 22px 24px;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.80);

    text-align: center;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.06);
}


/*
 * Kamera-Icon
 */

.welcome-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;

    margin: 0 auto 16px;

    border-radius: 50%;

    background: #f0f0f0;

    font-size: 30px;
}


/*
 * Kleine Überschrift
 */

.welcome-eyebrow {
    margin: 0 0 6px;

    color: #7f7e7e;

    font-size: 0.85rem;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}


/*
 * Hauptüberschrift
 */

.welcome h1 {
    margin: 0 0 14px;

    color: #333;

    font-size: 1.9rem;
    line-height: 1.2;
    font-weight: 700;
}


/*
 * Persönlicher Begrüßungstext
 */

.welcome-text {
    max-width: 480px;

    margin: 0 auto;

    color: #666;

    font-size: 1rem;
    line-height: 1.55;
}


/*
 * Hinweis unter dem Text
 */

.welcome-hint {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 20px;
    padding: 12px 14px;

    border-radius: 12px;

    background: #f7f7f7;

    color: #555;

    font-size: 0.88rem;
    line-height: 1.4;

    text-align: left;
}


.welcome-hint-icon {
    flex-shrink: 0;

    font-size: 1.25rem;
}