/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

html {
    background-color: #f0f0f0; /* Light gray background for the whole page */
    font-family: 'Roboto', sans-serif; /* Updated font */
    margin: 0;
    padding: 0;
}

body {
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    height: 100vh; /* Full viewport height */
}

.game-container {
    text-align: center;
    background: #ffffff; /* White background for the game container */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    width: 500px; /* Adjusted width to accommodate piles */
    margin: auto; /* Centering the container */
}

h1 {
    margin-bottom: 20px;
    color: #333; /* Title color */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* Title shadow */
}

.status-bar {
    display: flex;
    justify-content: space-between;
    background-color: #e0f7fa; /* Status bar background */
    color: #333; /* Status text color */
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.status-bar span {
    flex: 1; /* Allow equal spacing */
    text-align: center; /* Center text */
}

.game-area {
    display: flex; /* Use flex to arrange cards and piles */
    justify-content: flex-start; /* Align items to the left */
    align-items: flex-start; /* Align items at the top */
}

.cards-container {
    display: grid; /* Use grid layout for square arrangement */
    grid-template-columns: repeat(2, 1fr); /* Two columns */
    grid-gap: 10px; /* Space between cards */
    margin-bottom: 20px;
    justify-items: center; /* Center cards within grid cells */
    width: 70%; /* Make it responsive */
}

.pile-container {
    display: flex; /* Align draw and discard piles side by side */
    flex-direction: row; /* Horizontal layout */
    align-items: flex-start; /* Align items at the top */
    margin-left: 20px; /* Space between cards and piles */
}

.draw-pile, .discard-pile {
    background: #e0f7fa; /* Background for the piles */
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    display: flex;
    flex-direction: column; /* Stack cards vertically */
    align-items: center; /* Center contents */
    width: 100px; /* Set the same width for both piles */
    margin-right: 10px; /* Space between the draw and discard piles */
}

.draw-pile .card, .discard-pile .card {
    width: 100%; /* Match card width for consistency */
    height: 140px; /* Match card height for consistency */
}

.card {
    width: 100px; /* Card width */
    height: 140px; /* Card height */
    background: linear-gradient(135deg, #4caf50, #81c784); /* Card gradient */
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white; /* Card text color */
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.1));
    opacity: 0.3;
}

.card:hover {
    transform: scale(1.05);
}

button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    background-color: #007bff; /* Button color */
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #0056b3; /* Button hover color */
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

.action-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .game-container {
        width: 90%; /* Make the game container responsive */
    }
    .card {
        width: 80px; /* Mobile card width */
        height: 120px; /* Mobile card height */
        font-size: 20px;
    }
    button {
        padding: 8px 12px; /* Smaller button size for mobile */
        font-size: 14px;
    }
}
