/* General Styles */

* {
    font-family: 'Verdana';
}

body {
    text-align: center;
    background-color: #f6f6f6; /* Light gray background */
    color: #ffffff; /* Neutral text color */
    margin: 0;
    padding: 0;
}

/* Centered App Container */
#app {
    margin: 20px auto;
    max-width: 500px; /* Increase the width for better layout */
    background-color: #fbfbfb; /* White background for contrast */
    padding: 20px;
    border-radius: 12px; /* Smooth rounded corners */
    box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Sub-Box Style */
.sub-box {
    background-color: #fafafa;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: inset 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Headings */
h1 {
    font-size: 35px;
    font-weight: 600;
    color: #3c3c3c; 
    margin-bottom: 10px;
    box-shadow: 4px 6px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px 0px 15px 0px;
}

h2 {
    font-size: 20px;
    color: #606060;
    margin-bottom: 10px;
}
/* Login Button */
#login-btn {
    background: linear-gradient(to right, #fdfdfd, #fdfdfd); /* Gradient from very light gray to white */
    color: #333; /* Neutral text color */
    border: 0px solid #ddd; /* Light border */
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 400;
    border-radius: 6px; /* Rounded corners */
    cursor: pointer;
    display: inline-flex; /* Inline-flex to align text and logo */
    align-items: center; /* Align content vertically */
    gap: 8px; /* Space between "Login with" and "Google" */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

/* Blur Effect for Background */
.blur-background > *:not(#end-game-screen) {
    filter: blur(0); /* Start with no blur */
    transition: filter 0.2s ease-in-out; /* Smooth blur easing transition */
}

.blur-background > *:not(#end-game-screen):not(.end-game-modal) {
    filter: blur(5px); /* Final blur effect */
}

/* Full-page Dark Background for End Game Modal */
#end-game-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it’s above all other elements */
    opacity: 0; /* Start invisible */
    transition: opacity 0.3s ease-in-out; /* Smooth fade-in */
}

/* Modal Styles */
.end-game-modal {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    z-index: 1100; /* Ensure it is above the blurred background */
}

.end-game-modal h1 {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.end-game-modal p {
    font-size: 18px;
    margin: 10px 0;
    color: #555;
}

.end-game-modal .back-btn {
    background-color: #3a459c;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.end-game-modal .back-btn:hover {
    background-color: #2e357a;
    transform: translateY(-2px);
}

.end-game-modal .back-btn:active {
    transform: translateY(0);
}

  

#login-btn:hover {
    background: linear-gradient(to right, #f9f9f9, #f9f9f9); /* Subtle change on hover */
    transform: translateY(-2px); /* Lift effect */
}

#login-btn:active {
    transform: translateY(0); /* Reset lift on click */
}

#google-logo {
    font-family: 'Roboto', Arial, sans-serif; /* Match Google font */
    font-size: 16px;
    font-weight: 600;
    display: inline-flex; /* Keep letters together */
}

.g {
    display: inline-block; /* Ensure no extra spaces */
    margin: 0; /* Remove any spacing */
    padding: 0; /* Reset padding */
    font-size: inherit; /* Match font size */
}

/* Online Users Section */
#online-users li {
    background-color: #fff;
    color: #333; /* Set the text color for user names */
    padding: 10px;
    margin: 5px 0;
    border: 0px solid #ddd;
    position: relative; /* Needed for positioning the button */
    border-radius: 5px; /* Rounded corners for the list item */
    display: flex; /* Use flexbox for proper alignment */
    align-items: center; /* Center items vertically */
    justify-content: space-between; /* Space between name and button */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    height: 27px; /* Fixed height to prevent resizing */
    overflow: hidden; /* Prevent overflow caused by the button */
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
}

#online-users li:hover {
    background-color: #fdfdfd;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

#online-users {
    display: none; /* Hidden by default */
  }
  

.invite-btn {
    display: inline-flex; /* Ensure proper alignment */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    background-color: #4a4a4a;
    color: white;
    border: none;
    padding: 4px 20px; /* Padding adjusted for a balanced look */
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 80px; /* Fixed width for consistent size */
    min-width: 80px; /* Prevent shrinking below this size */
    height: 30px; /* Set a consistent height */
}


#online-users li:hover .invite-btn {
    display: inline-block; /* Make the button visible */
}

.invite-btn:hover {
    background-color: #5b5b5b;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
}

/* Flex layout for user list */
#online-users li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Game Board Section */
#game-board {
    margin-top: 20px;
}

#board {
    display: grid;
    grid-template-columns: repeat(4, 60px); /* Increase size for better usability */
    grid-gap: 8px; /* Larger gaps for a cleaner look */
    margin: 20px auto;
    justify-content: center;
}

#board div {
    width: 60px;
    height: 60px;
    border: 0px solid #ddd; /* Thicker border for modern look */
    background-color: #f8f9fa;
    border-radius: 6px; /* Slight rounding for a clean look */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    text-align: center;
    line-height: 56px;
    font-size: 46px; /* Slightly larger font size */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

#board div:hover {
    background-color: #fdfdfd;
    transform: translateY(-2px); /* Slight lift */
    box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.1); /* Enhanced shadow on hover */
}

