/* Global Reset */
* {
    margin: 0; /* Entfernt Standard-Margins */
    padding: 0; /* Entfernt Standard-Paddings */
    box-sizing: border-box; /* Verwendet die Border-Box für bessere Größenberechnung */
}

body {
    font-family: Arial, sans-serif; /* Standard-Schriftart für die gesamte Seite */
    line-height: 1.6; /* Zeilenhöhe für besseren Lesefluss */
    color: #dddddd; /* Standard-Textfarbe */
    background: linear-gradient(135deg, #c73737 0%, #1153bd 100%); /* Hintergrund als Verlauf */
    min-height: 100vh; /* Mindesthöhe des Viewports */
    display: flex; /* Ermöglicht Flexbox für das Layout */
    flex-direction: column; /* Stapelt Elemente vertikal */
}

/* Navigation */
nav {
    background-color: #333; /* Dunkler Hintergrund für die Navigationsleiste */
    padding: 1rem 1.5rem; /* Größerer Innenabstand (oben/unten, links/rechts) */
    position: fixed; /* Fixiert die Navigation am oberen Rand */
    width: 100%; /* Dehnt die Navigation über die gesamte Breite aus */
    top: 0; /* Positionierung oben */
    z-index: 1000; /* Legt die Navigation über andere Elemente */
    display: flex; /* Aktiviert Flexbox für die Navigation */
    align-items: center; /* Zentriert Logo und Links vertikal */
    height: 70px; /* Höhe der Navigationsleiste */
}


nav .logo {
    position: relative; /* Macht die Position des Logos relativ */
    left: 39rem; /* Verschiebt das Logo leicht nach rechts */
    display: flex; /* Flexbox für das Logo (falls später Text hinzugefügt wird) */
    align-items: center; /* Zentriert das Logo vertikal */
}

nav .logo img {
    height: 35px; /* Höhe des Logos */
    width: 35px; /* Breite des Logos */
    border-radius: 50%; /* Macht das Bild rund */
    object-fit: cover; /* Passt das Bild an, ohne es zu verzerren */
}

nav ul {
    list-style-type: none; /* Entfernt Aufzählungspunkte */
    display: flex; /* Richtet Listenelemente horizontal aus */
    justify-content: center; /* Zentriert die Links innerhalb der Navigation */
    margin: 0 auto; /* Zentriert die Liste im Flexbox-Container */
    padding: 0; /* Entfernt Padding */
    flex-grow: 1; /* Nutzt verfügbaren Platz, ohne die Links zu verschieben */
}

nav ul li {
    margin: 0 1rem; /* Abstand zwischen den Navigationselementen */
}

nav ul li a {
    color: white; /* Textfarbe für Links in der Navigation */
    text-decoration: none; /* Entfernt die Unterstreichung */
    font-weight: bold; /* Fettgedruckter Text */
    font-size: 1.1rem; /* Schriftgröße identisch mit der style.css */
    transition: color 0.3s ease; /* Weicher Farbwechsel bei Hover */
}

nav ul li a:hover,
nav ul li a.active {
    color: #00a8ff; /* Farbe für aktive oder gehoverte Links */
}


/* Spielfeld */
#game {
    display: grid;
    grid-template-columns: repeat(3, 100px); /* 3 Spalten */
    gap: 5px; /* Abstand zwischen den Zellen */
    justify-content: center; /* Zentriert das Spielfeld horizontal */
    margin: 0 auto; /* Zentriert das Grid im Container */
}

.cell {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #333;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #f8f9fa;
    color: #000; /* Setzt die Schriftfarbe auf Schwarz */
    transition: background-color 0.3s ease;
}

.cell:hover {
    background-color: #d3d3d3;
}



/* H1-Überschrift für das Spiel */
.container {
    position: relative; /* Grundlage für absolute Positionierung */
    max-width: 600px;
    margin: 6rem auto 2rem;
    padding: 2rem;
    background-color: rgb(197, 191, 191);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}


.back-arrow {
    position: absolute; /* Positioniere den Pfeil unabhängig vom Rest des Inhalts */
    top: 20px; /* Abstand vom oberen Rand des Containers */
    left: 20px; /* Abstand vom linken Rand des Containers */
    font-size: 1.2rem; /* Schriftgröße des Pfeils */
    text-decoration: none; /* Entfernt die Unterstreichung */
    color: white; /* Weiße Schriftfarbe */
    padding: 0.5rem 0.8rem; /* Innenabstand für besseren Klickbereich */
    border-radius: 8px; /* Abgerundete Ecken */
    background-color: #0468ff; /* Blauer Hintergrund */
    box-shadow: 0 0 10px #0468ff; /* Blauer Leuchteffekt */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Weicher Übergang bei Hover */
    z-index: 1000; /* Stelle sicher, dass der Pfeil über anderen Elementen liegt */
}

.back-arrow:hover {
    background-color: #32cd32; /* Grüner Hintergrund beim Hover */
    box-shadow: 0 0 15px #32cd32; /* Grüner Leuchteffekt beim Hover */
}

h1 {
    color: #000000; /* Schriftfarbe */
    font-size: 2rem; /* Schriftgröße */
    font-weight: bold; /* Fettgedruckte Schrift */
    text-align: center; /* Zentriert die Überschrift */
    margin-bottom: 1.5rem; /* Abstand nach unten */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Leichter Schatten für Text */
}

@keyframes fadeIn {
    from {
        opacity: 0; /* Startet vollständig transparent */
        transform: translateY(-20px); /* Startet leicht nach oben verschoben */
    }
    to {
        opacity: 1; /* Endet vollständig sichtbar */
        transform: translateY(0); /* Endet an der Originalposition */
    }
}


.animate-fade-in {
    opacity: 0; /* Anfangszustand: Unsichtbar */
    animation: fadeIn 1s ease forwards; /* Animation über 1 Sekunde */
}

/* Hamburger-Menü Icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    right: 20px;
    z-index: 1100;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(51, 51, 51, 0.95);
    padding-top: 60px;
    transition: all 0.4s ease-in-out;
    z-index: 1050;
}

/* Aktiver Zustand für Mobile Navigation */
.mobile-nav.active {
    left: 0;
}

/* Hamburger Animation */
.hamburger.active span:first-child {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    nav ul {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .mobile-nav ul li {
        margin: 1rem 0;
    }

    .mobile-nav ul li a {
        color: white;
        font-size: 1.5rem;
    }
}







