@charset "utf-8";
/* CSS Document */

        /* --- CSS: Das Design & Kamera-Interface --- */
		* {
			margin: 0;
			padding: 0;
		}

        #game-container {
            position: relative;
            width: 100%;
            max-width: 660px;
            aspect-ratio: 1 / 1; 
            
            background-image: url("mm-markt-bg-final.jpg");
            background-size: cover;
            background-position: center bottom;
            background-repeat: no-repeat;
            overflow: hidden;
            border: 4px solid #333;
            border-radius: 10px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
			margin: auto;
			margin-top: 1rem;
			margin-bottom: 1rem;
        }
		
        /* --- NEU: Start Button --- */
        #game-intro {
            text-align: center;
            margin: 2rem 0;
        }

		h2#result-title {
    	font-size: 1.2rem;
		}

        #start-game-btn {
            padding: 0.9rem 1.2rem;
            font-size: 1.2rem;
            font-weight: bold;
            background-color: #df0000;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: transform 0.1s, background-color 0.2s;
        }

        #start-game-btn:hover {
            background-color: #cc0000;
        }

        #start-game-btn:active { 
            transform: scale(0.95); 
        }

        #camera-ui {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            pointer-events: none;
            border: 2px solid rgba(255, 255, 255, 0.3);
            box-sizing: border-box;
            z-index: 10;
        }

/* --- NEU: Schließen Button (X) oben rechts --- */
#game-container #close-game-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    
    /* --- DIE ZENTRIERUNG --- */
    width: 35px;
    height: 35px;
    font-size: 18px;
    line-height: 31px; /* Exakt die Höhe minus die Ränder (35px - 4px Rahmen) */
    text-align: center;
    padding: 0;
    margin: 0;
    /* ----------------------- */
    
    cursor: pointer;
    z-index: 50; 
    transition: background 0.2s, transform 0.1s;
	display: flex;
    justify-content: center;
    align-items: center;
}

#close-game-btn i {
    display: inline-block;
    vertical-align: middle;
}

#close-game-btn:hover {
    background: #df0000; /* Wird rot beim Hovern */
    transform: scale(1.1);
}

#close-game-btn:active {
    transform: scale(0.9);
}

/* --- UPDATE: REC Punkt nach Links verschieben --- */
#red-dot {
    position: absolute;
    top: 20px; 
    left: 20px; 
    color: red;
    font-weight: bold;
    font-size: 20px;
    animation: blink 1s infinite;
    
    /* NEU: Zieht den Punkt vor den schwarzen Schatten! */
    z-index: 20; 
}

        @keyframes blink { 50% { opacity: 0; } }

#focus-area {
    position: absolute;
    bottom: 50%; 
    left: 50%;
    transform: translate(-50%, 0); 
    width: 21%; 
    aspect-ratio: 190 / 140; 
    border: 3px dashed rgba(255, 255, 255, 0.8);
    background-color: rgba(255,255,255, 0.1); 
    z-index: 15;
    
    /* --- DIE MAGIE: Ein riesiger Schatten, der alles ausserhalb abdunkelt --- */
    /* Die 0.5 am Ende steht für 50% Dunkelheit. Wenn du es dunkler willst, mach 0.7 daraus! */
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5); 
}

#bunny {
    position: absolute;
    /* Fährt auf der gleichen Höhe wie der Fokus-Rahmen */
    bottom: 20%; 
    
    /* Startposition MUSS jetzt sehr weit links sein, da das Bild so groß ist! 
       Sonst ragt die Schnauze des Hasen schon beim Start ins Bild. */
    left: -100%; 
    
    /* Der Wagen ist jetzt massiv (z.B. 65% der gesamten Spielfeldbreite) */
    width: 55%; 
    height: auto; /* Behält die echten Proportionen deines Wagen-Bildes bei */
    
    will-change: left;
    z-index: 5; /* Der Wagen fährt HINTER dem Fokus-Rahmen durch */
}
		
p#win-info {
    padding: 1rem;
}
		
