/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
    padding: 20px;
}

/* Container for the game */
#game-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Player Section */
.player-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.player {
    width: 45%;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.player1 {
    background-color: #e0f7fa; /* Light cyan */
}

.player2 {
    background-color: #ffe0b2; /* Light orange */
}

.player h2 {
    margin-bottom: 10px;
}

/* Card Container */
.card-container {
    width: 7em; /* Fixed width */
    height: 9.1em; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    margin: 5px auto; /* Center the card container */
    position: relative;
}

/* Card Styling */
.card {
    width: 100%; /* Fill the container width */
    height: 100%; /* Fill the container height */
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em; /* Adjust font size */
    position: relative;
    margin: 0; /* Remove margin inside container */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow */
    transition: transform 0.3s ease; /* Add transition for hover effects */
}

.card:hover {
    transform: scale(1.05); /* Slightly enlarge the card on hover */
}

/* Player 1 Cards */
.player1-card {
    border-color: #007bff; /* Blue border for Player 1 */
    background-color: #e0f7fa; /* Light cyan background for Player 1 */
}

/* Player 2 Cards */
.player2-card {
    border-color: #ff5722; /* Orange border for Player 2 */
    background-color: #ffe0b2; /* Light orange background for Player 2 */
}

/* War Cards */
.war-card {
    border-color: #999; /* Gray border for War Cards */
    background-color: #f1f1f1; /* Light gray background for War Cards */
}

/* War Card Colors by Winner */
.player1-war-card {
    border-color: #007bff; /* Blue border for Player 1's war cards */
}

.player2-war-card {
    border-color: #ff5722; /* Orange border for Player 2's war cards */
}

/* Card Symbols */
.card-symbol {
    font-size: 2em; /* Adjusted font size */
}

.card-symbol.spades::before {
    content: "♠";
}

.card-symbol.hearts::before {
    content: "♥";
}

.card-symbol.diamonds::before {
    content: "♦";
}

.card-symbol.clubs::before {
    content: "♣";
}

/* Face Down Card */
.face-down {
    background: #999;
}

/* Deck and War Cards */
.deck, .war-cards {
    margin: 10px 0;
}

.deck div, .war-cards div {
    margin: 5px;
    display: inline-block;
}

/* War Button */
#war-button {
    display: none; /* Initially hidden */
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    background-color: #dc3545; /* Red button for war */
    border: 2px solid #c82333; /* Darker red border */
    color: #fff;
    transition: background-color 0.3s, transform 0.3s; /* Add transition for hover effects */
}

#war-button:hover {
    background-color: #c82333; /* Darker red on hover */
    transform: scale(1.05); /* Slightly enlarge the button on hover */
}

/* Buttons */
button {
    padding: 12px 24px;
    margin: 10px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    background-color: #28a745; /* Button color for visibility */
    border: 2px solid #218838; /* Highlight border */
    color: #fff;
    transition: background-color 0.3s, transform 0.3s; /* Add transition for hover effects */
}

button:hover {
    background-color: #218838; /* Darker green on hover */
    transform: scale(1.05); /* Slightly enlarge the button on hover */
}

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

/* Dropdown Menu */
select {
    padding: 12px;
    margin: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Round Result */
#round-result {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
}

/* Center Cards Display */
#center-cards {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .player-section {
        flex-direction: column;
        align-items: center;
    }

    .player {
        width: 80%;
    }

    .card-container {
        width: 6em; /* Further reduced width */
        height: 8em; /* Further adjusted height */
    }

    .card {
        font-size: 1.2em; /* Further adjusted font size */
    }

    button {
        padding: 10px 20px;
        font-size: 14px;
    }

    select {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .card-container {
        width: 5em; /* Further reduced width */
        height: 6.5em; /* Further adjusted height */
    }

    .card {
        font-size: 1em; /* Further adjusted font size */
    }

    button {
        padding: 8px 16px;
        font-size: 12px;
    }

    select {
        padding: 8px;
        font-size: 12px;
    }
}