#board div:active {
    transform: translateY(0); /* Reset lift on click */
}

#status-message {
    margin-top: 10px;
    font-weight: normal; /* Reset font weight for the status message */
    font-size: 16px; /* Optional: Adjust font size for clarity */
    color: #333;
    text-align: center;
}

#status-message b {
    font-weight: bold; /* Apply bold styling only to <b> elements */
}

/* Use Red Star Button Style */
/* Switch Button Style */
#switch-btn {
    background-color: #68b555; /* Default green color */
    color: white; /* White text for clarity */
    border: 0px solid #ddd; /* Subtle border */
    padding: 12px 24px; /* Adjusted padding */
    font-size: 16px; /* Readable font size */
    font-weight: 400; /* Normal text weight */
    border-radius: 6px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4); /* Text shadow for clarity */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover Effect for Switch Button */
#switch-btn:hover {
    transform: translateY(-2px); /* Lift effect */
}

/* Active State for Switch Button */
#switch-btn:active {
    transform: translateY(0); /* Reset lift effect */
}

/* Red Button State */
#switch-btn.red {
    background-color: #d9534f; /* Red background */
    color: white; /* Ensure text is white for contrast */
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4); /* Same text shadow for clarity */
}

/* Blue Button State */
#switch-btn.blue {
    background-color: #3a459c; /* Blue background */
    color: white; /* Ensure text is white for contrast */
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4); /* Same text shadow for clarity */
}

/* Green Button State */
#switch-btn.green {
    background-color: #68b555; /* Green background */
    color: white; /* Ensure text is white for contrast */
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.4); /* Same text shadow for clarity */
}


/* Notification Box */
.notification {
    background-color: #ffffff; /* White background for visibility */
    color: #333; /* Dark text for contrast */
    border: 0px solid #ddd; /* Subtle border */
    padding: 20px;
    margin: 10px auto; /* Centered with space around */
    max-width: 400px; /* Limit width for better readability */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    text-align: left; /* Align text to the left */
    font-size: 16px; /* Readable font size */
}

/* Notification Buttons Wrapper */
.notification-buttons {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px; /* Space between buttons */
    margin-top: 10px; /* Add space above buttons */
}

/* Buttons Inside Notification */
.accept-btn,
.decline-btn {
    background-color: #4a4a4a; /* Neutral gray background */
    color: white; /* White text */
    border: none;
    padding: 8px 16px; /* Adjusted padding for better look */
    font-size: 14px; /* Font size for readability */
    font-weight: 600; /* Bold text for emphasis */
    border-radius: 4px; /* Rounded corners */
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Accept Button Specific Style */
.accept-btn {
    background-color: #34a853; /* Google green */
}

.accept-btn:hover {
    background-color: #2e8d46; /* Darker green on hover */
}

/* Decline Button Specific Style */
.decline-btn {
    background-color: #ea4335; /* Google red */
}

.decline-btn:hover {
    background-color: #c1372a; /* Darker red on h   over */
}

/* Button Active State */
.accept-btn:active,
.decline-btn:active {
    transform: translateY(2px); /* Pressed effect */
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1); /* Reduced shadow */
}

#online-users {
    display: block; /* Ensure it is always block when visible */
    visibility: visible;
    opacity: 1;
  }
  

  #leaderboard {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    background-color: #fafafa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: inset 0px 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 16px;
  }
  
  #leaderboard h2 {
    font-size: 20px;
    color: #606060;
    margin-bottom: 10px;
  }
  
  #leaderboard ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  #leaderboard li {
    background-color: #fff;
    color: #666; /* Set text color to dark gray */
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  #leaderboard li span {
    font-weight: bold;
    color: #444; /* Ensure the text color is always visible */
  }
  

/* Chatroom Container */
#chatroom {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 300px;
    background-color: #fafafa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: inset 0px 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 40px);
  }
  
  /* Chatroom Header */
  #chatroom h2 {
    font-size: 20px;
    color: #606060;
    margin-bottom: 10px;
  }
  
  /* Chat Messages */
  #chat-messages {
    flex: 1; /* Take up available space */
    overflow-y: auto; /* Enable scrolling */
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
    padding: 10px;
  }
  
  /* Message List */
  #message-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  #message-list li {
    background-color: #fff;
    color: #666;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
  }
  
/* Chatroom Container */
#chatroom {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 300px;
    background-color: #fafafa;
    padding: 15px;
    border-radius: 8px;
    box-shadow: inset 0px 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 40px);
  }
  
  /* Chatroom Header */
  #chatroom h2 {
    font-size: 20px;
    color: #606060;
    margin-bottom: 10px;
  }
  
  /* Chat Messages */
  #chat-messages {
    flex: 1; /* Take up available space */
    overflow-y: auto; /* Enable scrolling */
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
    padding: 10px;
  }
  
  /* Message List */
  #message-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  #message-list li {
    background-color: #fff;
    color: #666;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  /* Chat Input Section */
  #chat-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  
  #chat-input {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  #send-btn {
    background-color: #4a4a4a;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  #send-btn:hover {
    background-color: #5b5b5b;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  #send-btn:active {
    transform: translateY(2px);
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
  }
  