@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');

/* Allgemeine Stile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-drag: none;
    font-family: "Michroma", sans-serif;
    font-weight: 400;
    font-style: normal;
}

body {
    background-image: url(bg.png) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

/* Logo */
#logo {
    width: 50vmin;
    height: 50vmin;
    position: fixed;
    z-index: 10;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: logo-appear 1s ease-in-out;
}

#logo.logo-off {
    top: 25%;
    width: 25vmin;
    height: 25vmin;
}

#logo:not(.logo-off) {
    animation: logo-shake 1.5s ease-in-out infinite;
}

/* Animationen */
@keyframes logo-appear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logo-shake {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    25% {
        transform: translate(-50%, -50%) rotate(5deg);
    }
    50% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
    75% {
        transform: translate(-50%, -50%) rotate(5deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Frage-Container */
#frage-container {
    margin-top: 20px;
    animation: fade-in 0.5s ease-in-out;

    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 900px;
    z-index: 5;
}

#frage-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);

    display: inline-block;
    padding: 12px 30px;
    background-color: black;
    border: 2px solid white;
    border-left: none;
    border-right: none;
    position: relative;
    clip-path: polygon(
            20px 0%,
            calc(100% - 20px) 0%,
            100% 50%,
            calc(100% - 20px) 100%,
            20px 100%,
            0% 50%
    );
    transition: background-color 0.3s ease, transform 0.3s ease;

    opacity: 0;

    animation: frage-appear 0.75s ease-out;
    animation-fill-mode: forwards;
    animation-delay: 0.15s;
    width: 100%;
}

@keyframes frage-appear {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#frage-container img {
    max-width: 80%;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.antworten-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.antworten-container > .antwort-button:nth-child(odd) {
    animation: left_button_in 0.5s ease-in-out;
    animation-fill-mode: forwards;
}

.antworten-container > .antwort-button:nth-child(even) {
    animation: right_button_in 0.5s ease-in-out;
    animation-fill-mode: forwards;
}

.antworten-container > .antwort-button:nth-child(1) {
    animation-delay: 1.5s;
}

.antworten-container > .antwort-button:nth-child(2) {
    animation-delay: 2.5s;
}

.antworten-container > .antwort-button:nth-child(3) {
    animation-delay: 3.5s;
}

.antworten-container > .antwort-button:nth-child(4) {
    animation-delay: 4.5s;
}

/* Antwort-Buttons */
.antwort-button {
    display: inline-block;
    padding: 12px 30px;
    margin: 10px;
    color: white;
    font-size: 18px;
    background-color: black;
    border: 2px solid white;
    border-left: none;
    border-right: none;
    position: relative;
    clip-path: polygon(
            20px 0%,
            calc(100% - 20px) 0%,
            100% 50%,
            calc(100% - 20px) 100%,
            20px 100%,
            0% 50%
    );
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

@keyframes left_button_in {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes right_button_in {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.antwort-button:hover {
    background-color: #555;
    transform: scale(1.05);
}

.antwort-button.selected {
    background-color: #ffc107;
}

.antwort-button.korrekt {
    background-color: #28a745;
}

.antwort-button.falsch {
    background-color: #dc3545;
}

/* Responsive-Design */
@media (max-width: 768px) {
    #logo {
        width: 40vmin;
        height: 40vmin;
    }

    #logo.logo-off {
        width: 15vmin;
        height: 15vmin;
    }

    #frage-container h2 {
        font-size: 1.5rem;
    }

    .antwort-button {
        font-size: 1rem;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    #logo {
        width: 30vmin;
        height: 30vmin;
    }

    #logo.logo-off {
        width: 12vmin;
        height: 12vmin;
    }

    #frage-container h2 {
        font-size: 1.2rem;
    }

    .antwort-button {
        font-size: 0.9rem;
        padding: 6px;
    }
}


#verloren-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 80%;
    max-width: 900px;
    text-align: center;
    animation: fade-in 0.5s ease-in-out;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 20;
    color: white;
    font-size: 1.5rem;
    clip-path: polygon(
            20px 0%,
            calc(100% - 20px) 0%,
            100% 50%,
            calc(100% - 20px) 100%,
            20px 100%,
            0% 50%
    );
    display: none;
}

