body, html {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f0f2f5;
    touch-action: none; /* Verhindert das Scrollen der Seite auf Mobilgeräten */
    overflow: hidden;
}

#app-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: #ffffff; /* Fester Hintergrund, um nicht durchsichtig zu sein */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Dezenter Schatten */
    z-index: 100;
}

.logo {
    font-size: 1.8em;
}

.app-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

#tinder-app {
    display: flex;
    justify-content: center; /* Zentriert horizontal */
    align-items: center;   /* Zentriert vertikal */
    width: 100%;
    height: 100%;
    padding-top: 70px; /* Platz für den Header */
    padding-bottom: 120px; /* Platz für die Buttons */
    box-sizing: border-box; /* Sorgt dafür, dass padding die Gesamtgröße nicht sprengt */
}

#card-container {
    position: relative;
    width: 90vw;
    height: 100%; /* Füllt den verfügbaren Platz zwischen Header und Buttons */
    max-width: 400px;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity; /* Performance-Tipp für Animationen */
    
    background-color: #fff; /* Verhindert durchscheinen */
    opacity: 0; /* Standardmäßig unsichtbar */
    z-index: 1; /* Basis-Z-Index */
    pointer-events: none; /* Macht sie nicht anklickbar, solange sie nicht oben sind */
}

/* Nur die oberste Karte ist sichtbar und interaktiv */
.card:last-child {
    opacity: 1; /* Die oberste Karte ist voll sichtbar */
    z-index: 10; /* Die oberste Karte liegt über allen anderen */
    pointer-events: auto; /* Macht die oberste Karte anklickbar/wischbar */
}

.card-bio {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

#action-buttons {
    position: absolute;
    bottom: 20px; /* Sicherer Abstand zum unteren Rand */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

#action-buttons button {
    width: 70px;
    height: 70px;
    border-radius: 50%; /* Macht die Buttons rund */
    border: 1px solid #ddd;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-size: 2.5em; /* Größe der Emojis */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#action-buttons button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

#action-buttons button:active {
    transform: scale(1.05);
}

#reject-btn {
    color: #ff4d4d;
}

#accept-btn {
    color: #4caf50;
}

/* --- Match Animation --- */
#match-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Standardmäßig versteckt */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.match-text {
    font-size: 6em;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 20px #ff006a, 0 0 30px #ff006a;
    transform: scale(0);
    animation: match-animation 0.8s forwards ease-out;
}

@keyframes match-animation {
    0% { transform: scale(0) rotate(-30deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}