p#result-text {
    padding: 0.5rem;
}
		
		#coupon-box-outer {
		flex-direction: column;
		justify-content: center;
		align-items: center;	
		}

        /* --- NEU: Die drei verschiedenen Fahrstile als Keyframes --- */
        /* Animation 1: Linear (gleichmässig) */
        @keyframes driveLinear {
            0% { left: -50%; }
            100% { left: 120%; }
        }

        /* Animation 2: Abbremsen (Startet schnell, wird langsam, dann wieder normal) */
        /* Wir tricksen hier mit Prozenten, um die Geschwindigkeit in der Mitte zu drosseln */
        @keyframes driveBrake {
            0% { left: -50%; }
            40% { left: 30%; } /* Fährt schnell bis kurz vor die Mitte */
            70% { left: 55%; } /* Kriecht in Zeitlupe durch die Mitte! */
            100% { left: 120%; } /* Beschleunigt am Ende wieder weg */
        }

        /* Animation 3: Turbo (Startet langsam, schiesst durch die Mitte) */
        @keyframes driveTurbo {
            0% { left: -50%; }
            30% { left: -10%; } /* Schleicht ins Bild */
            60% { left: 20%; }  /* Fährt gemütlich bis zur Mitte... */
            100% { left: 120%; } /* ...und ZISCH! Extrem schnell weg! */
        }
		
		.intro-box-img {
			background-image: url(intro-img.png);
			background-size: cover;
			background-position: center;
			width: 35%;
			aspect-ratio: 320 / 180; 
			/* Optional: Damit es weicher aussieht, falls du abgerundete Ecken magst */
			border-radius: 8px;
			margin: auto;
		}

		.intro-box-outer {
			display: flex;
			gap: 30px; /* Abstand zwischen Bild und Text */
			margin: 20px 0;
		}

		.intro-box-text {
			display: flex;
			flex-direction: column;
			justify-content: center;
			width: 50%; /* Nimmt die andere Hälfte des Platzes ein */
		}

		/* --- MOBILE BREAKPOINT (z.B. für Handys und kleine Tablets) --- */
		@media (max-width: 768px) {
			.intro-box-outer {
				/* Bricht das Flex-Layout auf "untereinander" um */
				flex-direction: column; 
				gap: 15px; /* Abstand zwischen Bild und Text auf Mobile */
			}

			.intro-box-img,
			.intro-box-text {
				/* Beide Elemente nehmen nun die volle Breite ein */
				width: 100%; 
			}
		}

        #controls {
            position: absolute;
            bottom: 3%; 
            width: 100%;
            text-align: center;
            z-index: 20;
        }

        #game-container button {
            padding: 12px 25px;
            font-size: 18px;
            font-weight: bold;
            background-color: #df0000;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            box-shadow: 0 4px 6px rgba(0,0,0,0.2);
            transition: transform 0.1s;
        }
        #game-container button:active { transform: scale(0.95); }

        #result-modal {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.85);
            color: white;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 1rem;
            box-sizing: border-box;
            z-index: 30;
        }
        
        @media (max-width: 400px) {
            button { padding: 10px 15px; font-size: 14px; }
            #red-dot { font-size: 14px; }
        }
		
         /* --- MOBILE BREAKPOINT (Für Bildschirme kleiner als 600px) --- */
        @media (max-width: 600px) {

            #result-title {
                font-size: 20px;
                margin-top: 0;
            }

            #result-text {
                width: 100%;
                font-size: 14px;
            }

            .coupon-code {
                width: 100%; /* Da der Container jetzt 95% ist, darf der Code 100% sein */
                box-sizing: border-box;
                font-size: 18px; 
                padding: 10px;
            }

            #win-info {
                max-width: 100% !important;
                font-size: 14px !important;
                margin-top: 10px !important;
                padding: 0.5rem 0 !important; /* Nimmt etwas Abstand weg */
            }

            #result-modal button {
                width: 100%;
                font-size: 16px;
                padding: 12px;
            }
        }

.coupon-code {
    background: #fff;
    color: #df0000;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 0.5rem;
    border-radius: 5px;
    letter-spacing: 2px;
    line-height: 1rem;
    
    /* --- NEU FÜR DIE KOPIER-FUNKTION --- */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Abstand zwischen Text und Icon */
    cursor: pointer; /* Zeigt die Klick-Hand an */
    transition: background-color 0.2s, transform 0.1s;
}

/* Kurzer Hover-Effekt, damit es sich wie ein Button anfühlt */
.coupon-code:hover {
    background: #f9f9f9;
    transform: scale(1.02);
}

.coupon-code:active {
    transform: scale(0.98);
}