/* General Styles */
/* Container for the layout */
.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Active Users List Styling */
.active-users {
    width: 200px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin-right: 20px;
    overflow-y: auto;
    color: #fff;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    animation: fadeIn 1s ease-in-out;
}

/* User Card Styling */
.user-card {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.user-card:hover {
    transform: scale(1.05);
}

.user-icon img {
    width: 50px;
    height: 70px;
    border-radius: 10%;
    margin-right: 5px;
}

.username {
    color: #f8f9fa;
    font-weight: bold;
}

.badge-host {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 0.7rem;
  border-radius: 4px;
  background: #f1c40f;
  color: #000;
}

.badge-ready {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 0.7rem;
  border-radius: 4px;
  background: #27ae60;
  color: #fff;
}



body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: url('./background.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #fff;
}

h2 {
    margin: 0;
    font-size: 1.8rem;
    text-align: center;
    color: #f8f9fa;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Button Styles */
button {
    cursor: pointer;
    background-color: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: rgba(0, 86, 179, 0.9);
    transform: scale(1.05);
}

/* Form Input Styles */
input {
    width: 94%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: box-shadow 0.3s ease;
}

input:focus {
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.8);
    outline: none;
}

/* Auth Wrapper Styling */
.auth-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    width: 350px;
    animation: fadeIn 1s ease-in-out;
}

/* Game panels (match auth-wrapper/chat style) */
#role-panel,
#host-panel,
#night-panel,
#day-panel {
    background-color: rgba(0, 0, 0, 0.7);  /* similar to .auth-wrapper */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    margin-top: 10px;
}

/* Optional: room layout tweak so it doesn't stretch weird */
#room-screen > div {
    /* This keeps your inner layouts nice without changing current look too much */
    /* You can tune this if needed */
}

#role-panel,
#host-panel,
#night-panel,
#day-panel,
#mafia-chat-panel {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
  margin-top: 10px;
  animation: panelPop 0.3s ease-out;
}

#role-panel.role-mafia {
  border-left: 4px solid #e74c3c;
}

#role-panel.role-doctor {
  border-left: 4px solid #3498db;
}

#role-panel.role-detective {
  border-left: 4px solid #9b59b6;
}

#role-panel.role-villager {
  border-left: 4px solid #2ecc71;
}




.auth-wrapper a {
    color: rgba(0, 123, 255, 0.9);
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* Chat Room Styling */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    width: 400px;
    height: 500px;
    overflow: hidden;
    animation: fadeIn 1s ease-in-out;
}

#events {
    flex-grow: 1;
    list-style-type: none;
    padding: 10px;
    margin: 0;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
}

#events li {
    margin-bottom: 5px;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    word-wrap: break-word;
    color: #f8f9fa;
}

.button-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

#chat {
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

#chat::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#ready-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: #555;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#ready-btn.ready {
  background: #27ae60;
}

#ready-btn:hover {
  transform: translateY(-1px);
}


/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .auth-wrapper,
    .chat-wrapper {
        width: 90%;
        height: auto;
    }

    #events {
        max-height: 300px;
    }
}
