body, html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100dvh; /* dvh verhindert Probleme mit der mobilen Adresszeile (iOS Safari) */
    overflow: hidden;
    background-color: #111;
    /* Verhindert Pull-to-refresh und Scrollen beim Rubbeln auf dem Handy */
    overscroll-behavior-y: none;
}

/* Home Button in die Ecke zwingen */
.wischer-home {
    top: 30px;
    left: 30px;
    bottom: auto;
    z-index: 100;
}

.wischer-container {
    width: 100vw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scratch-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

#reveal-image {
    display: block;
    max-width: 100vw;
    max-height: 100dvh;
    width: auto;
    height: auto;
}

#wipe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    touch-action: none; /* Wichtig für flüssiges Wischen auf Mobile */
}

/* --- Erfolgsmeldung --- */
#success-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 50px 70px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#success-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#success-overlay h2 {
    color: var(--primary-color, #005A9C);
    font-size: 3.5rem;
    margin-bottom: 15px;
}

#success-overlay p {
    font-size: 1.6rem;
    color: #444;
    margin-bottom: 40px;
}

.restart-btn {
    background-color: var(--primary-color, #005A9C);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.6rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(0, 90, 156, 0.4);
    transition: transform 0.1s;
}

.restart-btn:active {
    transform: scale(0.95);
}

/* --- Konfetti Animation --- */
.confetti {
    position: absolute;
    top: -20px;
    border-radius: 4px;
    z-index: 5; /* Unter dem Overlay, aber über dem Bild */
    pointer-events: none;
    animation: fall linear forwards;
}

@keyframes fall {
    to { transform: translateY(100vh) rotate(720deg); }
}

/* --- Responsive Anpassungen Wischer --- */
@media (max-width: 768px) {
    .wischer-home { top: 20px; left: 20px; width: 60px; height: 60px; font-size: 1rem; }
    
    #success-overlay {
        width: 90%;
        padding: 30px;
    }
    #success-overlay h2 { font-size: 2.5rem; margin-bottom: 10px; }
    #success-overlay p { font-size: 1.2rem; margin-bottom: 25px; }
    .restart-btn {
        padding: 15px 30px;
        font-size: 1.2rem;
    }
}