/* Chrome Browser Compatibility Enhancements */
/* Diese Datei sollte nach den anderen CSS-Dateien geladen werden */

/* Ersetze zoom-Eigenschaften mit standardkonformen transform: scale() */
@media (min-width: 1900px) and (orientation: landscape) {
    html {
        zoom: unset !important;
        transform: translate(-50%, -50%) scale(1.2) !important;
    }
    #d1 {
        zoom: unset !important;
        transform: scale(1) !important;
    }
}

@media (min-height: 1000px) {
    html {
        zoom: unset !important;
        transform: translate(-50%, -50%) scale(1.2) !important;
    }
}

@media (min-height: 1300px) {
    html {
        zoom: unset !important;
        transform: translate(-50%, -50%) scale(1.3) !important;
    }
}

/* Ersetze -webkit-text-stroke mit cross-browser text-shadow */
/*.highlight {
    -webkit-text-stroke-color: unset !important;
    -webkit-text-stroke: unset !important;
    text-shadow:
            0 0 1px white,
            0 0 1px white,
            0 0 2px white,
            1px 1px 0 white,
            -1px -1px 0 white,
            1px -1px 0 white,
            -1px 1px 0 white !important;
}*/

.redt {
    -webkit-text-stroke: unset !important;
}

/* Entferne veraltete Flexbox-Präfixe */
@media (min-height: 667px) {
    body {
        -ms-flex-align: unset !important;
        -ms-flex-pack: unset !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Verbesserte Performance für Animationen */
.hero img,
.underline-image,
.buttons a {
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Chrome-spezifische Schriftoptimierung */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Verbesserte Scroll-Performance */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hardware-Beschleunigung für bessere Performance */
.container,
.hero,
.buttons {
    transform: translateZ(0);
}

/* Fix für Chrome's grid-Darstellung */
.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 10px;
    place-items: center;
}

/* Bessere Hover-Effekte für Chrome */
.buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero img:hover {
    transform: scale(1.05) translateZ(0);
}

.underline-image:hover {
    transform: translateZ(0);
}

/* Chrome-spezifische Fixes für Layout-Probleme */
body {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Bessere Darstellung von Schatten in Chrome */
.hero img {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Fix für Chrome's backdrop-filter Support */
.overlay-text,
header,
footer {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Verbesserte Schriftdarstellung für Chrome */
.logo,
.highlight,
#texted {
    font-feature-settings: "liga" 1, "kern" 1;
    -webkit-font-feature-settings: "liga" 1, "kern" 1;
}

/* Chrome-spezifische Media Query Fixes */
@supports (-webkit-appearance: none) {
    /* Chrome-spezifische Styles */
    .buttons a {
        -webkit-appearance: none;
        appearance: none;
    }

    .underline-image {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Fix für Chrome's transform-origin bei scale */
@media (min-height: 1000px), (min-height: 1300px) {
    html {
        transform-origin: center center;
    }
}

/* Verbesserte Grid-Kompatibilität für ältere Chrome-Versionen */
@supports not (display: grid) {
    .button-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .button-grid a {
        flex: 0 1 calc(25% - 10px);
        margin: 5px;
    }
}

/* Chrome-spezifische Optimierungen für mobile Geräte */
@media screen and (max-width: 768px) {
    html {
        -webkit-text-size-adjust: none;
    }

    .buttons {
        -webkit-overflow-scrolling: touch;
    }
}

/* Fix für Chrome's handling von viewport units */
@supports (height: 100dvh) {
    html, body {
        min-height: 100dvh;
    }
}

/* Verbesserte Kompatibilität für Chrome's CSS Custom Properties */
:root {
    --chrome-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    --chrome-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero img,
.underline-image,
.buttons a {
    transition: var(--chrome-transition);
}