/* Scopa Game Styles */

/* Game Board Area */
#scopa-game-board {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Card General Styles */
.card-scopa {
    width: 80px;
    height: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    background-color: white;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #ccc;
}

.card-scopa:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.6);
    z-index: 10;
}

.card-scopa.selected {
    border: 3px solid #ff8c00;
    transform: translateY(-15px);
    box-shadow: 0 0 15px #ff8c00;
}

/* Opponent Area (Top) */
#opponent-area {
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.card-back {
    background: repeating-linear-gradient(
        45deg,
        #606dbc,
        #606dbc 10px,
        #465298 10px,
        #465298 20px
    );
    border: 2px solid white;
}

/* Table Area (Center) */
#table-area {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 10px 0;
}

/* Player Area (Bottom) */
#player-area {
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Deck and Taken Cards */
.deck-stack {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.taken-stack {
    position: absolute;
    right: 20px;
    bottom: 20px;
}

.opponent-taken-stack {
    position: absolute;
    right: 20px;
    top: 20px;
}

.stack-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff8c00;
    color: black;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Message / Notification Overlay */
#game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #ff8c00;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #ff8c00;
    display: none;
    z-index: 100;
    text-align: center;
}

/* Scopa Animation */
@keyframes scopaFlash {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.scopa-anim {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: #ffd700;
    text-shadow: 0 0 20px #ff0000;
    font-weight: 900;
    animation: scopaFlash 2s ease-out forwards;
    z-index: 200;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .card-scopa {
        width: 60px;
        height: 90px;
    }
    #opponent-area, #player-area {
        height: 100px;
    }
    .deck-stack, .taken-stack, .opponent-taken-stack {
        display: none; /* Hide stacks on small screens to save space */
    }
}


