@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #483D8B;
    --secondary-color: #FFD700;
    --dark-color: #2d3142;
    --light-color: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.2);
    --overlay-text: rgba(255, 255, 255, 0.9);
    --success-color: #198754;
    --danger-color: #dc3545;
    --form-bg: rgba(45, 40, 80, 0.95);
    --form-radius: 16px;
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--overlay-text);
    background-color: #000;
    min-height: 100vh;
    overflow: hidden;
}

/* Hauptcontainer für Bild und Overlay */
.main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Bessere mobile Unterstützung */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Button am unteren Rand */
    overflow: hidden;
    background-color: #000;
    padding-bottom: 20px; /* Abstand vom unteren Safari-Rand */
}

/* Hintergrundbild - vollständig sichtbar */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* GANZES BILD SICHTBAR */
    object-position: center top; /* Bild von oben ausrichten */
    z-index: 0;
}

/* Overlay-Container */
.overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    background: none;
    color: var(--overlay-text);
    z-index: 2;
}

/* Minimaler Gradient nur für den Button-Bereich */
.image-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35vh; /* Höherer Gradient für bessere Sichtbarkeit */
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
}

/* Event Info als Button - RESPONSIVE */
.event-info {
    text-align: center;
    width: calc(100% - 20px);
    max-width: 400px;
    padding: 20px 15px 30px 15px;
    margin: 0 10px 20px 10px; /* Abstand nach unten für Safari */
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px; /* Komplett rund, nicht nur oben */
    position: relative;
    z-index: 3;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.event-info:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.3);
}

/* Event Title - RESPONSIVE */
.event-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary-color);
    text-shadow: 2px 2px 0 #222, 4px 4px 0 #444, 1px 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
}

.hosts-info {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin: 8px 0 12px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Tap-Indikator */
.event-info::after {
    content: '?';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--secondary-color);
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-5px); }
    60% { transform: translateX(-50%) translateY(-3px); }
}

/* Mobile Anpassungen */
@media (max-width: 480px) {
    .main-container {
        padding-bottom: 30px; /* Mehr Abstand für Safari iPhone */
    }
    
    .hero-image {
        object-fit: contain; /* Sicherstellen dass das Bild vollständig sichtbar ist */
        object-position: center top; /* Von oben ausrichten für bessere Sichtbarkeit */
    }
    
    .event-info {
        width: calc(100% - 24px);
        margin: 0 12px 15px 12px;
        padding: 18px 14px 26px 14px;
        border-radius: 18px;
    }
    
    .event-title {
        font-size: 2.4rem;
        margin-bottom: 8px;
    }
    
    .hosts-info {
        font-size: 0.95rem;
        margin: 8px 0 10px 0;
    }
    
    .event-info::after {
        bottom: 8px;
        font-size: 1rem;
        content: '?';
    }
}

/* Sehr kleine Geräte */
@media (max-width: 390px) {
    .main-container {
        padding-bottom: 40px; /* Extra Abstand für sehr kleine Geräte */
    }
    
    .event-info {
        width: calc(100% - 20px);
        margin: 0 10px 10px 10px;
        padding: 16px 12px 24px 12px;
        border-radius: 16px;
    }
    
    .event-title {
        font-size: 2.2rem;
        margin-bottom: 6px;
    }
    
    .hosts-info {
        font-size: 0.9rem;
        margin: 6px 0 8px 0;
    }
}

/* Desktop - größere Versionen */
@media (min-width: 768px) {
    .hero-image {
        object-fit: cover; /* Auf Desktop kann cover verwendet werden */
        object-position: center;
    }
    
    .event-info {
        width: calc(100% - 30px);
        max-width: 400px;
        padding: 25px 20px 35px 20px;
        margin: 0 15px 0 15px;
        border-radius: 25px 25px 0 0;
    }
    
    .event-title {
        font-size: 3.5rem;
        margin-bottom: 8px;
    }
    
    .hosts-info {
        font-size: 1.2rem;
        margin: 8px 0 12px 0;
    }
    
    .event-info::after {
        bottom: 8px;
        font-size: 1.2rem;
        content: '?';
    }
}

/* Alle anderen Infos verstecken */
.event-date, .event-location, .event_note, .rsvp-button, .edit-button {
    display: none;
}

/* Slide-up Container für Details */
.event-details-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(45, 40, 80, 0.85);
    backdrop-filter: blur(25px);
    border-radius: 25px 25px 0 0;
    padding: 30px 20px 40px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-details-popup.show {
    transform: translateY(0);
}

/* Close Button für Popup */
.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.popup-close:hover {
    color: white;
}