#gewinn-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 80%;
    max-width: 900px;
    text-align: center;
    background-color: rgba(253, 202, 68, 0.8);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 20;
    color: white;
    font-size: 1.5rem;
    clip-path: polygon(
            20px 0%,
            calc(100% - 20px) 0%,
            100% 50%,
            calc(100% - 20px) 100%,
            20px 100%,
            0% 50%
    );
    display: none;
    animation: gewinn-appear 0.75s ease-out;
}

@keyframes gewinn-appear {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(calc(-50% + 50px));
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(-50%);
    }
}

.infos-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.joker-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.joker-button {
    padding: 12px 25px;
    background-color: #000000;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid white;
    opacity: 0;
    animation: joker-appear 0.75s ease-out;
    animation-fill-mode: forwards;
    animation-delay: 5.75s;
}

.joker-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.joker-button:active {
    transform: scale(1.05);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

@keyframes joker-appear {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.geld-container {
    text-align: right;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: white;
    border-radius: 5px;
    clip-path: polygon(
            20px 0%,
            calc(100% - 20px) 0%,
            100% 50%,
            calc(100% - 20px) 100%,
            20px 100%,
            0% 50%
    );
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border: 2px solid white;
    border-left: none;
    border-right: none;
    animation: geld-appear 1s ease-in-out;
    animation-fill-mode: forwards;
    animation-delay: 0.75s;
    opacity: 0;
}

@keyframes geld-appear {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.antwort-button.ausgeblendet {
    opacity: 0.5 !important;
    scale: 0.9 !important;
    pointer-events: none;
}

.joker-button.deaktiviert {
    background-color: gray;
    cursor: not-allowed;
}

.cheat-button {
    padding: 12px 25px;
    background-color: #000000;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid white;
    margin-top: 10px;
}

.cheat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.buchstabe {
    color: orange;
}

#gewinn-uebersicht {
    display: none;
    position: fixed;
    flex-direction: column-reverse;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background: rgba(0,0,0,0.9);
    padding: 20px;
    border-radius: 12px;
    color: white;
    font-family: sans-serif;
    z-index: 9999;
    animation: gewinn-appear 0.75s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    animation-fill-mode: forwards;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    width: clamp(300px, 80vw, 600px);
}

#gewinn-uebersicht::-webkit-scrollbar {
    width: 10px;
}

#gewinn-uebersicht::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

#gewinn-uebersicht::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

@keyframes gewinn-appear {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(calc(-50% + 50px));
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(-50%);
    }
}

.uebersicht-aktiv {
    display: flex !important;
}

.gewinn-eintrag {
    padding: 5px 10px;
    border-bottom: 1px solid #444;
}

.gewinn-eintrag.aktuell {
    background-color: gold;
    color: black;
    font-weight: bold;
    border-radius: 8px;
    animation: gewinn-eintrag 1.5s ease-in-out forwards infinite;
}

@keyframes gewinn-eintrag {
    0% {
        background-color: gold;
        color: black;
    }
    50% {
        background-color: black;
        color: white;
    }
    100% {
        background-color: gold;
        color: black;
    }
}

#gewinn-uebersicht .cheat-button {
    width: clamp(100px, 80%, 200px) !important;
    margin: auto !important;
    margin-top: 20px !important;
}

#chat {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 300px;
    max-height: 400px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
    z-index: 1000;
    cursor: all-scroll;
}

#chat::-webkit-scrollbar {
    width: 10px;
}

#chat::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

#chat::before {
    content: "Chat";
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: block;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

#chat > div {
    display: block;
    margin-bottom: 5px;
}

#chat > div > img {
    height: 18px;
    scale: 1.5;
    margin: 0 5px;
    transform: translateY(2px);
}

#chat > div > span {
    line-break: anywhere;
    word-break: break-word;
    display: inline-block;
    max-width: 100%;
}

#lobbyinfo {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 300px;
    max-height: 400px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
    z-index: 1001;
}