/* ===========================
   ALLGEMEINE EINSTELLUNGEN
   =========================== */

/* Einstellungen für die gesamte Webseite */
body{
    margin: 0;                  /* Standard-Außenabstand entfernen */
    padding-top: 70px;          /* Platz für die feste Navbar schaffen */
    font-family: sans-serif;    /* Standardschriftart */
}

/* Verhindert das Scrollen, wenn Sidebar oder Modal geöffnet sind */
body.no-scroll{
    overflow: hidden;
}


/* ===========================
   NAVBAR
   =========================== */

/* Obere Navigationsleiste */
.navbar{
    width: 100%;
    background-color: #222;
    color: white;

    padding: 12px 20px;

    display: flex;
    justify-content: center;    /* Inhalt horizontal zentrieren */
    align-items: center;        /* Inhalt vertikal zentrieren */

    position: fixed;            /* Immer oben sichtbar */
    top: 0;
    left: 0;

    z-index: 1000;              /* Liegt über normalen Elementen */
}

/* Button zum Öffnen der Sidebar */
.menu-toggle{
    background: #444;
    color: white;

    border: none;
    border-radius: 6px;

    padding: 8px 12px;
    font-size: 22px;

    cursor: pointer;

    position: absolute;
    left: 20px;
}

/* Webseitenlogo */
.logo{
    font-size: 20px;
    font-weight: bold;
}


/* ===========================
   SIDEBAR
   =========================== */

/* Seitenmenü */
.sidebar{
    position: fixed;

    top: 0;
    left: -100%;               /* Anfangs außerhalb des Bildschirms */

    width: 260px;
    height: 100%;

    background: #333;

    padding: 20px;

    display: flex;
    flex-direction: column;
    gap: 15px;

    /* Animation */
    opacity: 0;
    transform: translateX(-20px);

    transition:
        left 0.35s ease,
        opacity 0.35s ease,
        transform 0.35s ease;

    z-index: 1500;
}

/* Wird per JavaScript hinzugefügt */
.sidebar.show{
    left: 0;
    opacity: 1;
    transform: translateX(0);
}

/* Links innerhalb der Sidebar */
.sidebar a{
    color: white;
    text-decoration: none;
    font-size: 18px;
}

/* Suchfeld */
.search-input{
    width: 80%;

    padding: 10px;
    margin: 0 auto 15px auto;

    display: block;

    border: none;
    border-radius: 6px;

    outline: none;

    font-size: 16px;
}


/* ===========================
   OVERLAY
   =========================== */

/* Verdunkelt den Hintergrund */
.overlay{
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.5);

    display: none;

    z-index: 1400;
}

/* Overlay sichtbar */
.overlay.show{
    display: block;
}


/* ===========================
   SPIELE-GRID
   =========================== */

/* Container für alle Spiele */
.game-box{
    display: grid;

    /* Drei Spalten mit je 150px */
    grid-template-columns: repeat(3,150px);

    justify-content: center;

    gap: 25px;

    margin: 40px auto;
}

/* Einzelne Spielkarte */
.game-item{
    width: 150px;

    text-align: center;

    background: #1b1b1b;

    padding: 10px;

    border-radius: 10px;

    border: 1px solid rgba(255,255,255,0.05);

    box-shadow: none !important;

    transition:
        transform 0.15s ease,
        border 0.15s ease;
}

/* Animation beim Darüberfahren */
.game-item:hover{
    transform: translateY(-4px);

    border: 1px solid rgba(0,120,255,0.35);

    box-shadow: none !important;
}

/* Spielbild */
.game-image{
    width: 100%;

    aspect-ratio: 1 / 1;

    object-fit: cover;

    border-radius: 6px;

    box-shadow: none !important;
}

/* Name des Spiels */
.game-title{
    margin-top: 6px;

    font-size: 16px;
    font-weight: bold;

    color: white;
}


/* ===========================
   KONTAKT-MODAL
   =========================== */

/* Hintergrund des Popups */
.modal-overlay{
    position: fixed;

    inset: 0;

    background: rgba(0,0,0,0.7);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.25s ease;

    z-index: 2000;
}

/* Popup sichtbar */
.modal-overlay.show{
    opacity: 1;
    pointer-events: all;
}

/* Fenster des Popups */
.modal{
    width: 100%;
    max-width: 420px;

    background: #1e1e1e;

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;

    padding: 32px 28px;

    position: relative;

    transform: translateY(20px);
    transition: transform 0.25s ease;

    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Einblendanimation */
.modal-overlay.show .modal{
    transform: translateY(0);
}

/* Schließen-Button */
.modal-close{
    position: absolute;

    top: 14px;
    right: 16px;

    background: none;
    border: none;

    color: #888;

    font-size: 18px;

    cursor: pointer;

    transition: color 0.15s;
}

/* Farbe beim Darüberfahren */
.modal-close:hover{
    color: white;
}

/* Überschrift */
.modal-title{
    color: white;
    font-size: 22px;
    margin: 0 0 4px 0;
}

/* Untertitel */
.modal-subtitle{
    color: #888;
    font-size: 14px;
    margin: 0 0 20px 0;
}

/* Eingabefelder und Textfeld */
.modal-input,
.modal-textarea{
    width: 100%;

    background: #2a2a2a;

    color: white;

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;

    padding: 10px 12px;

    margin-bottom: 12px;

    outline: none;

    box-sizing: border-box;

    font-family: sans-serif;
    font-size: 15px;

    transition: border 0.15s;
}

/* Hervorhebung beim Anklicken */
.modal-input:focus,
.modal-textarea:focus{
    border-color: rgba(0,120,255,0.5);
}

/* Größe des Textfeldes */
.modal-textarea{
    height: 110px;
    resize: vertical;
}

/* Dropdown-Menü */
select.modal-input{
    appearance: none;
    cursor: pointer;
}

/* Absenden-Button */
.modal-submit{
    width: 100%;

    padding: 11px;

    background: #0078ff;
    color: white;

    border: none;
    border-radius: 8px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: background 0.15s;
}

/* Farbe beim Darüberfahren */
.modal-submit:hover{
    background: #005fcc;
}

/* Erfolgsmeldung */
.modal-success{
    display: none;

    color: #4caf50;

    text-align: center;

    font-size: 15px;

    margin-top: 12px;
}


/* ===========================
   MOBILE ANSICHT
   =========================== */

/* Wird angewendet, wenn der Bildschirm maximal 600px breit ist */
@media (max-width:600px){

    /* Sidebar wird breiter */
    .sidebar{
        width: 80%;
        left: -100%;
    }

    .sidebar.show{
        left: 0;
    }

    /* Nur noch zwei Spiele pro Zeile */
    .game-box{
        grid-template-columns: repeat(2,150px);
        gap: 15px;
    }

    .game-item{
        width: 150px;
    }

    /* Kleinere Schrift */
    .game-title{
        font-size: 14px;
    }
}