/* global box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #FFFFFF; /* Weißer Hintergrund */
    color: #333; /* Dunklerer Text für weißen Hintergrund */
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    max-width: 100%;
}

/* Neuer Container für den Logout Button */
#logout-button-container {
    width: 100%;
    max-width: 700px;
    display: flex;
    justify-content: flex-end; /* Button rechts ausrichten */
    margin-top: 10px; /* Kleiner Abstand zum Logo */
    margin-bottom: 20px; /* Abstand zu den nächsten Elementen */
}

#logout-btn {
    padding: 8px 15px; /* Etwas kleinerer Padding als andere Buttons */
    background-color: #FFD700; /* Goldgelb */
    color: #333; /* Dunkler Text */
    border: none;
    border-radius: 6px;
    font-size: 0.9rem; /* Etwas kleinerer Font */
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#logout-btn:hover {
    background-color: #FFA500; /* Orange-Gelb für Hover */
}


form {
    background-color: #FFFFFF; /* Weiße Hintergründe für Formulare und Output */
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1); /* Hellerer Schatten */
    max-width: 700px;
    width: 100%; /* damit es responsive bleibt */
    padding: 2rem;
    margin: 0 auto 1.5rem auto; /* zentriert und margin unten */
    color: #333; /* Dunkler Text in Formularen */
}

.output-container {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
    padding: 0.2rem 2rem 1rem 2rem; /* Reduzierter Abstand oben */
    margin: 0 auto 1.5rem auto;
    color: #333;
    white-space: pre-wrap;
}

h1, h2, h3, h4 {
    color: #333; /* Dunkle Überschriften */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px;
    width: 100%;
    margin: 0 auto 2rem auto;
    padding: 0 2rem;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
}

input[type="email"], input[type="password"], input[type="text"], input[type="number"], textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    margin-top: 0.4rem;
    margin-bottom: 1rem;
    border: 1px solid #bbb; /* Standardgrauer Rand */
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: #f8f8f8; /* Sehr heller grauer Input-Hintergrund */
    color: #333; /* Dunkler Input-Text */
}

input[type="email"]:focus, input[type="password"]:focus, input[type="text"]:focus, input[type="number"]:focus, textarea:focus {
    border-color: #FFD700; /* Goldgelb bei Fokus */
    outline: none;
}

button[type="submit"] {
    width: 100%;
    padding: 0.65rem;
    background-color: #FFD700; /* Goldgelb */
    color: #333; /* Dunkler Text für gelben Button */
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #FFA500; /* Orange-Gelb für Hover */
}

/* --- Neue Stile für dynamische Inhalte --- */

.filter-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-group label {
    margin-right: 10px;
    white-space: nowrap;
}

.filter-group input[type="checkbox"] {
    margin-right: 5px;
    width: auto; /* Checkboxen nehmen nicht die volle Breite ein */
    margin-top: 0;
    margin-bottom: 0;
}

.filter-group input[type="number"] {
    flex-grow: 1; /* Eingabefeld füllt den restlichen Platz aus */
    margin-top: 0;
    margin-bottom: 0;
}

/* *** NEUE & ANGEPASSTE STILE FÜR DAS EMPFEHLUNGS-LAYOUT *** */

.result-item {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0; /* Stark reduzierter Abstand zwischen den Spielen */
}
.result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.game-title-link {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 0.1rem; /* Minimaler Abstand vom Titel zum Rest */
}
.game-title-link:hover {
    text-decoration: underline;
    color: #FFD700;
}

/* Flex-Container für Bild und Details */
.result-item-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Blauen Rand bei verlinkten Bildern entfernen */
.result-item-content a {
    border: none;
    text-decoration: none;
}

/* Bild-Styling */
.game-image {
    max-width: 150px;
    height: auto;
    display: block;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
    flex-shrink: 0;
}

/* Container für die Text-Details */
.result-item-details {
    flex: 1;
}

.result-item-details p {
    margin: 0 0 0.15rem 0; /* Minimaler Abstand zwischen den Textzeilen */
    white-space: normal;
}

.result-item-details .action-button {
    margin-top: 0.5rem; /* Stark reduzierter Abstand über dem Kauf-Button */
}
/* *** ENDE DER NEUEN STILE *** */


.action-button {
    display: inline-block;
    padding: 6px 12px;
    margin-top: 8px;
    margin-right: 8px;
    background-color: #FFD700; /* Goldgelb */
    color: #333; /* Dunkler Text */
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}
.action-button:hover {
    background-color: #FFA500; /* Orange-Gelb für Hover */
}

