:root {
    --clr-primary: #0c48df;
    --clr-primary-dark: #051C55;
    --clr-accent: #ff8c00;
    --clr-accent-hover: #ffae42;
    --clr-bg: #0c48df;
    --clr-card: #051C55;
    --clr-text: #ffffff;
    --clr-text-muted: #a0aec0;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.entry-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.card {
    background: var(--clr-card);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.title {
    font-size: 2.5rem;
    color: var(--clr-accent);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--clr-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="text"] {
    width: 100%;
    font-family: inherit;
    font-size: 1.2rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--clr-accent);
    background-color: rgba(255, 255, 255, 0.1);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

#room {
    letter-spacing: 0.5ch;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Avatar image gallery */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery {
    aspect-ratio: 1;
    min-height: 80px;
    box-sizing: border-box;
    border: 3px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.08);
}

.gallery.selected {
    border-color: var(--clr-accent);
    background: rgba(255, 140, 0, 0.1);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.btn-enter {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: var(--clr-accent);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 0 #cc7000;
    margin-top: 1rem;
}

.btn-enter:hover {
    background-color: var(--clr-accent-hover);
    filter: brightness(1.1);
}

.btn-enter:active {
    filter: brightness(0.9);
}

.btn-enter:disabled {
    background-color: var(--clr-text-muted);
    box-shadow: 0 4px 0 #718096;
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.auth-status-container {
    margin-bottom: 1.5rem;
    text-align: center;
    width: 100%;
}

/* Custom Scrollbar for Avatar Grid */
.avatar-grid::-webkit-scrollbar {
    width: 6px;
}
.avatar-grid::-webkit-scrollbar-track {
    background: transparent;
}
.avatar-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.avatar-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Existing styles below... */
  
  /* When playing in a room... */

#playercontainer {
    position:fixed;
    bottom:0px;
}

.player {
    position: relative;
    bottom:24px;
}

/* By adding a class of .dead to a player we can adjust the opacity of the player image */
.player .dead img {
  opacity: 0.3;
}
/* Debugging - show a pixel to identify the 'origin' of the player graphic */
.pixel {
  z-index:999;
  position:absolute;
  top:0;
  left:0;
  width:1px;
  height:1px;
  background-color: black;
}
.avatar {
  position: absolute;
  bottom:-60px;
  left:0;
  transform-origin: bottom center;
}
.avatar img {
  width:100px;
  transform-origin: center bottom;
  -webkit-filter: drop-shadow(5px 5px 5px #222222);
  filter: drop-shadow(5px 5px 5px #222222);}

.playernamepanel {
  z-index: -1;
  position:absolute;
  left:0;
  top:-24px;
  height:48px;
  border-radius: 14px;
  border: 2px solid #fff;
  background-color: gray;
  vertical-align: baseline;
  max-width: 720px;
}

.playername {
  font-family: "Titan One", sans-serif;
  font-size:40px;
  margin-left: 100px;
  margin-right:10px;
  color:darkblue;

  line-height: 48px;
  vertical-align:bottom;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* By default the role button should be invisible */
#rolebutton {
  display: none;
} 

#role {
  margin-top:3rem;
  text-align: center;
}
/* Holder for player content */
#content {
  margin-top:3rem;
  margin-bottom: 2rem;
  text-align: center;
}

button {
  font-family: 'Poppins', sans-serif;
  background-color:#4B538B;   
  color:#FF8C00 ;  /* Spanish orange */ 
  border: 1px solid #FF8C00; /* Spanish orange */
  font-size: 2rem;
  padding: 0.5rem 1rem;
  margin: 0.5rem;
}
