body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #1e2430;
    color: white;
    overflow: hidden;
}

#openPlayers {
    position: fixed;
    top: 15px;
    left: 15px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    z-index: 10;
}

#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal {
    width: 500px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    background: #2b3342;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
}

.modal h2 {
    margin-top: 0;
}

.modal div {
    margin-bottom: 6px;
}

input,
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: none;
    border-radius: 6px;
    box-sizing: border-box;
}

input.small-input {
  font-size: 16px; /* Tells iOS not to zoom */
  transform: scale(0.75); /* Visually scales it down to look like 12px (12/16 = 0.75) */
  transform-origin: left center; /* Keeps the text aligned properly */
}

button {
    cursor: pointer;
}

.primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
}

.player-row {
    background: #394355;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-row button {
    margin-left: 6px;
}

#errorMessage {
    min-height: 24px;
    color: #ff8080;
    margin-top: 10px;
}

#statusAbove {
    position: fixed;
    bottom: 30px;
    width: 100%;
    text-align: center;
    color: rgb(193, 193, 193);
    z-index: 5;
}

#topAbove {
    position: fixed;
    top: 60px;
    width: 100%;
    text-align: center;
    color: rgb(193, 193, 193);
    z-index: 5;
}

#deckArea {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#card {
    width: 80%;
    height: 60%;
    cursor: pointer;
    perspective: 1000px;
}

.inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .6s;
}

.inner.flipped {
    transform: rotateY(180deg);
}

@keyframes discard {
    0% {
        transform: rotateY(180deg) translateX(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform:
            rotateY(180deg)
            translateX(600px)
            rotate(25deg);
        opacity: 0;
    }
}

.inner.discarding {
    animation: discard 0.5s ease forwards;
}

.face {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    backface-visibility: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.back {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    font-size: 40px;
    flex-direction: column;
}

.front {
    background: white;
    color: black;
    transform: rotateY(180deg);
    font-size: 28px;
}

#status {
    position: fixed;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: #ddd;
}

.hidden {
    display: none !important;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkbox-group input {
    width: auto;
    margin: 0;
}