@keyframes moveBackground {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

html, body {
    overflow-x: hidden;
}


body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #9e9e9e;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    /* Animierter Hintergrund */
    background: linear-gradient(270deg, #9e9e9e, #b7b7b7, #9e9e9e, #b7b7b7);
    background-size: 400% 400%;
    animation: moveBackground 30s ease infinite;
	/* Cursor */
	cursor: url('/bilder/mouse-cursor.png'), auto;
}


h2 {
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
    color: #000;
    font-size: 32px;
    font-weight: 400 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#tournaments {
    display: flex;
    flex-wrap: nowrap; /* Verhindert den Umbruch auf größeren Bildschirmen */
    overflow-x: auto; /* Ermöglicht horizontales Scrollen */
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background-color: #c4c4c4;
    border-radius: 12px;
	border: 0.5px solid rgba(0, 0, 0, 0.8);
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4); */
    width: 100%;
}

.tournament-table, #overall-winner {
    background-color: #c4c4c4;
    padding: 20px;
    border-radius: 12px;
    border: 0.5px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 260px; /* Stellt eine minimale Breite für jedes Element sicher */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 1024px) {
    #tournaments {
        flex-wrap: wrap; /* Erlaubt den Umbruch für Bildschirme bis 1024px */
        justify-content: flex-start; /* Ausrichtung am Startpunkt für gleichmäßige Spalten */
    }

    .tournament-table, #overall-winner {
        flex: 1 0 calc(33.333% - 40px); /* Drei Elemente pro Reihe, Abzug für 'gap' */
        max-width: calc(33.333% - 40px); /* Begrenzt die Maximalbreite entsprechend */
    }
}

@media (max-width: 768px) {
    .tournament-table, #overall-winner {
        flex: 1 0 calc(50% - 40px); /* Zwei Elemente pro Reihe auf sehr kleinen Bildschirmen */
        max-width: calc(50% - 40px);
    }
}


.tournament-table:hover, #overall-winner:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.tournament-table h3, #overall-winner h3 {
    color: #000;
    margin-bottom: 20px;
	font-weight: 400;
    font-size: 24px;
    text-align: center;
}

.user-entry {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #7b7d7b;
	color: #5A5A5A;
	font-weight: 400;
}

.user-entry:last-child {
    border-bottom: none;
}

.user-info {
    font-weight: 500;
    color: #000;
    font-size: 18px;
}

input[type="number"], input[type="text"] {
    width: calc(100% - 22px);
    padding: 12px;
    margin: 8px 0;
    border: 0.5px solid rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    background-color: #d1d1d1;
    transition: border-color 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
	color: #000;
}

input[type="number"]:focus, input[type="text"]:focus {
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

button {
    padding: 22px 58px;
	font-family: 'Poppins', Arial, sans-serif;
	font-weight: 400;
    background-color: #c4c4c4;
    color: #000;
    font-size: 16px;
    border: 0.5px solid rgba(0, 0, 0, 0.8);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #ff0000;
    transform: translateY(-3px);
}

#overall-winner {
    position: relative;
    padding: 20px;
    margin-top: 40px;
    width: 100%;
    max-width: 960px;
    text-align: center;
    color: #000;
	font-weight: 400;
    background-color: #c4c4c4;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

#overall-winner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, transparent, rgba(215, 235, 255, 0.08), transparent);
    /*border: 2px solid rgba(255, 255, 255, 0.5);*/
    animation: animateBorder 3s infinite linear;
    border-radius: 6px;
}

@keyframes animateBorder {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}



.animated-background-element {
    width: 40px;
    height: 40px;
    background-color: #3498db; /* Anpassung der Farbe für ein einheitliches Design */
    animation-duration: 30s; /* Langsamere Animation für einen subtilen Effekt */
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Ermöglicht Interaktion mit darunter liegenden Elementen */
    background-image: url('/bilder/grain-slow.gif');
    background-repeat: repeat;
    opacity: 0.05; /* Anpassbar, je nach gewünschtem Effekt */
    z-index: 1000; /* Stellt sicher, dass es über anderen Inhalten liegt */
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

@media (max-width: 1024px) {
    body {
        padding: 10px; /* Reduziert den Padding auf kleineren Bildschirmen */
    }

    .tournament-table, #overall-winner {
        min-width: 180px; /* Einstellung der Mindestbreite für Turniertabellen */
        flex: 0 0 auto; /* Flex Item wird nicht skaliert */
    }

    h2, button, input[type="number"], input[type="text"] {
        font-size: smaller; /* Verkleinert die Schriftgröße */
    }
}

.back-to-top {
    position: fixed; /* Fixiert den Link an einer Position */
    bottom: 20px; /* Abstand vom unteren Rand */
    right: 20px; /* Abstand vom rechten Rand */
    background-color: #ff0000; /* Hintergrundfarbe */
    color: #fff; /* Textfarbe */
    padding: 10px 20px; /* Innenabstand */
    border-radius: 5px; /* Abgerundete Ecken */
    text-decoration: none; /* Entfernt die Unterstreichung des Links */
    font-family: 'Poppins', Arial, sans-serif; /* Schriftart */
    z-index: 100; /* Stellt sicher, dass der Link über anderen Elementen liegt */
    transition: background-color 0.3s; /* Sanfter Übergang für den Hover-Effekt */
}

.back-to-top:hover {
    background-color: #ff0000; /* Dunklere Farbe beim Darüberfahren */
}