/* Popup Header */
.popup-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.popup-hosts {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Popup Content */
.popup-content {
    text-align: center;
}

.popup-date {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.popup-location {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.popup-location a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.popup-location a:hover {
    color: white;
    text-decoration: underline;
}

.popup-note {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 12px 0 25px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.4;
}

/* Buttons im Popup */
.popup-buttons {
    margin-top: 25px;
}

.popup-rsvp-button {
    display: inline-block;
    margin: 15px auto 10px;
    background: linear-gradient(45deg, var(--secondary-color), #ffeb3b);
    color: var(--dark-color);
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    text-shadow: none;
    width: 100%;
    max-width: 280px;
}

.popup-rsvp-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    background: linear-gradient(45deg, #ffdf33, var(--secondary-color));
}

.popup-edit-button {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 12px auto 0;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.popup-edit-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    color: white;
}

/* RSVP-Formular Container - mobile-optimiert */
.rsvp-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 1001;
    padding: 0;
    overflow-y: auto;
}

.rsvp-container.show {
    display: flex;
}

.form-overlay-header {
    text-align: center;
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
    background: rgba(45, 40, 80, 0.95);
    border-radius: 25px 25px 0 0;
    position: relative;
}

.form-overlay-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.form-overlay-body {
    background-color: rgba(45, 40, 80, 0.95);
    backdrop-filter: blur(20px);
    padding: 25px 20px 30px 20px;
    border-radius: 0 0 25px 25px;
    width: 100%;
    max-width: 400px;
    margin: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
}

/* Button zum Schließen des Formulars - repositioniert */
.close-form {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background var(--transition-speed);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.close-form:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Formular-Styling - verbesserte Sichtbarkeit */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    color: white;
    transition: all var(--transition-speed);
}

.form-control:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Bessere Sichtbarkeit für Select-Felder */
.form-control option {
    background-color: #2d3142;
    color: white;
}

/* Buttons im RSVP-Formular */
.attendance-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.attendance-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 10px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    font-weight: 500;
    border: none;
    color: white;
    font-size: 0.95rem;
}

.attendance-btn[data-value="yes"] {
    background-color: rgba(25, 135, 84, 0.6);
}

.attendance-btn[data-value="no"] {
    background-color: rgba(220, 53, 69, 0.6);
}

.attendance-btn.active {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.attendance-btn[data-value="yes"].active {
    background-color: var(--success-color);
}

.attendance-btn[data-value="no"].active {
    background-color: var(--danger-color);
}

/* Companion Choice Buttons */
.companion-choice {
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

.companion-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.companion-btn {
    width: 100%;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.companion-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
}

.companion-btn.active {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: var(--secondary-color);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* Guest Info Header */
.guest-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 15px;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}
.guests-input {
    display: none;
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
}

.guests-input.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.guest-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.guest-counter:last-child {
    margin-bottom: 0;
}

.guest-label {
    flex: 1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.counter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.counter-btn {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.counter-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.counter-value {
    width: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* Sende-Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, var(--secondary-color), #ffeb3b);
    color: var(--dark-color);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    margin-top: 20px;
}

.btn-submit:hover {
    background: linear-gradient(45deg, #ffdf33, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Danksagung */
.thank-you {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--form-bg);
    padding: 35px 25px;
    border-radius: var(--form-radius);
    width: 90%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    z-index: 1002;
    display: none;
    color: white;
}

.thank-you-icon {
    font-size: 50px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.thank-you-title {
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.thank-you-text {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Mobile Optimierungen für RSVP-Formular */
@media (max-width: 768px) {
    .rsvp-container {
        align-items: flex-start;
        padding: 0;
    }
    
    .form-overlay-header {
        padding: 18px 15px 12px 15px;
        border-radius: 20px 20px 0 0;
    }
    
    .form-overlay-header h3 {
        font-size: 1.3rem;
    }
    
    .form-overlay-body {
        padding: 20px 15px 25px 15px;
        border-radius: 0 0 20px 20px;
        max-width: none;
        width: 100%;
        margin: 0;
    }
    
    .close-form {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .popup-title {
        font-size: 2rem;
    }
    
    .popup-date {
        font-size: 1.1rem;
    }
    
    .popup-location {
        font-size: 1rem;
    }
    
    .popup-note {
        font-size: 0.9rem;
    }
    
    .popup-rsvp-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .popup-edit-button {
        font-size: 0.9rem;
    }
    
    .form-overlay-header {
        padding: 15px 12px 10px 12px;
        border-radius: 15px 15px 0 0;
    }
    
    .form-overlay-header h3 {
        font-size: 1.2rem;
    }
    
    .form-overlay-body {
        padding: 18px 12px 22px 12px;
        border-radius: 0 0 15px 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-label {
        margin-bottom: 5px;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .attendance-buttons {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .attendance-btn {
        width: 100%;
        padding: 10px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .guests-input {
        padding: 12px;
        border-radius: 8px;
        margin-top: 12px;
    }
    
    .guest-counter {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .guest-counter:last-child {
        border-bottom: none;
    }
    
    .guest-label {
        font-size: 0.85rem;
    }
    
    .counter-controls {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }
    
    .counter-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .counter-value {
        font-size: 16px;
        width: 35px;
    }
    
    .btn-submit {
        padding: 12px;
        font-size: 0.95rem;
        border-radius: 8px;
        margin-top: 15px;
    }
    
    .close-form {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 360px) {
    .form-overlay-header {
        padding: 12px 10px 8px 10px;
    }
    
    .form-overlay-header h3 {
        font-size: 1.1rem;
    }
    
    .form-overlay-body {
        padding: 15px 10px 20px 10px;
    }
    
    .form-control {
        padding: 8px 10px;
    }
    
    .btn-submit {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Email Info Text */
.email-info-text {
    color: white;
}
/* Companion Choice Buttons */
.companion-choice {
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

.companion-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.companion-btn {
    width: 100%;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.companion-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
}

.companion-btn.active {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: var(--secondary-color);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* Guest Info Header */
.guest-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 15px;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

/* Neues CSS für den Anfahrt und Parkmöglichkeiten Link */
.popup-parking {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.popup-parking a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.popup-parking a:hover {
    color: white;
    text-decoration: underline;
}

.popup-parking a i {
    font-size: 1rem;
}

/* Mobile Anpassungen für den Parking-Link */
@media (max-width: 480px) {
    .popup-parking {
        font-size: 1rem;
    }
    
    .popup-parking a i {
        font-size: 0.9rem;
    }
}