* {
    box-sizing: border-box;
    font-family: 'Varela Round', sans-serif;
    }

    body {
    margin: 0;
    padding-top: 0px;
    font-family: Arial, sans-serif;
    }

    .container {
    position: relative;
    display: flex;
    }

    .side-menu {
    background-color: #f2f2f2;
    width: 25%;
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    transition: width 0.3s ease-in-out;
    z-index: 1000;
    border-right: 2px solid #ddd;
    }

    


 

    .form-container {
    padding: 20px;
    }

    .form-container input,
    .form-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    }

    .form-container button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    }

    .icon-image {
        max-width: 50%;
        padding-top: 10px;
    }

    /* Media queries for responsive design */
    @media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .side-menu {
        width: 100%;
        transition: none;
        z-index: 10;
    }

    .icon-image {
        max-width: 100%;
    }


    /* Improve menu typography on mobile */
    .side-menu h1 {
        font-size: 20px;
        margin: 10px 0;
        line-height: 1.2;
    }

    .side-menu h3 {
        font-size: 16px;
        margin: 15px 0 10px 0;
        line-height: 1.3;
    }

    .side-menu p {
        font-size: 14px;
        line-height: 1.4;
        margin: 8px 0;
    }

    /* Better button spacing on mobile */
    .side-menu .button-27 {
        margin: 8px auto;
        padding: 15px 35px;
        font-size: 14px;
        min-height: 48px;
        display: block;
        width: auto;
        max-width: 320px;
        min-width: 200px;
        box-sizing: border-box;
        text-align: center;
    }

    /* Make Play with Friends and Play Alone buttons bigger */
    .side-menu .button-27[onclick*="showmultiplayerpopup"],
    .side-menu .button-27[onclick*="showsingleplayerpopup"] {
        margin: 4px auto;
        padding: 18px 45px;
        font-size: 16px;
        min-height: 56px;
        max-width: 350px;
        min-width: 240px;
        font-weight: 600;
    }

    /* Improve card layouts */
    .side-menu .event-card,
    .side-menu .invitation-card {
        margin: 10px 0;
        padding: 12px;
    }

    /* Better table styling */
    .side-menu table {
        width: 100%;
        font-size: 14px;
    }

    .side-menu table td {
        padding: 8px 4px;
        vertical-align: middle;
    }

    /* Input field improvements */
    .side-menu input[type="text"] {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
        margin: 8px 0;
    }
    
    }











    /* The Modal (background) */
		.modal {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            padding-top: 100px; /* Location of the box */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgb(0,0,0); /* Fallback color */
            background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
          }
          
          /* Modal Content */
          .modal-content {
            margin: auto;
            padding: 20px;
            width: 30%;
          }
          
          /* The Close Button */
          .close {
            color: #aaaaaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
          }
          
          .close:hover,
          .close:focus {
            color: #000;
            text-decoration: none;
            cursor: pointer;
          }
  
          /**********/
  
          .player-select {
              background-color: red;
              width: 50%;
              height: 50%;
              position: absolute;
              left: 25%;
              top: 25%;
              z-index: 1000;
          }
  
          .hide-game {
              background-color: grey;
              width: 100%;
              height: 100%;
              position: absolute;
              left: 0px;
              top: 0px;
              z-index: 998;
              opacity: 0.7;
              
          }
  
          .game-menu {
              background-color: green;
              width: 40%;
              height: 100%;
              position: absolute;
              left: 0px;
              top: 0px;
              z-index: 999;
              display: none;
          }
  
          .menu-title{
              padding-top: 50px;
              
          }
  
          .showmenu{
              display: block;
          }
          
          @media only screen and (max-width: 479px) {	
              .modal-content {
              width: 80%;
              }
          }





        /****************************/


        		/* Default styles for the menu */
		.players_menu {
            list-style: none;
            margin: 0;
            padding: 0;
            overflow-x: scroll; /* Enable vertical scrolling on computers */
            max-width: 100%; /* Set a max height for the scrolling list */
            }
    
            .players_menu li {
                display: inline-block;
            padding: 10px;
            }
    
            .players_menu li a {
            text-decoration: none;
            color: #000;
            }
    
            .mobile-toggle {
                display: none;
            
            }
    
            /* Media query for mobile devices */
            @media (max-width: 768px) {
            /* Hide the desktop menu */
            .players_menu {
                display: none;
            }
    
            /* Show the mobile menu when the toggle button is clicked */
            .players_menu.show-mobile {
                display: block;
            }
    
            .players_menu li {
                display: block;
            }
    
            /* Styles for the mobile menu toggle button */
            .mobile-toggle {
                display: block;
                cursor: pointer;
                padding: 10px;
            }
            }

    /* Additional mobile responsive improvements for side menu */
    @media screen and (max-width: 480px) {
        .side-menu {
            width: 100%;
        }
    }

        .side-menu h1 {
            font-size: 18px !important;
        }

        .side-menu .button-27 {
            font-size: 13px !important;
            padding: 14px 30px !important;
            min-height: 46px !important;
            width: auto !important;
            max-width: 300px !important;
            min-width: 180px !important;
            margin: 8px auto !important;
        }

        /* Make Play with Friends and Play Alone buttons bigger on small mobile */
        .side-menu .button-27[onclick*="showmultiplayerpopup"],
        .side-menu .button-27[onclick*="showsingleplayerpopup"] {
            margin: 3px auto !important;
            padding: 16px 40px !important;
            font-size: 15px !important;
            min-height: 52px !important;
            max-width: 320px !important;
            min-width: 220px !important;
            font-weight: 600 !important;
        }

        /* Keep logout button small on small mobile */
        .side-menu .logout-button {
            padding: 6px 14px !important;
            font-size: 11px !important;
            min-height: 30px !important;
            max-width: 100px !important;
            min-width: 70px !important;
        }

        .side-menu .event-card,
        .side-menu .invitation-card {
            padding: 10px !important;
        }
    }

    /* Very small devices */
    @media screen and (max-width: 375px) {
        .side-menu {
            width: 100%;
        }
    }

        .side-menu h1 {
            font-size: 16px !important;
        }

        .side-menu .button-27 {
            font-size: 12px !important;
            padding: 12px 25px !important;
            min-height: 44px !important;
            width: auto !important;
            max-width: 280px !important;
            min-width: 160px !important;
            margin: 8px auto !important;
        }

        /* Make Play with Friends and Play Alone buttons bigger on very small mobile */
        .side-menu .button-27[onclick*="showmultiplayerpopup"],
        .side-menu .button-27[onclick*="showsingleplayerpopup"] {
            margin: 3px auto !important;
            padding: 14px 35px !important;
            font-size: 14px !important;
            min-height: 48px !important;
            max-width: 300px !important;
            min-width: 200px !important;
            font-weight: 600 !important;
        }

        /* Keep logout button small on very small mobile */
        .side-menu .logout-button {
            padding: 6px 12px !important;
            font-size: 10px !important;
            min-height: 28px !important;
            max-width: 90px !important;
            min-width: 60px !important;
        }
    }

    /* Style the logout button - much smaller than other buttons */
    .side-menu .button-27.logout-button,
    .side-menu .logout-button {
        background-color: #fc5658 !important;
        background-image: none !important;
        border-color: #fc5658 !important;
        padding: 8px 16px !important;
        font-size: 12px !important;
        min-height: 32px !important;
        max-width: 120px !important;
        min-width: 80px !important;
        margin: 20px auto 60px auto !important;
    }

    .side-menu .button-27.logout-button:hover {
        background-color: #e74c4e !important;
        background-image: linear-gradient(144deg,#e74c4e, #e74c4e 50%,#e74c4e) !important;
    }



            /************************************/

            table {
                border-spacing: 1;
                border-collapse: collapse;
                background: #f2f2f2;
                border-radius: 6px;
                overflow: hidden;
                max-width: 800px;
                width: 100%;
                margin: 0 auto;
                position: relative;
                }
                table * {
                position: relative;
                }
                table td, table th {
                padding-left: 8px;
                }
                table thead tr {
                height: 60px;
                background: #FFED86;
                font-size: 16px;
                }
                table tbody tr {
                height: 48px;
                border-bottom: 1px solid #E3F1D5;
                }
                table tbody tr:last-child {
                border: 0;
                }
                table td, table th {
                text-align: left;
                }
                table td.l, table th.l {
                text-align: right;
                }
                table td.c, table th.c {
                text-align: center;
                }
                table td.r, table th.r {
                text-align: center;
                }






                .flash-message {
                    position: fixed;
                    bottom: 10px;
                    left: 5%;
                    /*transform: translateX(-50%);*/
                    background-color: #ff4444; /* Red background for error */
                    color: white;
                    padding: 10px 20px;
                    border-radius: 5px;
                    font-size: 12px;
                    opacity: 0;
                    transition: opacity 0.5s ease-in-out;
                    z-index: 10;
                    width: 90%;
                }
    
                .flash-message.show {
                    opacity: 1;
                }
    
                .flash-message.hidden {
                    opacity: 0;
                    pointer-events: none;
                }
    
    
                .menu-img, .refresh-img, .info-img, .card-skins-img, .pick-img {
                    transition: transform 0.1s ease;
                }
                
                .clicked {
                    transform: scale(0.9); /* Shrinks the image slightly */
                }

                