/**
 * FINAL BURN CSS
 * Styles für den finalen Burn-Effekt mit Zündholz-Cursor und Canvas-Burn
 * MINIMAL CHANGE: Original + Draggable Match Styles
 */

/* ===== ZÜNDHOLZ-CURSOR STYLES - ORIGINAL BEHALTEN ===== */

/* 1px PNG Cursor, möglichst unsichtbar*/
body.match-cursor,
body.match-cursor *,
body.lit-match-cursor,
body.lit-match-cursor *,
body.burn-phase-cursor {
    cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIHWNgAAIAAAUAAY27m/MAAAAASUVORK5CYII=") 8 8, none !important;
    forced-color-adjust: none !important;
}

.match-cursor::after {
    content: '';
    position: fixed;
    left: var(--mouse-x, 0);
    top: var(--mouse-y, 0);
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, #8B4513 0%, #A0522D 70%, #D2691E 100%);
    border-radius: 2px;
    transform: translate(-50%, -50%) rotate(45deg);
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 0 3px rgba(139, 69, 19, 0.5);
}

/* ===== BRENNENDES ZÜNDHOLZ CURSOR - ORIGINAL BEHALTEN ===== */

.lit-match-cursor::after {
    content: '';
    position: fixed;
    left: var(--mouse-x, 0);
    top: var(--mouse-y, 0);
    width: 35px;
    height: 4px;
    background: linear-gradient(90deg, #8B4513 0%, #A0522D 60%, #FF4500 90%, #FF6347 100%);
    border-radius: 2px;
    transform: translate(-50%, -50%) rotate(45deg);
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(255, 69, 0, 0.8);
}

.lit-match-cursor::before {
    content: '';
    position: fixed;
    left: var(--mouse-x, 0);
    top: var(--mouse-y, 0);
    width: 24px;
    height: 28px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyNCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTIgMiBDOCA2IDYgMTIgOCAxOCBDMTAgMTQgMTEuNSAxNCAxMiAxOCBDMTIuNSAxNCAxNCAxNCAxNiAxOCBDMTggMTIgMTYgNiAxMiAyIFoiIGZpbGw9IiNGRjQ1MDAiLz48cGF0aCBkPSJNMTIgNSBDOSA5IDggMTMgOSAxNyBDMTEgMTQgMTEuNSAxNCAxMiAxNyBDMTIuNSAxNCAxMyAxNCAxNSAxNyBDMTYgMTMgMTUgOSAxMiA1IFoiIGZpbGw9IiNGRjYzNDciLz48cGF0aCBkPSJNMTIgOCBDMTAuNSAxMSA5IDEzIDEwIDE1IEMxMS41IDE0IDEyIDE0IDEyIDE1IEMxMiAxNCAxMi41IDE0IDE0IDE1IEMxNSAxMyAxMy41IDExIDEyIDggWiIgZmlsbD0iI0ZGRkY5NCIvPjwvc3ZnPg==');
    background-size: contain;
    background-repeat: no-repeat;
    transform: translate(-26px, -30px);
    z-index: 10001;
    pointer-events: none;
    animation: flame-flicker 0.3s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px rgba(255, 69, 0, 0.8));
}

/* ===== NEU: DRAGGABLE MATCH STYLES ===== */

.draggable-match {
    position: fixed;
    border-radius: 50%;
	border: none !important;
	outline: none !important;
    transform: translate(-50%, -50%) rotate(45deg);
    z-index: 3500;
    cursor: grab;
    user-select: none;
    transition: opacity 0.3s ease;
    touch-action: none;
    pointer-events: auto;
}

.draggable-match:active {
    cursor: grabbing;
}

/* Unlit Match - EXAKTE ORIGINAL-WERTE */
.draggable-match.unlit {
    width: 40px;
    height: 4px;
    background: transparent !important;  /* ← Hier ändern */
    box-shadow: none !important; 
}

/* Lit Match - EXAKTE ORIGINAL-WERTE */
.draggable-match.lit {
    width: 35px;
    height: 4px;
    background: transparent !important;
    box-shadow: none !important;
}

/* Match Flame - EXAKTE ORIGINAL-POSITION UND SVG */
.match-flame {
    position: absolute;
    left: -26px;
    top: -30px;
    width: 24px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(255, 69, 0, 0.8));
    animation: flame-flicker 0.3s ease-in-out infinite alternate;
}

/* ===== BLUMEN-BURN EFFEKTE - ORIGINAL UNVERÄNDERT ===== */

@keyframes flower-burn-fade-in {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes realistic-flower-burn {
    0% { transform: translate(-50%, -50%) scale(1); filter: blur(1.5px) brightness(1.1); }
    25% { transform: translate(-50%, -50%) scale(1.1); filter: blur(1.2px) brightness(1.3); }
    50% { transform: translate(-50%, -50%) scale(0.9); filter: blur(1.8px) brightness(1.0); }
    75% { transform: translate(-50%, -50%) scale(1.05); filter: blur(1.4px) brightness(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); filter: blur(1.5px) brightness(1.1); }
}

/* ===== CANVAS BURN EFFEKTE - ORIGINAL UNVERÄNDERT ===== */

@keyframes ignition-pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ===== ZÜNDHOLZ BURN EFFEKT - ORIGINAL UNVERÄNDERT ===== */

/* Flammen-Animation für entflammtes Zündholz - ORIGINAL */
@keyframes flame-flicker {
    0% { 
        opacity: 0.9; 
        transform: translate(-26px, -30px) scale(1); 
    }
    100% { 
        opacity: 1; 
        transform: translate(-26px, -30px) scale(1.12); 
    }
}

/* ===== MOBILE & TOUCH OPTIMIERUNGEN FÜR DRAGGABLE ===== */

@media (max-width: 768px) {
    .draggable-match.unlit {
        width: 50px;
        height: 6px;
        /* Größeres Touch-Target für mobile Geräte */
    }
    
    .draggable-match.lit {
        width: 45px;
        height: 6px;
    }
    
    .match-flame {
        left: -30px;
        top: -35px;
        width: 28px;
        height: 32px;
    }
}

@media (pointer: coarse) {
    .draggable-match.unlit {
        width: 60px;
        height: 8px;
        box-shadow: none !important; /* ← Hier ändern */
    }
    
    .draggable-match.lit {
        width: 55px;
        height: 8px;
        box-shadow: none !important; /* ← Hier ändern */
    }
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    .match-flame {
        animation: none;
    }
    
    .draggable-match {
        transition: opacity 0.3s ease;
    }
}

/* ===== HOVER STATES (für Maus-Nutzer) ===== */

@media (hover: hover) and (pointer: fine) {
    .draggable-match:hover {
        transform: translate(-50%, -50%) rotate(45deg) scale(1.02);
    }
    
	.draggable-match.unlit:hover {
		box-shadow: none !important; /* ← So sollte es sein */
	}

	.draggable-match.lit:hover {
		box-shadow: none !important; /* ← So sollte es sein */
	}
}
