/* === Basislayout === */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: Arial, sans-serif;
    background-image: url('images/Uno_Wallpaper.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* === Permanenter Overlay-Hintergrund === */
#overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

/* === Container (Lobby, etc.) === */
.container {
    width: 100%;
    max-width: 600px;
    margin-top: 80px;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
    position: relative;
}

input[type="text"] {
    width: 70%;
    padding: 0.5rem;
    margin-right: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 0.5rem 1rem;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* === Spielfeldbereich === */
#play-section {
    text-align: center;
    color: white;
    padding: 2rem;
    z-index: 1;
}

#play-section div {
    margin: 0 auto;
}

/* === Kartenmitte: Offene Karte + Stapel + Button === */
.card-row-center {
    display: flex;
    justify-content: center;
    margin: 1rem auto;
}

.card-center-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

#openCardArea,
#drawPileArea,
#actionArea {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

#openCardArea img {
    width: 100px;
    margin: 0;
}

#drawPileArea img {
    width: 95px;
    margin: 0;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease;
    cursor: pointer;
}

#drawPileArea img:hover {
    transform: translateY(-6px);
}

#nextTurnBtn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: green;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    border: 3px solid white;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin: 0;
}

#nextTurnBtn:hover {
    transform: scale(1.1);
}

/* === Gegnerkartenbereich === */
#opponentsArea {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* === Handkartenbereich === */
#handArea {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    gap: 0;
    padding: 0.5rem;
    scroll-behavior: smooth;
}

#handArea img {
    width: 60px;
    margin-left: -30px;
    flex-shrink: 0;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

#handArea img:first-child {
    margin-left: 0;
}

#handArea img:hover {
    transform: translateY(-8px);
}

#handArea::-webkit-scrollbar {
    display: none;
}

/* === Kartenbereich-Hintergrund + Labels === */
.card-section {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem auto;
    width: 800px;
    z-index: 1;
}

.label {
    color: white;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* === Mobile Ansicht === */
@media (max-width: 600px) {
    body {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2vh;
    }

    .container {
        width: 90vw;
        max-width: 360px;
        margin-top: 0;
        padding: 1.5rem;
        box-sizing: border-box;
    }

    input[type="text"] {
        width: 100%;
        margin: 0 0 1rem 0;
        box-sizing: border-box;
    }

    button {
        width: 100%;
        box-sizing: border-box;
    }

    .card-section {
        width: 90%;
    }
}

/* === Animationen === */
@keyframes uno-blink {
    0% {
        color: red;
    }

    25% {
        color: yellow;
    }

    50% {
        color: green;
    }

    75% {
        color: blue;
    }

    100% {
        color: red;
    }
}

.active-player-name,
.blinking-label {
    animation: uno-blink 1.2s infinite;
    font-weight: bold;
}

.draw2-indicator {
    margin-right: 1rem;
    background-color: red;
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 16px;
    align-self: center;
}