﻿body, html, #plan, #schedule, #schedule *, #main, * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

    body.light-mode {
        background: #f8fafc;
        color: #1f2937;
    }

    body.dark-mode {
        background: #1f2937;
        color: #e5e7eb;
    }

h1, h2 {
    text-align: left;
}

body.light-mode h1, body.light-mode h2 {
    color: #4b5eAA;
}

body.dark-mode h1, body.dark-mode h2 {
    color: #bfdbfe;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body.dark-mode table {
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
}

th, td {
    border: 1px solid #d1d5db;
    padding: 10px;
    text-align: center;
}

body.dark-mode th, body.dark-mode td {
    border-color: #4b5563;
}

th {
    background: #4b5eAA;
    color: #f8fafc;
}

body.dark-mode th {
    background: #1e3a8a;
    color: #e5e7eb;
}

.past-game {
    color: #9ca3af;
}

body.dark-mode .past-game {
    color: #6b7280 !important;
}

.next-game {
    background: #3b82f6 !important;
    color: #f8fafc !important;
    font-weight: bold !important;
}

body.dark-mode .next-game {
    background: #22d3ee !important;
    color: #1f2937 !important;
}

.user-game {
    background: #bfdbfe;
}

body.dark-mode .user-game {
    background: #3b82f6;
    color: #e5e7eb;
}

.player-yes {
    background: #bfdbfe;
    color: #1f2937;
    font-weight: bold;
}

body.dark-mode .player-yes {
    background: #3b82f6;
    color: #e5e7eb;
}

.player-no {
    color: #9ca3af;
}

body.dark-mode .player-no {
    color: #6b7280;
}

button {    
    background: #4b5eAA;
    color: #f8fafc;
    border: none;
    cursor: pointer;    
    border-radius: 5px;
}

body.dark-mode button {
    background: #06b6d4;
    color: #1f2937;
}

button:hover {
    background: #3b82f6;
}

body.dark-mode button:hover {
    background: #22d3ee;
}

label {
    display: block;
    margin: 10px 0;
}

#show-own-games {
    margin-right: 10px;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    background: #ffffff;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
}

body.dark-mode li {
    background: #374151;
    border-color: #4b5563;
}

li strong {
    color: #4b5eAA;
}

body.dark-mode li strong {
    color: #1e3a8a;
}

#players-list {
    text-align: center;
    margin: 20px 0;
    font-style: italic;
}

#logout-button {
    position: absolute;
    top: 20px;
    right: 20px;
}

#theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
}

.spinner::after {
    content: "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏";
    display: inline-block;
    width: 1em;
    animation: spin 1s steps(10, end) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

body.dark-mode {
    background: #232323;
    color: #f0f0f0;
}
/* Optional: Buttons hübscher machen, Hover-Effekte, etc. */
#theme-toggle, #logout-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    margin-right: 8px;
    color: inherit;
}

    #theme-toggle:focus, #logout-button:focus {
        outline: 2px solid #4CAF50;
    }

#theme-toggle, #enable-push-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    margin-right: 8px;
    color: inherit;
}

    #theme-toggle:focus, #enable-push-btn:focus {
        outline: 2px solid #4CAF50;
    }


.row-content {
    max-height: 40px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(.4,2,.15,1), opacity 0.4s cubic-bezier(.4,2,.15,1), padding 0.4s cubic-bezier(.4,2,.15,1);
    padding: 8px 0;
}

tr.hide .row-content {
    max-height: 0px;
    opacity: 0;
    padding: 0;
}

tr.show .row-content {
    max-height: 40px;
    opacity: 1;
    padding: 8px 0;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 8px;
    align-items: center;
}

    .button-row > *:not(.right-actions) {
        /* Platz für linke Buttons */
    }

.right-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 500px) {
    .hide-on-mobile {
        display: none !important;
    }

    .button-row button {
        min-width: 44px;
        padding: 0.5em 0.7em;
    }
}


.hide-on-mobile {
    display: inline;
}

@media (max-width: 520px) {
    .hide-on-mobile {
        display: none !important;
    }

    .button-row button {
        padding: 0.5em;
        font-size: 1.2em;
    }
}

#animate-ball {
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    cursor: pointer;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    /* pointer-events: auto; NICHT none! */
}