/* --- Globale Farben & Variablen --- */
:root {
    --primary-blue: #0FA6D3;
    --primary-green: #69B326;
    --bg-color: #eef2f5;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --card-bg: #ffffff;
    --border-color: #e1e8ed;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    padding: 20px 10px;
    line-height: 1.6;
}

/* Der Haupt-Container: Responsive */
.site-container {
    width: 100%;
    max-width: 980px;
    background: var(--card-bg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

/* --- Header & Navigation --- */
.header-banner-top img {
    display: block;
    width: 100%;
    height: auto;
}

/* Modernes Header-Menü (Passend zum Logo) */
nav.main-nav {
    display: flex;
    justify-content: center;
    background: #0FA6D3;
    border-bottom: 3px solid #0c8bb2;
    padding: 0 10px;
    flex-wrap: wrap;
}

nav.main-nav a {
    flex: 1;
    display: block;
    text-align: center;
    padding: 12px 10px;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: background 0.2s;
    white-space: nowrap;
}

nav.main-nav a:hover {
    background: #12A8D4;
}

/* --- Layout Grid (Sidebar + Content) --- */
.content-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 25px;
    padding: 25px;
    background: #f8f9fb;
}

/* --- Sidebar --- */
.sidebar-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
}

.sidebar-title {
    background: #f1f4f6;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 15px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #34495e;
    text-transform: uppercase;
}

.sidebar-content {
    padding: 15px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.sidebar-item img {
    margin-right: 12px;
    width: 18px;
    height: 16px;
}

.sidebar-item a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-item a:hover {
    color: var(--primary-blue);
}

/* --- Main Content --- */
.main-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.main-content-area {
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.main-box {
    width: 100%;
    background: transparent;
}

/* Startseiten Kategoriengitter */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: transform 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-header {
    padding: 12px 15px;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.category-header.blue { background: linear-gradient(135deg, #0FA6D3 0%, #0c8bb2 100%); }
.category-header.green { background: linear-gradient(135deg, #69B326 0%, #55941c 100%); }

.category-body {
    padding: 15px;
}

.category-body img.banner {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 15px;
}

.game-list {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.game-list-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.game-list-links a:hover { color: var(--primary-green); }

/* --- Spiel-Ansicht (`play.php` & `vote.php`) --- */
.game-play-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.game-iframe-box {
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.game-info-box {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.game-stats-table {
    display: flex;
    justify-content: space-around;
    background: #f1f4f6;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: bold;
    font-size: 0.9rem;
}

.td1 {
    color: #ffffff;
    font-size: 0.9rem;
}

.tddescr {
    padding: 15px;
    color: #444444;
    font-size: 0.95rem;
    background: #ffffff;
    line-height: 1.5;
}

/* --- Formulare --- */
.tf {
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    background-color: #FAFAFA;
    height: 28px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- Footer --- */
footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 15px;
}

footer a:hover { color: var(--primary-blue); }

/* --- Datenschutz Overlay (Consent) --- */
.consent-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.consent-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.consent-box h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.consent-box p {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.consent-box a {
    color: var(--primary-blue);
}

.bt-consent {
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

.bt-consent:hover {
    background: #55941c;
}

/* --- Mobile Optimierung (Smartphones) --- */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    nav.main-nav a {
        flex: 1 1 50%;
    }
    
    footer {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    footer a {
        margin: 0 8px;
    }
}