/* Global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Farbpalette und Design-Variablen */
    --color-primary: #121212; /* Dark Background */
    --color-secondary: #1f1f1f; /* Card Background */
    --color-tertiary: #2a2a2a; /* Inner Box Background */
    --color-accent: #00e0ff; /* Neon Blue Accent */
    --color-text-light: #f0f0f0;
    --color-text-dim: #a0a0a0;
    --color-status-online: #39ff14; /* Neon Green */
    --color-status-offline: #ff3300; /* Neon Red */
    --color-status-pending: #ffc400; /* Neon Yellow/Orange */
    --border-radius: 6px;
    --shadow: 0 0 10px rgba(0, 224, 255, 0.2); /* Neon Shadow */
}

body {
    font-family: 'Roboto', sans-serif;
    background-image: url('/assets/bg_wp.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- Wrapper and Card Styling --- */

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 600px; /* Erhöht für besseres Nebeneinander-Layout */
}

.card {
    background-color: var(--color-secondary);
    border: 1px solid var(--color-accent);
    border-radius: var(--border-radius);
    width: 100%;
    box-shadow: var(--shadow);
    padding: 25px; /* Etwas mehr Padding */
    text-align: center;
    transition: all 0.3s ease-in-out;
}

.card:hover {
    box-shadow: 0 0 15px rgba(0, 224, 255, 0.6);
    transform: translateY(-3px);
}

/* --- Profile Card (vcard replacement) --- */

.profile-header {
    margin-bottom: 20px;
}

.profile-picture img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.4);
    object-fit: cover;
    margin-bottom: 15px;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px; /* Etwas größer */
    font-weight: 700;
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(0, 224, 255, 0.7);
    margin-bottom: 5px;
}

.tagline {
    font-size: 15px;
    color: var(--color-text-dim);
    font-weight: 300;
}

/* --- Status Section (TeamSpeak) --- */

.status-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.server-status-item {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding: 10px 15px; /* Mehr Padding */
    background-color: var(--color-tertiary);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 300px; /* Etwas breiter */
    border: 1px solid #444; /* Dezente Trennlinie */
}

.status-label {
    color: var(--color-text-dim);
    margin-right: 8px;
    font-weight: 400;
}

.status-value {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

/* Status Colors for JS */
.status-value.online, .server-state.online {
    color: var(--color-status-online);
}
.status-value.offline, .server-state.offline {
    color: var(--color-status-offline);
}
.status-value.pending, .status-value.error {
    color: var(--color-status-pending);
}

.join-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-primary);
    padding: 12px 25px; /* Größerer Button */
    border-radius: var(--border-radius);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
}

.join-button:hover {
    background-color: #5efff6;
    transform: scale(1.05); /* Stärkerer Hover-Effekt */
    box-shadow: 0 0 20px var(--color-accent);
}

/* --- Separator --- */

.separator {
    width: 90%; /* Breiter */
    height: 2px; /* Dicker */
    background: linear-gradient(to right, transparent, var(--color-accent), transparent);
    margin: 15px 0;
    box-shadow: 0 0 8px var(--color-accent);
}

/* --- Game Status Card --- */

.game-status-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    color: var(--color-accent);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-tertiary); /* Festere Trennlinie */
}

/* NEU: Flex-Container für die Server-Boxen */
.server-box-container {
    display: flex;
    flex-wrap: wrap; /* Wichtig für Responsivität */
    justify-content: center;
    gap: 15px; /* Abstand zwischen den Boxen */
    width: 100%;
}

.server-box {
    background-color: var(--color-tertiary);
    border: 1px solid #444;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s, transform 0.3s;
    /* Damit sie nebeneinander passen, nehmen sie die Hälfte der verfügbaren Breite */
    flex: 1 1 calc(50% - 10px); /* Nimmt 50% Breite minus die Hälfte des Gaps */
    min-width: 150px; /* Mindestbreite, bevor sie in eine neue Zeile springen */
}

.server-box:hover {
    border-color: var(--color-status-online); /* Grüner Schimmer bei Hover */
    transform: translateY(-2px);
}

.server-box h3 {
    font-size: 16px; /* Etwas kleiner */
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--color-text-light);
    text-transform: uppercase;
}

.server-state {
    display: block;
    font-size: 18px; /* Hervorgehoben */
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
}

.details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 12px; /* Detailinfos kleiner */
    color: var(--color-text-dim);
    margin-top: 10px;
    border-top: 1px dashed #333;
    padding-top: 5px;
}

/* --- Media Queries for Responsiveness --- */

@media (max-width: 550px) { 
    body {
        padding: 10px;
    }
    .content-wrapper {
        max-width: 100%;
        gap: 20px;
    }
    .card {
        padding: 15px;
    }
    h1 {
        font-size: 32px;
    }
    
    /* Server-Boxen auf Mobilgeräten wieder untereinander */
    .server-box-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .server-box {
        flex: 1 1 100%; /* Nimmt volle Breite */
        min-width: 0;
    }
    
    .game-status-card h2 {
        font-size: 20px;
    }
}
