body {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    background-image: url('https://mulligansak.com/wp-content/uploads/2024/10/pd_background.webp'); /* Replace with your image path */
    background-size: cover; /* Makes sure the image covers the entire background */
    background-position: center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-attachment: fixed; /* Keeps the background fixed during scroll */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden; /* Prevent scrolling */
    position: relative;
}

#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: bold;
    z-index: 100; /* Ensure it stays on top of other content */
    box-sizing: border-box; /* Ensures padding is included in the width */
}

@media (max-width: 600px) {
    #footer {
        font-size: 12px;
        padding: 8px 0;
    }
}

#game {
    background-color: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensure no overflow */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

#game-content {
    overflow-y: auto; /* Enable vertical scrolling */
    flex-grow: 1; /* Allow it to grow and take up available space */
}

#top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px; /* Reduced margin */
}

#turn-indicator-container {
    position: fixed;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px;
    border-radius: 5px;
    background-color: #f8f9fa;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 100; /* Ensure it stays on top */
}

#turn-indicator {
    font-size: 14px; /* Reduced font-size */
    font-weight: bold;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.your-turn {
    background-color: #28a745;
    color: white;
    animation: pulse 1s infinite;
}

.waiting-turn {
    background-color: #ffc107;
    color: black;
}

.scoring-phase {
    background-color: #17a2b8;
    color: white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#prompt-card, #play-area, #player-cards {
    margin-bottom: 5px; /* Reduced margin */
}

#prompt-card-box, #play-area-box, #player-cards-box {
    margin-bottom: 5px; /* Reduced margin */
}

#prompt-card-box, #play-area-box {
    border: 1px solid #ccc;
    padding: 5px; /* Reduced padding */
    border-radius: 10px;
}

#player-cards-box {
    border-top: 1px solid #ccc;
    padding-top: 5px; /* Reduced padding */
    display: flex;
    flex-direction: column;
    align-items: center;
}

#prompt-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px; /* Reduced margin */
    flex-wrap: wrap;
}

#prompt-card-section, #timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

#prompt-card-section {
    border-right: 1px solid #ccc;
    padding-right: 2px; /* Reduced padding */
}

#timer-section {
    padding-left: 2px; /* Reduced padding */
}

#prompt-card {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    font-size: 18px;
}

#timer {
    width: 50px; /* Reduced width */
    height: 50px; /* Reduced height */
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0px solid #ccc;
    border-radius: 10px;
    margin: 5px 0;
    font-size: 30px; /* Reduced font-size */
    font-weight: bold;
}

.card-section {
    margin-bottom: 5px; /* Reduced margin */
}

.card-section h3 {
    margin-bottom: 5px; /* Reduced margin */
}

#player-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 5px;
    width: 100%;
    justify-items: center;
}

.card {
    border: 1px solid #ccc;
    padding: 5px; /* Reduced padding */
    margin: 5px;
    border-radius: 5px;
    display: inline-block;
    cursor: pointer;
    text-align: center;
}

.card[data-type="genres"] {
    background-color: #98FB98;
}

.card[data-type="characters"] {
    background-color: #ADD8E6;
}

.card[data-type="stories"] {
    background-color: #FFA07A;
}

.card[data-type="prompt"] {
    background-color: #FFFFFF;
}

.card.selected[data-type="genres"] {
    background-color: #006400;
}

.card.selected[data-type="characters"] {
    background-color: #00008B;
}

.card.selected[data-type="stories"] {
    background-color: #8B0000;
}

.card.selected[data-type="prompt"] {
    background-color: #DCDCDC;
}

#buttons-container {
    display: flex;
    justify-content: center;
    gap: 5px;
}

button {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#rating-section {
    margin-top: 5px; /* Reduced margin */
}

#rating-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Space between elements */
}

.star-rating {
    display: flex;
    gap: 3px;
}

.star {
    font-size: 18px; /* Reduced font-size */
    cursor: pointer;
    color: black;
}

#submit-rating {
    padding: 5px 10px; /* Adjusted padding */
}

#player-score-box {
    margin-left: 10px; /* Space between rating button and score */
}

#score-container {
    position: absolute;
    bottom: 5px; /* Reduced margin */
    right: 5px; /* Reduced margin */
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#modal-content {
    background-color: #fff;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

#players-list-container {
    margin-top: 0; /* Reduced margin */
    text-align: left;
    font-size: 12px; /* Reduced font-size */
}

#players-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#round-indicator-container {
    margin-top: 0; /* Reduced margin */
    text-align: right;
    font-size: 12px; /* Reduced font-size */
}

#play-area {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    overflow-y: auto; /* Enable vertical scrolling for play-area */
}

.card-section {
    flex: 1;
    margin: 0 5px; /* Reduced margin */
    border: 1px solid #ccc;
    padding: 5px; /* Reduced padding */
    border-radius: 10px;
    min-width: 150px; /* Reduced min-width */
    box-sizing: border-box;
}

.card-section h3 {
    margin-bottom: 5px; /* Reduced margin */
}

.card {
    border: 1px solid #ccc;
    padding: 5px; /* Reduced padding */
    margin: 5px;
    border-radius: 5px;
    display: inline-block;
    cursor: pointer;
    text-align: center;
}

/* Media queries for responsive design */
@media (max-width: 600px) {
    #prompt-card-section, #timer-section {
        padding-right: 2px;
        padding-left: 2px;
    }

    #prompt-container {
        flex-direction: column;
    }

    #turn-indicator-container {
        top: 0;
    }

    #game {
        width: 100%;
        max-width: none;
    }

    #score-container {
        bottom: 5px;
        right: 5px;
    }
}

#investment-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center; /* Center content */
    align-items: center; /* Center content */
}

#investment-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px; /* Set max-width */
    border-radius: 10px; /* Rounded corners */
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto; /* Enable scrolling on mobile */
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    max-width: 90%;
    margin: auto;
    border-radius: 8px;
    text-align: center;
}

.pitches-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.pitch {
    padding: 10px;
    margin: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.pitch:hover {
    background-color: #e9e9e9;
}

.pitch.selected {
    background-color: #d3d3d3;
    border-color: #000;
}

.pitch h3 {
    margin: 0 0 10px 0;
}

.pitch-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pitch-content .card {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#submit-selection {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#submit-selection:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#submit-selection:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none;
}

/* Lobby styling */
#lobby {
    text-align: center;
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#lobby h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

/* Styling for the list of active games */
#active-games-list {
    list-style-type: none;
    color: white;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

#active-games-list li {
    width: 280px;
    background-color: #ff7e5f;
    color: white;
    padding: 15px;
    margin: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    font-size: 16px;
}

#active-games-list li:hover {
    background-color: #feb47b;
    color: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

#active-games-list li p {
    margin: 0;
    
    padding: 5px 0;
    font-size: 14px;
    color: white;
}

/* Create Game Button */
#create-game-button {
    margin-bottom: 30px;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#create-game-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

#rules-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 101; /* Ensure it's always on top */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

#rules-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

#rules-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Adjust the Rules modal to be centered */
#rules-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

#rules-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    max-width: 600px;
    margin: auto;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}









@media (max-width: 600px) {
    .modal-content {
        padding: 15px;
    }

    .pitch-content .card {
        flex: 1 1 100%;
    }
}