.chat-button {
    background-color: #e67e22; /* Orange */
}
.chat-button:hover {
    background-color: #d35400; /* Dunkleres Orange */
}

.guest-button {
    background-color: #ccc; /* Hellgrau für Gast-Login-Button */
    color: #333;
}
.guest-button:hover {
    background-color: #bbb;
}


/* --- Stile für das Chat Modal --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Standard dunklerer Hintergrund */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #FFFFFF; /* Weißer Hintergrund für Modal */
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    height: 80%;
    max-height: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    color: #333; /* Dunkler Text im Modal */
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #888; /* Standardgrau für Schließen-Button */
}

#chat-messages {
    flex-grow: 1;
    border: 1px solid #ddd; /* Hellerer Rand */
    border-radius: 5px;
    padding: 1rem;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8; /* Sehr heller Hintergrund für Chat-Bereich */
}

#chat-form {
    display: flex;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
}

#chat-form input {
    flex-grow: 1;
    margin: 0 10px 0 0;
}

#chat-form button {
    width: auto;
    background-color: #FFD700; /* Goldgelb */
    color: #333; /* Dunkler Text */
}

#chat-form button:hover {
    background-color: #FFA500; /* Orange-Gelb für Hover */
}

.chat-message {
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    max-width: 80%;
    word-wrap: break-word;
}

.sent {
    background-color: #FFD700; /* Goldgelb für gesendete Nachrichten */
    color: #333; /* Dunkler Text */
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.received {
    background-color: #ecf0f1; /* Heller Grau-Ton für empfangene Nachrichten */
    color: #333; /* Dunkler Text */
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}

/* --- Stile für das Postfach --- */
#inbox-notifications {
    background-color: #fffacd; /* Hellgelb (Lemon Chiffon) */
    border: 1px solid #FFD700; /* Goldgelber Rand */
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: #333; /* Dunkler Text */
}

#inbox-notifications h4 {
    margin-top: 0;
    color: #333; /* Dunkler Text */
}

#inbox-notifications ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

#inbox-notifications li {
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#inbox-notifications li:hover {
    background-color: #fff5be; /* Etwas dunkleres Hellgelb für Hover */
}

/* ======================= ANFANG: AKTUALISIERTER CODE ======================= */
/* --- Stile für Sortier-Buttons (Version 2.0 - Minimalistisch) --- */
#sort-controls {
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-wrap: wrap; 
    justify-content: flex-start;
    align-items: center;
    gap: 4px 16px;
    margin: -1rem auto 0.5rem auto; /* Reduzierter Abstand nach unten */
    padding: 0 2rem;
}

#sort-controls span {
    font-weight: 600;
    margin-right: 8px;
    font-size: 0.9rem;
    color: #333;
}

#sort-controls button {
    /* Button-Optik komplett zurücksetzen */
    background: none;
    border: none;
    border-radius: 0;

    /* Eine Linie unten für den Hover/Aktiv-Effekt vorbereiten */
    border-bottom: 2px solid transparent;
    
    padding: 6px 2px; /* Etwas Luft nach oben/unten */
    margin: 0;
    
    /* Text-Stil */
    color: #555; /* Weicheres Grau für inaktive Elemente */
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;

    /* Sanfter Übergang */
    transition: all 0.2s ease-in-out;
}

#sort-controls button:hover {
    color: #000;
    border-bottom-color: #ccc; /* Graue Linie beim Hover */
}

#sort-controls button.active {
    color: #333;
    font-weight: 700; /* Fett für aktive Auswahl */
    border-bottom-color: #FFD700; /* Goldene Linie, passend zum Theme */
}
/* ======================= ENDE: AKTUALISIERTER CODE ========================= */

/* --- Stile für den Footer --- */
footer {
    margin-top: 40px; /* Abstand zum Rest der Seite */
    padding: 20px;
    text-align: center;
    width: 100%;
    color: #555; /* Dezente Textfarbe */
}

footer p {
    margin: 0 0 10px 0; /* Abstand zwischen Text und Logo */
    font-size: 0.9rem;
}

/* KORRIGIERTER BLOCK FÜR DAS LOGO */
#frosted-logo {
    width: 150px; /* Feste Breite von 150px erzwingen */
    height: auto; /* Höhe passt sich proportional an */
    transition: transform 0.2s ease-in-out;
}

#frosted-logo:hover {
    transform: scale(1.05); /* Leichter Zoom-Effekt beim Darüberfahren */
}
