* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, sans-serif;
    min-height: 100vh; /* Stellt sicher, dass es mindestens den Viewport abdeckt */
    overflow-y: auto; /* Verhindert horizontales Scrollen */
    margin: 20px;
    padding: 0;
    max-height: 300px;
    background-image: url("../../hintergrund.png");
    background-size: cover;
    background-position: center;
    background-attachment:fixed
}

header {
    display: flex;
    flex-direction: column; /* Ermöglicht vertikale Ausrichtung */
    justify-content: flex-start; /* Startet den Inhalt oben im Header */
    align-items: center; /* Zentriert die Überschrift und den Button horizontal */
    padding-top: 20px; /* Fügt etwas Abstand von oben hinzu */
}

header h1 {
    background-color: rgb(51, 3, 81);
    padding: 10px;
    margin-bottom: 40px; /* Abstand nach unten zur Überschrift */
    border-radius: 8px;
    color: #fff;
    font-size: 36px; /* Vergrößert die Schrift */
    text-align: center; /* Zentriert die Überschrift */
    display: inline-block; /* Macht den Kasten nur so breit wie der Inhalt */
    width: 50%; /* Setzt die Breite auf 50% des Containers */
}

/* Slideshow-Container */
.slideshow-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    position: relative;
}

/* Verhindere, dass die Tabelle durch Pfeile verschoben wird */
.match-table {
    flex-grow: 1;
    text-align: center;
}

.table-container {
    margin-bottom: 20px;
}

table {
    width: auto;
    border-collapse: collapse;
    margin: 0 auto;
    border: 1px solid #ddd;
    background-color: rgb(212, 212, 212); /* Setzt den Hintergrund der Tabelle auf hellgrau */
    table-layout: fixed;
    background-color:#1a012b7e; /* Das macht probleme */
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    border: 1px solid #3d3838; /* Zwischenräume der Tabelle */
    padding: 6px; /* Weniger Padding für schmalere Zellen */
    text-align: center;
    overflow: hidden;
    color: white;
}

table td,
table th {
    color: white;
}

th {
    background-color: rgb(51, 3, 81);
    color: white;
}

.hoverable:hover {
    font-weight: bold;
    cursor: pointer;
}



/* ab hier Modal-Gedöns */
/* Der Modal-Hintergrund (leicht transparent und über dem Inhalt) */
.modal {
    display: none; /* Standardmäßig versteckt */
    position: fixed;
    z-index: 1000; /* Setzt es im Vordergrund */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Halbtransparentes Schwarz */
    justify-content: center;
    align-items: center;
}

/* Modal-Inhalt */
.modal-content {
    background-color: #d4d4d4; /* Setzt den Hintergrund des Modals auf hellgrau */
    padding: 20px;
    border-radius: 10px;
    width: 50%;
    max-width: 600px;
    margin: auto;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    line-height: 1.6;
}

.modal td,
.modal th {
    color: black;
}

.modal table {
    background-color: #d4d4d4;
}

/* Schließen-Knopf (X) */
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #000;
}

.player-info {
    margin-top: 1em;
    margin-bottom: 1em;
    border-collapse: collapse;
    border: none;
  }
  
  .player-info td {
    padding: 0.2em 0.5em;
    vertical-align: center;
    border: none;
    text-align: left;
  }
  
  .player-info .label {
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
  }


/* Make tables responsive on smaller screens */
@media (max-width: 768px) {

    header h1 {
        font-size: clamp(1.5em, 5vw, 2.5em);
        text-align: center;
    }

    .table-container {
        flex-direction: column; /* Stack tables vertically */
        align-items: center; /* Center them horizontally */
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .table-wrapper table {
        border-collapse: collapse;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        font-size: 0.85em; /* smaller font */
    }

    .table-wrapper th,
    .table-wrapper td {
        padding: 4px 6px; /* reduce padding */
    }

    .table-container table {
        width: 100%; /* Full width on small screens */
        max-width: 100%;
        overflow-x: auto; /* Allow horizontal scroll if table is too wide */
        display: block;
    }

    .table-title {
        font-size: 1em; /* Slightly smaller headings */
    }
}

.modal {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #2b2a2c;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
    color: white;
    max-height: 86vh;
    max-width: 760px;
    overflow: auto;
    padding: 1.2rem;
    width: min(760px, calc(100% - 32px));
}

.modal-content h2 {
    color: white;
    font-size: clamp(1.35rem, 1rem + 1vw, 1.75rem);
    line-height: 1.2;
    margin: 0 2.5rem 1rem;
}

.close {
    align-items: center;
    background-color: #330351;
    border-radius: 8px;
    color: white;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    line-height: 1;
    right: 1rem;
    top: 1rem;
    width: 36px;
}

.close:hover,
.close:focus {
    background-color: #2a2c6b;
    color: #dcd6e0;
}

.stats-profile {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    text-align: left;
}

.stats-eyebrow,
.stats-stat-label,
.stats-stat-sub {
    color: #dcd6e0;
    font-size: 0.82rem;
    font-weight: 700;
}

.stats-eyebrow,
.stats-stat-label {
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.stats-player-name {
    color: white;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.1;
    margin-top: 0.2rem;
}

.stats-player-meta {
    color: #dcd6e0;
    margin-top: 0.25rem;
}

.stats-profile-link {
    background-color: #330351;
    border-radius: 8px;
    color: white;
    flex-shrink: 0;
    font-weight: 800;
    padding: 0.7rem 0.9rem;
    text-decoration: none;
}

.stats-profile-link:hover,
.stats-profile-link:visited {
    color: white;
}

.stats-profile-link:hover {
    background-color: #2a2c6b;
}

.stats-section {
    margin-top: 1rem;
    text-align: left;
}

.stats-section h3 {
    color: white;
    font-size: 1rem;
    margin: 0 0 0.55rem;
}

.stats-grid,
.stats-duel-grid {
    display: grid;
    gap: 0.65rem;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid.compact,
.stats-duel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-stat,
.stats-duel-card {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
}

.stats-stat-value {
    color: white;
    font-size: 1.28rem;
    line-height: 1.1;
}

@media (max-width: 767.98px) {
    .modal-content {
        width: min(92vw, 600px);
    }

    .stats-profile {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-profile-link {
        text-align: center;
    }

    .stats-grid,
    .stats-grid.compact,
    .stats-duel-grid {
        grid-template-columns: 1fr;
    }
}
