* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    background: url('images/game-background.jpg') center center/cover no-repeat;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    text-align: center;
    margin-top: 40vh; /* container height */
    transition: min-height 0.4s cubic-bezier(0.4,0,0.2,1), height 0.4s cubic-bezier(0.4,0,0.2,1), padding 0.4s cubic-bezier(0.4,0,0.2,1);
}

@keyframes menuFadeIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes menuFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.98);
    }
}

.menu {
    display: none;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    background: rgba(60, 60, 60, 0.20); /* less see-through */
    backdrop-filter: blur(10px); /* strong blur */
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(50, 22, 3, 0.728);
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1), min-height 0.4s cubic-bezier(0.4,0,0.2,1), height 0.4s cubic-bezier(0.4,0,0.2,1), padding 0.4s cubic-bezier(0.4,0,0.2,1);
    animation: menuFadeOut 0.45s cubic-bezier(0.4,0,0.2,1) both;
}

.menu.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
    animation: menuFadeIn 0.45s cubic-bezier(0.4,0,0.2,1) both;
}

.game-title {
    font-size: 4rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.7);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    background: rgba(30, 30, 30, 0.08); /* even more see-through */
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    backdrop-filter: blur(10px); /* blur effect */
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn.secondary {
    background: rgba(60, 60, 60, 0.08);
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.options-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.room-info {
    background: rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.password-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

#room-password {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: #4ecdc4;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.text-input {
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.06);
    color: white;
    text-align: center;
    letter-spacing: 2px;
}

.text-input:focus {
    outline: none;
    border-color: #4ecdc4;
}

@media (max-width: 600px) {
    .game-title {
        font-size: 3rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .options-container {
        flex-direction: column;
    }

    .password-display {
        flex-direction: column;
    }
}

.player-list {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    min-height: 2.5rem;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: #fff;
    background: rgba(60, 60, 60, 0.10);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.player-list .player-name {
    font-weight: 500;
    letter-spacing: 1px;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(0,0,0,0.10);
    margin-bottom: 0.1rem;
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.avatar-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 6px solid #fff;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.avatar-randomize-btn {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #7c3aed;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    position: absolute;
    margin-top: -40px;
    margin-left: 100px;
    z-index: 2;
    transition: background 0.2s;
}
.avatar-randomize-btn:hover {
    background: #e0e0e0;
}

.username-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.username-label {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.7rem;
    text-align: center;
    letter-spacing: 1px;
}

.username-input {
    font-size: 2rem;
    padding: 0.5rem 1.2rem;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.18);
    color: #fff;
    margin-bottom: 0.7rem;
    text-align: center;
    font-weight: 500;
    width: 320px;
    max-width: 90vw;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (max-width: 600px) {
    .username-input {
        font-size: 1.2rem;
        width: 90vw;
    }
    .avatar-img {
        width: 90px;
        height: 90px;
    }
    .avatar-randomize-btn {
        margin-left: 60px;
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}

#username-menu {
    align-items: center;
    justify-content: center;
    margin-top: -10vh !important;
}

.main-title {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3.5rem;
    z-index: 10;
    width: 80%;
    max-width: 600px;
    text-align: center;
    background: none !important;
    background-clip: text;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: white !important;
}

.main-description {
    position: absolute;
    top: 6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    font-size: 1.15rem;
    text-align: center;
    line-height: 1.5;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 1.5rem;
}

.hidden {
    display: none !important;
}

#create-room,
#join-room {
    margin-top: -20vh !important;
}

.podium-slot {
  text-align: center;
  position: relative;
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.podium-base {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.main-title, .main-description {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

#main-menu {
  background: rgba(0, 0, 0, 0.5); /* darker */
  border-radius: 16px;
  padding: 2em;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}
