/* Colors */
:root {
    --black: black;
    --color-1: #2d9fff;
    --color-1-dark: rgba(45, 159, 255, 0.4);
    --color-1-dark-2: rgba(45, 159, 255, 0.6);
    --color-2: #2dffb5;
    --color-3: #ff2ddb;
    --grey: darkgrey;
    --white: #ffffff;
    --white-2: #e0e0e0;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
    padding-bottom: 2rem;
}

#page {
    width: 100%;
    max-width: 100%;
}

/* Floating background */
.floating-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    will-change: transform;
}

.floating-circle:nth-child(1) {
    background: radial-gradient(circle, var(--color-1) 10%, transparent 70%);
    width: 300px;
    height: 300px;
    top: 10%;
    left: -10%;
    animation: float1 25s infinite linear;
    opacity: 0.3;
}

.floating-circle:nth-child(2) {
    background: radial-gradient(circle, var(--color-2) 10%, transparent 70%);
    width: 200px;
    height: 200px;
    top: 60%;
    right: -5%;
    animation: float2 30s infinite linear;
    opacity: 0.2;
}

.floating-circle:nth-child(3) {
    background: radial-gradient(circle, var(--color-3) 10%, transparent 70%);
    width: 400px;
    height: 400px;
    top: 30%;
    left: 50%;
    animation: float3 35s infinite linear;
    opacity: 0.15;
}

.floating-circle:nth-child(4) {
    background: radial-gradient(circle, var(--color-1-dark) 30%, transparent 70%);
    width: 150px;
    height: 150px;
    top: 80%;
    left: 20%;
    animation: float4 20s infinite linear;
    opacity: 0.25;
}

.floating-circle:nth-child(5) {
    background: radial-gradient(circle, var(--color-1-dark-2) 30%, transparent 70%);
    width: 250px;
    height: 250px;
    top: 5%;
    right: 30%;
    animation: float5 28s infinite linear;
    opacity: 0.2;
}

@keyframes float1 {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -50px) scale(1.1); }
    50% { transform: translate(200px, 100px) scale(0.9); }
    75% { transform: translate(-50px, 150px) scale(1.05); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes float2 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-150px, 100px) scale(0.8); }
    66% { transform: translate(-80px, -120px) scale(1.2); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes float3 {
    0% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(-200px, 50px) scale(1.1); }
    40% { transform: translate(-100px, -100px) scale(0.9); }
    60% { transform: translate(150px, -50px) scale(1.05); }
    80% { transform: translate(100px, 120px) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes float4 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(300px, -200px) scale(1.3); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes float5 {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-100px, 80px) scale(0.9); }
    50% { transform: translate(50px, 150px) scale(1.1); }
    75% { transform: translate(-200px, 50px) scale(0.85); }
    100% { transform: translate(0, 0) scale(1); }
}

.floating-circle {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}


/* Hide the body content until fonts are loaded */
body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.fonts-loaded {
    opacity: 1;
}

body.fonts-loaded .loading-spinner {
    display: none;
}

/* Add a loading indicator */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: sans-serif;
    color: var(--white);
}

.hidden {
    display: none;
}

/* Typography */
h1 {
  font-family: 'Pacifico', cursive;
  font-display: block;
  font-size: 5rem;
  margin-bottom: 0.5rem;
  color: var(--color-1);
  text-shadow: 0 0 1px var(--color-3);
}

h2 {
  font-weight: 300;
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 4rem auto;
  color: var(--white-2);
}

/* Profile Page Styles */
.error-message.profile-error,
.success-message.profile-success {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: 15px;
  text-align: center;
  font-size: 0.95rem;
}

.error-message.profile-error {
  color: #ff6b6b;
  background-color: rgba(255, 107, 107, 0.1);
  border: 2px solid rgba(255, 107, 107, 0.3);
}

.success-message.profile-success {
  color: var(--color-2);
  background-color: rgba(45, 255, 181, 0.1);
  border: 2px solid rgba(45, 255, 181, 0.3);
}

.current-avatar {
  text-align: center;
  margin: 1rem 0;
}

.avatar-container {
  position: relative;
  display: inline-block;
}

.avatar-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-1);
  display: block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.avatar-initial-large {
  background-color: rgba(45, 159, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  color: var(--color-1);
}

.delete-avatar-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background-color: #ff6b6b;
  border: 3px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.delete-avatar-btn:hover {
  background-color: #ff5252;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.6);
}

.delete-avatar-btn:active {
  transform: scale(0.95);
}

.button-logout {
  width: 100%;
  background: transparent !important;
  background-image: none !important;
  border: 2px solid #ff6b6b !important;
  color: #ff6b6b !important;
  margin-top: 1.5rem;
  box-shadow: none !important;
}

.button-logout:hover {
  background: rgba(255, 107, 107, 0.1) !important;
  background-image: none !important;
  border-color: #ff5252 !important;
  color: #ff5252 !important;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3) !important;
  transform: translateY(-2px);
}

.button-logout i {
  margin-right: 0.5rem;
}

/* Account Setup Styles */
.account-setup-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.account-setup-form {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(45, 159, 255, 0.3);
  border-radius: 25px;
  padding: 2rem;
  margin-top: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-field {
  margin-bottom: 1.5rem;
  text-align: left;
}

.field-label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-2);
  margin-bottom: 0.5rem;
  text-align: left;
}

.field-helper {
  display: block;
  font-size: 0.85rem;
  color: var(--white-2);
  opacity: 0.7;
  margin-top: 0.4rem;
  text-align: left;
}

.account-input {
  width: 100%;
  max-width: none;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--color-1);
  border-radius: 15px;
  color: var(--white);
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.account-input:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px var(--color-1-dark);
}

.file-input {
  display: block;
  width: 100%;
  max-width: none;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--color-1);
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: left;
}

.file-input::-webkit-file-upload-button {
  background: linear-gradient(45deg, var(--color-1), var(--color-3));
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  margin-right: 0.8rem;
  transition: all 0.3s ease;
}

.file-input::-webkit-file-upload-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--color-1-dark-2);
}

.file-input:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px var(--color-1-dark);
}

.account-setup-form .button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 2rem;
}

/* Join Game Banner Styles */
.game-banner {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(45, 159, 255, 0.3);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.banner-theme {
  font-size: 1.1rem;
  color: var(--white);
  flex: 1;
}

.banner-theme strong {
  color: var(--color-2);
  font-weight: 600;
}

.banner-invite-button {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  white-space: nowrap;
  margin: 0;
}

.banner-passcode-info {
  font-size: 0.9rem;
  color: var(--white-2);
  opacity: 0.85;
  line-height: 1.5;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.banner-passcode-info strong {
  color: var(--white);
  font-weight: 600;
}

.join-game-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  margin-bottom: 0;
}

.player-tracks {
  margin: 1.5rem 0;
}

.player-tracks p {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(45, 159, 255, 0.3);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  color: var(--white);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
}

.player-tracks p[track-id] {
  justify-content: flex-start;
  text-align: left;
}

.player-tracks p:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-1);
}

.player-tracks i {
  cursor: pointer;
  padding: 0.3rem;
  transition: all 0.2s ease;
}

.player-tracks .fa-trash-can {
  margin-left: auto;
}

.player-tracks i:hover {
  color: var(--color-1);
  transform: scale(1.1);
}

.player-tracks .fa-trash-can:hover {
  color: #ff6b6b;
}

/* Game Setup Styles (same as account setup) */
.game-setup-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.game-setup-form {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(45, 159, 255, 0.3);
  border-radius: 25px;
  padding: 2rem;
  margin-top: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.game-input {
  width: 100%;
  max-width: none;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--color-1);
  border-radius: 15px;
  color: var(--white);
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.game-input:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px var(--color-1-dark);
}

.game-input[type="number"] {
  text-align: center;
}

.game-setup-form .button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 2rem;
}

/* Container layout */
.container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  position: relative;
}

/* Vertical divider */
.container::after {
  content: '';
  position: absolute;
  height: 120px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-1), transparent);
  left: 50%;
  transform: translateX(-50%);
}

/* Section styling */
.section {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Button styling */
.button {
  /*background: linear-gradient(45deg, #2d9fff, #4f9eff);*/
  background: linear-gradient(45deg, var(--color-1), var(--color-3));
  border: none;
  border-radius: 30px;
  color: var(--white);
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.8rem 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px var(--color-1-dark);
}

.button.disabled {
    background: var(--grey);
}

.button.disabled:hover {
  transform: none;
  box-shadow: none;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--color-1-dark-2);
}

.button:active {
  transform: translateY(1px);
}

.big-margin-top {
    margin-top: 4rem;
}

.small-margin-top {
    margin-top: 1rem;
}

/* Hamburger menu container */
.hamburger-container {
    position: fixed;
    left: 15px;
    top: 15px;
    z-index: 999;
    transition: top 0.3s ease-out;
}

.hamburger-container.status-bar-showing {
    top: 45px;
}

/* Hamburger menu button */
.hamburger-menu {
    width: 30px;
    height: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.hamburger-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
}

.hamburger-menu .line {
    width: 100%;
    height: 3px;
    background-color: var(--color-1);
    transition: 0.3s;
}

/* Hamburger animation when active */
.hamburger-menu.active .line:nth-child(1) {
    transform: rotate(45deg) translate(7.5px, 7.5px);
    z-index: 1003;
}

.hamburger-menu.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .line:nth-child(3) {
    transform: rotate(-45deg) translate(7.5px, -7.5px);
    z-index: 1003;
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: 35px;
    left: 0;
    background: linear-gradient(135deg, rgba(45, 159, 255, 0.15), rgba(45, 255, 181, 0.1));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(45, 159, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 1002;
}

.dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 4px 8px;
    font-size: 0.95rem;
}

.dropdown-menu a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.dropdown-menu a:hover {
    background-color: rgba(45, 159, 255, 0.2);
    transform: translateX(5px);
}

.dropdown-menu .logout-item {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu .logout-item a {
    color: #ff6b6b;
}

.dropdown-menu .logout-item a:hover {
    background-color: rgba(255, 107, 107, 0.1);
}

/* Logout */
.logout {
    position: absolute;
    right: 15px;
    top: 5px;
}

.logout a {
    color: red;
}

/* Bottom Navigation Bar (Mobile Only) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(45, 159, 255, 0.1));
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(45, 159, 255, 0.3);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--white-2);
    padding: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    gap: 0.25rem;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bottom-nav-item:hover {
    color: var(--color-1);
    transform: translateY(-2px);
}

.bottom-nav-item.active {
    color: var(--color-1);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-1), var(--color-2));
    border-radius: 3px 3px 0 0;
}

/* How to Play Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.98), rgba(45, 159, 255, 0.15));
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 20px;
    padding: 3.5rem 2rem 2rem 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--white-2);
    font-size: 1.2rem;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-1);
    color: var(--color-1);
    transform: rotate(90deg);
}

.modal-pages {
    min-height: 300px;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.modal-page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-left: 1rem;
}

.modal-page.active {
    display: block;
    opacity: 1;
    animation: pageSlideIn 0.3s ease;
}

@keyframes pageSlideIn {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.modal-page h2 {
    color: var(--color-1);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    padding-right: 3rem;
    word-wrap: break-word;
    padding-top: 1.1rem;
}

.modal-page p {
    color: var(--white-2);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-right: 1rem;
}

.modal-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-left: -2.5rem;
    margin-right: -2rem;
    padding-left: 2.5rem;
    padding-right: 2rem;
    border-top: 2px solid rgba(45, 159, 255, 0.3);
    background: rgba(45, 159, 255, 0.1);
}

.modal-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--white-2);
    font-size: 1.1rem;
    margin: 1rem;
}

.modal-nav-btn:hover:not(:disabled) {
    background: rgba(45, 159, 255, 0.2);
    border-color: var(--color-1);
    color: var(--color-1);
    transform: scale(1.1);
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-page-indicator {
    color: var(--white-2);
    font-size: 1rem;
    font-weight: 500;
}

.modal-page-indicator .current-page {
    color: var(--color-1);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Adjust bottom nav button styling */
.bottom-nav-item {
    background: none;
    border: none;
    cursor: pointer;
}

/* Join game section */
.join-game {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Input styling */
input, select {
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--color-1);
  border-radius: 30px;
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  padding: 0.8rem 1.5rem;
  text-align: center;
  width: 100%;
  max-width: 200px;
  transition: all 0.3s ease;
  outline: none;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

input:focus {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px var(--color-1-dark);
}

input.create-game {
  max-width: 100px;
}

input.error {
    border: 2px solid red;
    background-color: darkred;
}

select {
  max-width: 250px;
}

/* How to play section */
.how-to-play {
    margin-top: 4rem;
    max-width: 600px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--color-1);
}

/* Passcode display - improved centering for large viewports */
.passcode-display {
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.how-to-play h3 {
    color: var(--color-2);
    margin-bottom: 1rem;
}

.how-to-play p {
    color: var(--white-2);
    line-height: 1.6;
}

/* Search tune modal */
#search-modal {
    opacity: 1;
}

#search-modal .modal-content {
    height: 100%;
    max-height: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(0, 0, 0, 0.85);
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem;
    background: rgba(45, 159, 255, 0.1);
    border-bottom: 2px solid rgba(45, 159, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--white);
}

.close {
    color: var(--white-2);
    font-size: 2rem;
    font-weight: normal;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: all 0.2s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover,
.close:focus {
    color: var(--color-1);
    transform: scale(1.1);
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Desktop styles */
@media (min-width: 768px) {
    .modal-content {
        background-color: var(--black);
        border: 2px solid rgba(45, 159, 255, 0.3);
        border-radius: 20px;
        margin: 2rem auto;
        width: 90%;
        max-width: 600px;
        height: auto;
        max-height: calc(100vh - 4rem);
    }

    .modal-header {
        border-radius: 18px 18px 0 0;
        padding: 2rem;
    }

    .modal-body {
        padding: 1.5rem;
    }
}

/* Search result styles */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    padding-left: 0.3rem;
}

.search-result-item:hover .track-artwork {
    transform: scale(1.05);
}

.track-artwork {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.track-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artwork-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(45, 159, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-1);
}

.track-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.track-name {
    color: var(--white);
    font-weight: 500;
    margin-bottom: 0.1rem;
    font-size: 0.875rem;
    line-height: 1.2;
    word-break: break-word;
}

.artist-name {
    color: var(--white-2);
    font-size: 0.75rem;
    line-height: 1.2;
    word-break: break-word;
    opacity: 0.8;
}

.add-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border: none;
    padding: 0.4rem 0.7rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    white-space: nowrap;
}

.add-button:hover {
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.5);
    transform: scale(1.02);
}

.add-button:active {
    transform: scale(0.98);
}

.add-button.disabled {
    background: rgba(128, 128, 128, 0.3);
    color: var(--grey);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Mobile optimization for search results */
@media (max-width: 480px) {
    .search-result-item {
        gap: 0.6rem;
        padding: 0.45rem 0;
    }

    .track-artwork {
        width: 38px;
        height: 38px;
    }

    .track-name {
        font-size: 0.85rem;
    }

    .artist-name {
        font-size: 0.7rem;
    }

    .add-button {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }
}

/* Modal states */
#search-results:empty::after {
    content: "Search for a tune to get started";
    display: block;
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--white-2);
    font-size: 1rem;
}

.modal-body .loading {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--color-1);
}

.modal-body .loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--white-2);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--color-1);
}

/* Lobby Styles */
.lobby {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.game-info {
    text-align: center;
    color: var(--white-2);
    margin-bottom: 30px;
    margin-top: 20px;
    font-size: 1.1em;
    opacity: 0.8;
}

.lobby-users-header {
    text-align: center;
    color: var(--color-2);
    margin-bottom: 20px;
    margin-top: 20px;
    font-size: 1.5em;
    font-weight: 600;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    justify-items: center;
}

.user-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lobby-avatar-container {
    position: relative;
    margin-bottom: 8px;
}

.lobby-avatar-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--color-1);
    display: block;
    object-fit: cover;
}

.lobby-avatar-initial {
    background-color: rgba(45, 159, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--color-1);
}

.lobby-avatar-creator .lobby-avatar-image {
    border-color: #FFD700;
}

.user-name {
    margin-top: 2px;
    color: var(--white-2);
    font-weight: 600;
    font-size: 14px;
}

.creator-badge {
    margin-top: 4px;
    background-color: var(--color-2);
    color: var(--black);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.game-container {
    min-height: 100vh;
    background: var(--background-gradient);
    position: relative;
}

/* Error Messages */
.error-message {
    background-color: rgba(255, 107, 107, 0.1);
    border: 2px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 15px 20px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    border-radius: 8px;
}

.error-message p {
    margin: 0;
}

.lobby-error {
    max-width: 600px;
    margin: 0 auto 20px auto;
}

/* Error Banner */
.notification-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-weight: bold;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    min-width: 200px;
}

.notification-banner.good {
    background-color: rgba(76, 175, 80, 0.95);
}

.notification-banner.bad {
    background-color: rgba(244, 67, 54, 0.95);
}

.notification-banner.neutral {
    background-color: rgba(158, 158, 158, 0.95);
}

/* Notification avatar styles */
.notification-with-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-avatar-image {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-avatar-initial {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.notification-text {
    flex-grow: 1;
}

/* Legacy support - redirect to bad notification */
.error-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: rgba(244, 67, 54, 0.95);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-weight: bold;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    min-width: 200px;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Lock Control */
.lock-control {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px 0;
}

/* Start Game Section */
.start-game-section {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

/* Game Rules Section */
.game-rules-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 25px;
    padding: 30px;
    margin-top: 40px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.rules-header {
    text-align: center;
    margin-bottom: 30px;
}

.rules-header h2 {
    color: var(--color-2);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(45, 255, 181, 0.3);
}

.rules-subtitle {
    color: var(--white-2);
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
}

.rules-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.rule-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rule-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-1), var(--color-2), var(--color-3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rule-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(45, 159, 255, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.rule-card:hover::before {
    opacity: 1;
}

.rule-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.rule-card h3 {
    color: var(--color-1);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.rule-card ul {
    list-style: none;
    padding: 0;
}

.rule-card li {
    color: var(--white);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 12px;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.point-badge {
    background: linear-gradient(45deg, var(--color-2), var(--color-1));
    color: var(--black);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(45, 255, 181, 0.3);
    min-width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.point-badge.bonus {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: var(--black);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: bonus-pulse 2s infinite;
}

@keyframes bonus-pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
        transform: scale(1.05);
    }
}

/* Start Tune Section */
.start-tune-section {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.lock-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 15px;
}

.lock-checkbox {
    display: none;
}

.lock-slider {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: #ccc;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.lock-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lock-checkbox:checked + .lock-slider {
    background-color: var(--color-2);
}

.lock-checkbox:checked + .lock-slider::before {
    transform: translateX(30px);
}

.lock-label {
    color: var(--white-2);
    font-weight: 600;
    font-size: 16px;
}


.fa-trash-can {
    color: red;
    cursor: pointer;
}

.fa-down-long {
    cursor: pointer;
}

.fa-up-long {
    cursor: pointer;
}


/* SCOREBOARD STYLING */
.scoreboard {
    padding: 20px;
    width: 100%;
    position: relative;
}

.game-progress {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.progress-info {
    margin-bottom: 15px;
}

.progress-text {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--white);
}

.progress-bar-container {
    width: 100%;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-2), var(--color-1));
    border-radius: 8px;
    transition: width 0.5s ease-out;
    min-width: 0;
}

.scoreboard-list-header {
    color: var(--white);
    font-size: 1.5em;
    font-weight: 600;
    margin: 25px 0 20px 0;
    text-align: left;
}

.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scoreboard-player {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.scoreboard-player:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-1);
    transform: translateY(-2px);
}

.scoreboard-player.current-player {
    background: rgba(45, 159, 255, 0.1);
    border-color: var(--color-1);
}

.player-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.player-rank {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--color-2);
    min-width: 60px;
}

.player-avatar-container {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.scoreboard-avatar-container {
    position: relative;
}

.scoreboard-avatar-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--color-1);
    display: block;
    object-fit: cover;
}

.scoreboard-avatar-initial {
    background-color: rgba(45, 159, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--color-1);
}

.scoreboard-avatar-creator .scoreboard-avatar-image {
    border-color: #FFD700;
}

.player-details {
    flex: 1;
    margin: 0 15px;
}

.player-name {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--white);
}

.player-points {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--color-1);
    min-width: 80px;
    text-align: right;
}


/* PLAYING TRACK STYLING */
.playing-track {
    padding: 20px;
    width: 100%;
    position: relative;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-theme-header {
    position: relative;
    color: var(--white-2);
    margin: 0;
    font-size: 1.2em;
    font-weight: 400;
    font-family: 'Pacifico', cursive;
    text-align: left;
    z-index: 50;
}

.playing-track h1 {
    color: var(--color-1);
    font-size: 3em;
    margin-bottom: 40px;
}

.playing-track .track-info {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    max-width: 600px;
    width: 100%;
}

.track-title {
    color: var(--white);
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.track-player {
    color: var(--white-2);
    font-size: 1.1em;
    opacity: 0.8;
}

.countdown {
    margin: 40px 0;
}

.countdown-number {
    font-size: 8em;
    font-weight: bold;
    color: var(--color-2);
    text-shadow: 0 0 20px var(--color-2);
    animation: countdownPulse 1s ease-in-out;
    width: 100%;
}

@keyframes countdownPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.playing-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.playing-animation {
    width: 60px;
    height: 60px;
    border: 4px solid var(--color-1);
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.playing-indicator p {
    font-size: 1.4em;
    color: var(--white);
    font-weight: 600;
}

/* GAME STYLING */
.game-status {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    transition: height 0.3s ease-out;
    z-index: 10000;
}

.game-status-connected {
    height: 3px;
    background-color: darkgreen;
}

.game-status-connected.hiding {
    height: 0;
}

.game-status-disconnected {
    height: 30px;
    background-color: red;
    padding-top: 5px;
    font-size: 10pt;
}

.game-status-disconnected > a {
    cursor: pointer;
    text-decoration: underline;
}

/* Media query for larger devices (tablets and desktop) */
@media (min-width: 769px) {
    /* Show hamburger menu on larger screens */
    .hamburger-container {
        display: block;
    }

    /* Hide bottom navigation on larger screens */
    .bottom-nav {
        display: none !important;
    }
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        padding-bottom: 4.5rem; /* Space for bottom nav */
    }

    /* Hide hamburger menu on mobile */
    .hamburger-container {
        display: none;
    }

    /* Show bottom navigation on mobile */
    .bottom-nav {
        display: flex;
    }

    h1 {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

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

    /* Account Setup Mobile Styles */
    .account-setup-container {
        max-width: 100%;
        padding: 0;
        margin-bottom: 1rem;
    }

    .account-setup-form {
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 20px;
    }

    .form-field {
        margin-bottom: 1.2rem;
    }

    .field-label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .field-helper {
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }

    .account-input {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }

    .file-input {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }

    .file-input::-webkit-file-upload-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        margin-right: 0.6rem;
    }

    .account-setup-form .button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Profile Page Mobile Styles */
    .error-message.profile-error,
    .success-message.profile-success {
        margin: 1.2rem 0;
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .avatar-image {
        width: 80px;
        height: 80px;
    }

    .avatar-initial-large {
        font-size: 30px;
    }

    .delete-avatar-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .button-logout {
        margin-top: 1.2rem;
    }

    /* Game Setup Mobile Styles */
    .game-setup-container {
        max-width: 100%;
        padding: 0;
        margin-bottom: 1rem;
    }

    .game-setup-form {
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 20px;
    }

    .game-input {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }

    .game-setup-form .button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Join Game Banner Mobile Styles */
    .game-banner {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
        border-radius: 15px;
    }

    .banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .banner-theme {
        font-size: 1rem;
        text-align: center;
    }

    .banner-invite-button {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .banner-passcode-info {
        font-size: 0.85rem;
        padding-top: 0.8rem;
        text-align: center;
    }

    .join-game-container {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }

    .player-tracks {
        margin: 1.2rem 0;
    }

    .player-tracks p {
        padding: 0.7rem 0.8rem;
        margin-bottom: 0.7rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }

    .player-tracks i {
        padding: 0.25rem;
    }

    .container {
        flex-direction: column;
        gap: 2rem;
    }

    .container::after {
        height: 2px;
        width: 80%;
        left: 50%;
        top: calc(50% - 30px);
        transform: translate(-50%, -50%);
        background: linear-gradient(to right, transparent, var(--color-1), transparent);
    }

    .dropdown-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(45, 159, 255, 0.1));
        backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateX(-100%);
        border: none;
    }

    .dropdown-menu.show {
        transform: translateX(0);
    }

    .dropdown-menu ul {
        text-align: center;
        padding: 0;
    }

    .dropdown-menu li {
        margin: 20px 0;
    }

    .dropdown-menu a {
        font-size: 24px;
        padding: 20px;
        justify-content: center;
        border-radius: 8px;
        margin: 0 20px;
    }

    .dropdown-menu a:hover {
        background-color: rgba(45, 159, 255, 0.2);
        transform: translateX(5px);
    }

    .profile-image {
        width: 40px;
        height: 40px;
        margin-right: 16px;
    }

    /* Hamburger menu larger clickable area on mobile */
    .hamburger-menu::before {
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
    }

    /* Add more spacing between sections on mobile */
    .section {
        padding: 1.5rem;
    }

    /* Add more space for the join game section */
    .join-game {
        margin-top: 1rem;
    }
    
    /* Scoreboard mobile adjustments */
    .scoreboard {
        padding: 10px;
    }

    .game-progress {
        padding: 10px;
        margin-bottom: 15px;
    }

    .progress-text {
        font-size: 0.85em;
    }

    .progress-bar-container {
        height: 10px;
    }

    .scoreboard-list-header {
        font-size: 1.2em;
        margin: 20px 0 15px 0;
    }

    .scoreboard-list {
        gap: 10px;
    }

    .scoreboard-player {
        padding: 10px;
        border-radius: 10px;
    }

    .player-info {
        margin-bottom: 0;
    }

    .player-rank {
        font-size: 1.2em;
        min-width: 40px;
    }

    .player-avatar-container {
        margin: 0 8px;
    }

    .scoreboard-avatar-image {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }

    .scoreboard-avatar-initial {
        font-size: 14px;
    }

    .player-details {
        margin: 0 8px;
    }

    .player-name {
        font-size: 0.95em;
    }

    .player-points {
        font-size: 1em;
        min-width: 60px;
    }

    /* Lobby mobile adjustments */
    .lobby-users-header {
        font-size: 1.2em;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    /* Playing track mobile adjustments */
    .playing-track {
        padding: 10px;
        min-height: 60vh;
    }

    .playing-track h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .playing-track .track-info {
        padding: 15px;
        margin-bottom: 20px;
    }

    .track-title {
        font-size: 1.1em;
        margin-bottom: 8px;
    }

    .track-player {
        font-size: 0.9em;
    }

    .countdown {
        margin: 20px 0;
    }

    .countdown-number {
        font-size: 4em;
    }

    .playing-animation {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .playing-indicator p {
        font-size: 1em;
    }

    /* Guess grid mobile adjustments */
    .my-tune-section {
        margin-bottom: 15px;
    }

    .my-tune-button {
        padding: 10px 20px;
        font-size: 0.9em;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .guess-grid {
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
        margin-top: 12px;
    }

    .guess-player {
        padding: 8px;
        min-height: 80px;
        border-radius: 10px;
    }

    .guess-avatar-container {
        margin-bottom: 6px;
    }

    .guess-avatar-image {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }

    .guess-avatar-initial {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .guess-player-name {
        font-size: 0.75em;
    }

    /* Guess result mobile adjustments */
    .guess-result {
        margin-top: 20px;
        padding: 0 10px;
    }

    .guess-feedback {
        padding: 10px 12px;
        border-radius: 10px;
        gap: 10px;
    }

    .result-icon {
        font-size: 1.3em;
    }

    .result-text {
        font-size: 0.8em;
        line-height: 1.3;
    }

    /* Final results mobile adjustments */
    .final-results {
        margin-top: 20px;
        padding: 0 10px;
    }

    .final-results-container {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .final-results-container h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .correct-answer h3 {
        font-size: 1.3em;
    }

    .correct-answer .track-info p {
        font-size: 0.9em;
    }

    .points-earned {
        padding: 12px;
        border-radius: 10px;
    }

    .points-icon {
        font-size: 1.8em;
        margin-bottom: 6px;
    }

    .points-text {
        font-size: 1em;
    }

    .total-points {
        font-size: 0.95em;
    }

    .final-results {
        margin-top: 10px;
        padding: 0 8px;
    }

    .final-results-container {
        padding: 8px;
        border-radius: 10px;
    }

    .final-results-container h2 {
        font-size: 0.95em;
        margin-bottom: 6px;
    }

    .final-results-grid {
        gap: 6px;
        margin-bottom: 6px;
    }

    .final-results-section {
        padding: 6px;
    }

    .section-header {
        font-size: 0.7em;
        margin-bottom: 4px;
    }

    .section-content {
        gap: 3px;
    }

    .result-item {
        font-size: 0.7em;
    }

    .item-label {
        font-size: 0.85em;
    }

    .item-value {
        max-width: 55%;
    }

    .redirect-message {
        font-size: 0.7em;
        margin-top: 4px;
    }

    /* Guessing timer mobile adjustments */
    .guessing-timer {
        width: 60px;
        height: 60px;
        top: 0;
        right: 0.5rem;
    }

    .timer-circle-bg,
    .timer-circle-progress {
        stroke-width: 3;
    }

    .timer-number {
        font-size: 1.1em;
    }

    /* Start tune section mobile adjustments */
    .start-tune-section {
        margin: 20px 0;
    }

    /* Final game message mobile adjustments */
    .final-game-message {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 15px;
    }

    .game-complete {
        font-size: 1.3em;
        margin-bottom: 12px;
    }

    .winner-announcement {
        font-size: 1.1em;
    }

    .winner-announcement.winner-celebration {
        padding: 15px;
        margin-top: 12px;
        border-radius: 12px;
    }

    /* Player guess container mobile adjustments */
    .player-guess-container {
        padding: 12px;
        margin-top: 12px;
        border-radius: 12px;
    }

    .player-guess-container h3 {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    /* Artist song guess mobile adjustments */
    .artist-song-guess {
        padding: 12px;
        margin-top: 12px;
        border-radius: 12px;
    }

    .artist-song-guess h3 {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    .artist-song-inputs {
        gap: 8px;
        margin-bottom: 0;
    }

    .input-group {
        gap: 4px;
    }

    .input-group label {
        font-size: 0.8rem;
    }

    .input-group .input-with-button input,
    .input-group .input-with-button select {
        font-size: 0.85rem;
        padding: 0.6rem 2.5rem 0.6rem 0.8rem;
    }

    .input-group .input-with-button .check-individual-button {
        font-size: 1rem;
        padding: 0.3rem 0.5rem;
        right: 0.3rem;
    }

    /* Game Rules mobile adjustments */
    .game-rules-section {
        padding: 20px;
        margin-top: 30px;
    }
    
    .rules-header h2 {
        font-size: 1.5rem;
    }
    
    .rules-subtitle {
        font-size: 1rem;
    }
    
    .rules-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }
    
    .rule-card {
        padding: 20px;
    }
    
    .rule-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .rule-card h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .rule-card li {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .point-badge {
        font-size: 0.8rem;
        padding: 3px 6px;
        min-width: 25px;
    }
}

/* Extra small mobile devices (e.g., iPhone SE: 375px) */
@media (max-width: 400px) {
    body {
        padding: 0.8rem;
        padding-bottom: 4.5rem; /* Space for bottom nav */
    }

    /* Bottom nav adjustments for extra small screens */
    .bottom-nav {
        padding: 0.4rem 0;
        padding-bottom: calc(0.4rem + env(safe-area-inset-bottom));
    }

    .bottom-nav-item {
        padding: 0.4rem 0.3rem;
    }

    .bottom-nav-item i {
        font-size: 1.2rem;
    }

    .bottom-nav-item span {
        font-size: 0.65rem;
    }

    h1 {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }

    h2 {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .account-setup-container {
        margin-bottom: 0.5rem;
    }

    .account-setup-form {
        padding: 1.2rem;
        margin-top: 0.8rem;
    }

    .form-field {
        margin-bottom: 1rem;
    }

    .field-label {
        font-size: 0.85rem;
    }

    .field-helper {
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }

    .account-input {
        padding: 0.65rem 0.9rem;
        font-size: 0.9rem;
    }

    .file-input {
        padding: 0.65rem 0.9rem;
        font-size: 0.9rem;
    }

    .file-input::-webkit-file-upload-button {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
        margin-right: 0.5rem;
    }

    .account-setup-form .button {
        padding: 0.75rem 1.2rem;
        font-size: 0.95rem;
    }

    /* Profile Page Extra Small Mobile */
    .error-message.profile-error,
    .success-message.profile-success {
        margin: 1rem 0;
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    .avatar-image {
        width: 70px;
        height: 70px;
        border: 2px solid var(--color-1);
    }

    .avatar-initial-large {
        font-size: 26px;
    }

    .delete-avatar-btn {
        width: 26px;
        height: 26px;
        font-size: 10px;
        border: 2px solid var(--white);
    }

    .button-logout {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
        margin-top: 1rem;
    }

    .game-setup-container {
        margin-bottom: 0.5rem;
    }

    .game-setup-form {
        padding: 1.2rem;
        margin-top: 0.8rem;
    }

    .game-input {
        padding: 0.65rem 0.9rem;
        font-size: 0.9rem;
    }

    .game-setup-form .button {
        padding: 0.75rem 1.2rem;
        font-size: 0.95rem;
    }

    /* Join Game Banner Extra Small Mobile */
    .game-banner {
        padding: 1rem;
        margin-bottom: 1.2rem;
    }

    .banner-content {
        gap: 0.7rem;
        margin-bottom: 0.7rem;
    }

    .banner-theme {
        font-size: 0.9rem;
    }

    .banner-invite-button {
        padding: 0.65rem 0.9rem;
        font-size: 0.85rem;
    }

    .banner-passcode-info {
        font-size: 0.8rem;
        padding-top: 0.7rem;
    }

    .join-game-container {
        padding: 0.6rem;
        margin-bottom: 0.5rem;
    }

    .player-tracks {
        margin: 1rem 0;
    }

    .player-tracks p {
        padding: 0.6rem 0.7rem;
        margin-bottom: 0.6rem;
        font-size: 0.85rem;
        gap: 0.5rem;
        border-radius: 8px;
    }

    .player-tracks i {
        padding: 0.2rem;
        font-size: 0.9rem;
    }

    .button {
        font-size: 0.95rem;
        padding: 0.7rem 1.5rem;
    }

    input, select {
        font-size: 0.95rem;
        padding: 0.7rem 1.2rem;
    }

    .notification-banner {
        max-width: 90%;
        min-width: auto;
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .hamburger-container {
        left: 10px;
        top: 10px;
    }
}

/* Guess grid styling */
.my-tune-button {
    background: linear-gradient(45deg, var(--color-1), var(--color-3));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 15px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 5px 15px var(--color-1-dark);
}

.my-tune-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--color-1-dark-2);
}

.my-tune-button:active {
    transform: translateY(1px);
}

.guess-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.guess-player {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    justify-content: center;
}

.guess-player:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.guess-player.selected {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-color: #4CAF50;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.guess-player.selected:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

.guess-avatar-container {
    margin-bottom: 8px;
}

.guess-avatar-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

.guess-player:hover .guess-avatar-image {
    border-color: rgba(255, 255, 255, 0.6);
}

.guess-player.selected .guess-avatar-image {
    border-color: white;
}

.guess-avatar-initial {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

.guess-player:hover .guess-avatar-initial {
    border-color: rgba(255, 255, 255, 0.6);
}

.guess-player.selected .guess-avatar-initial {
    border-color: white;
}

.guess-player-name {
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.guess-player:hover .guess-player-name {
    color: white;
}

.guess-player.selected .guess-player-name {
    color: white;
}

/* Guess result styling */
.guess-result {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Green flash animation for correct answers */
@keyframes greenFlash {
    0% {
        background-color: rgba(76, 175, 80, 0);
    }
    5% {
        background-color: rgba(76, 175, 80, 0.3);
    }
    100% {
        background-color: rgba(76, 175, 80, 0);
    }
}

.correct-flash {
    animation: greenFlash 0.5s ease-out;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

/* Red flash animation for incorrect answers */
@keyframes redFlash {
    0% {
        background-color: rgba(255, 107, 107, 0);
    }
    5% {
        background-color: rgba(255, 107, 107, 0.3);
    }
    100% {
        background-color: rgba(255, 107, 107, 0);
    }
}

.incorrect-flash {
    animation: redFlash 0.5s ease-out;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

/* Artist and Song Guess Component */
/* Player Guess Container */
.player-guess-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    margin-top: 15px;
    max-width: 500px;
    width: 100%;
}

.player-guess-container h3 {
    color: var(--color-2);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.artist-song-guess {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    margin-top: 15px;
    max-width: 500px;
    width: 100%;
}

.artist-song-guess h3 {
    color: var(--color-2);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.artist-song-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.input-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-group label {
    color: var(--white-2);
    font-weight: 500;
    font-size: 0.85rem;
}

.result-checkbox {
    font-size: 1.2rem;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: bold;
}

.result-checkbox.correct {
    background-color: rgba(45, 255, 181, 0.2);
    color: var(--color-2);
}

.result-checkbox.incorrect {
    background-color: rgba(255, 45, 219, 0.2);
    color: var(--color-3);
}

.input-group .input-with-button {
    position: relative;
    width: 100%;
    display: block;
}

.input-group .input-with-button input,
.input-group .input-with-button select {
    padding: 0.7rem 3rem 0.7rem 1rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--color-1);
    border-radius: 12px;
    color: var(--white);
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    display: block;
}

.input-group .input-with-button select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
    cursor: pointer;
}

.input-group input {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--color-1);
    border-radius: 12px;
    color: var(--white);
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--color-2);
    background: rgba(255, 255, 255, 0.15);
}

.input-group input.correct {
    border-color: var(--color-2);
    background-color: rgba(45, 255, 181, 0.15);
    box-shadow: 0 0 15px rgba(45, 255, 181, 0.3);
}

.input-group input.incorrect {
    border-color: var(--color-3);
    background-color: rgba(255, 45, 219, 0.15);
    box-shadow: 0 0 15px rgba(255, 45, 219, 0.3);
}

.input-group input.pending-red {
    border-color: var(--color-3);
    background-color: rgba(255, 45, 219, 0.1);
    box-shadow: 0 0 10px rgba(255, 45, 219, 0.2);
}

.input-group .input-with-button .check-individual-button {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(45deg, var(--color-2), var(--color-1));
    color: var(--black);
    padding: 0.4rem 0.6rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.input-group .input-with-button .check-individual-button:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(45, 255, 181, 0.4);
}

.input-group .input-with-button .check-individual-button:disabled {
    background: var(--grey);
    color: var(--white-2);
    cursor: not-allowed;
    opacity: 0.5;
}

.check-artist-song-button {
    background: linear-gradient(45deg, var(--color-2), var(--color-1));
    color: var(--black);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.check-artist-song-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 255, 181, 0.4);
}

.check-artist-song-button:disabled {
    background: var(--grey);
    color: var(--white-2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.artist-song-result {
    margin-top: 15px;
    text-align: center;
}

.result-summary {
    margin-bottom: 15px;
}

.points-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.points-earned {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-2);
    text-shadow: 0 0 10px rgba(45, 255, 181, 0.5);
}

.points-detail {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.point-item {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.point-item.correct {
    background-color: rgba(45, 255, 181, 0.2);
    color: var(--color-2);
    border: 1px solid var(--color-2);
}

.point-item.incorrect {
    background-color: rgba(255, 45, 219, 0.2);
    color: var(--color-3);
    border: 1px solid var(--color-3);
}

.point-item.bonus {
    background-color: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid #ffd700;
    animation: bonus-glow 1.5s infinite alternate;
}

@keyframes bonus-glow {
    from {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }
    to {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    }
}

.perfect-score {
    color: var(--color-2);
    font-weight: 600;
    font-size: 1.1rem;
}

.partial-score {
    color: var(--white-2);
    font-weight: 500;
    font-size: 1rem;
}

.correct-answer {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    font-size: 0.9rem;
    color: var(--white-2);
}

.guess-feedback {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    max-width: 500px;
    text-align: left;
    border: 2px solid;
    animation: resultAppear 0.5s ease-out;
}

.guess-feedback.correct {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.guess-feedback.incorrect {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.3);
}

.result-icon {
    font-size: 2em;
    margin-bottom: 0;
    flex-shrink: 0;
    line-height: 1;
}

.result-text {
    font-size: 1em;
    font-weight: 600;
    color: white;
    line-height: 1.4;
    flex: 1;
}

@keyframes resultAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Final results styling */
.final-results {
    margin-top: 40px;
    display: flex;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.final-results-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: resultAppear 0.5s ease-out;
}

.final-results-container h2 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--color-2);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.final-results-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.final-results-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--color-1);
    margin-bottom: 6px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
}

.item-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
}

.item-value {
    color: white;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.item-value.correct {
    color: #4CAF50;
}

.item-value.incorrect {
    color: #ff6b6b;
}

.item-value.highlight {
    color: var(--color-2);
}

.final-results-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.final-results-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.final-results-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.final-results-value {
    font-size: 1em;
    color: white;
    font-weight: 600;
}

.final-results-value.correct {
    color: #4CAF50;
}

.final-results-value.incorrect {
    color: #ff6b6b;
}

.final-results-value.highlight {
    color: var(--color-2);
    font-size: 1.1em;
}

.correct-answer {
    margin-bottom: 0;
}

.correct-answer p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.correct-answer h3 {
    font-size: 2em;
    color: #4CAF50;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.correct-answer .track-info {
    margin-bottom: 30px;
}

.correct-answer .track-info p {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.user-result {
    margin-bottom: 0;
}

.points-earned {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid;
    margin-bottom: 15px;
}

.points-earned.correct {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.points-earned.incorrect {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.points-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.points-text {
    font-size: 1.4em;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.total-points {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.8);
}

.redirect-message {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    margin-bottom: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.redirect-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Guessing timer styling */
.guessing-timer {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    width: 70px;
    height: 70px;
    z-index: 100;
}

.timer-circle {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: rgba(76, 175, 80, 0.2);
    stroke-width: 4;
}

.timer-circle-progress {
    fill: rgba(76, 175, 80, 0.1);
    stroke: #4CAF50;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease, fill 0.3s ease;
}

.timer-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.timer-number.urgent {
    color: #ff6b6b;
    animation: urgentPulse 0.5s ease-in-out infinite;
}

.guessing-timer:has(.timer-number.urgent) .timer-circle {
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.4));
}

.guessing-timer:has(.timer-number.urgent) .timer-circle-progress {
    stroke: #ff6b6b;
    fill: rgba(255, 107, 107, 0.1);
}

@keyframes urgentPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Disconnected player styles */
.disconnected {
    opacity: 0.5;
    filter: grayscale(80%);
}

.scoreboard-player.disconnected {
    border-color: var(--grey);
    background: rgba(128, 128, 128, 0.1);
}

.scoreboard-player.disconnected .player-name {
    color: var(--grey);
}

.scoreboard-avatar-container.disconnected,
.guess-avatar-container.disconnected {
    opacity: 0.6;
}

.scoreboard-avatar-image.disconnected,
.guess-avatar-image.disconnected,
.guess-avatar-initial.disconnected {
    filter: grayscale(100%);
    border-color: var(--grey) !important;
}

.guess-player.disconnected {
    background: rgba(128, 128, 128, 0.1);
    border-color: var(--grey);
}

.guess-player.disconnected .guess-player-name {
    color: var(--grey);
}

.guess-player.disconnected:hover {
    background: rgba(128, 128, 128, 0.15);
    border-color: var(--grey);
    transform: none;
    box-shadow: none;
}

/*!* Desktop hover behavior *!*/
/*@media (min-width: 769px) {*/
/*    .hamburger-container:hover .dropdown-menu {*/
/*        opacity: 1;*/
/*        visibility: visible;*/
/*        transform: translateY(0);*/
/*    }*/

/*    .hamburger-container:hover .hamburger-menu .line:nth-child(1) {*/
/*        transform: rotate(45deg) translate(7.5px, 7.5px);*/
/*    }*/

/*    .hamburger-container:hover .hamburger-menu .line:nth-child(2) {*/
/*        opacity: 0;*/
/*    }*/

/*    .hamburger-container:hover .hamburger-menu .line:nth-child(3) {*/
/*        transform: rotate(-45deg) translate(7.5px, -7.5px);*/
/*    }*/
/*}*/

/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}


.loading-message {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* tsParticles confetti container - styles handled by library */

/* Winner celebration styles */
.winner-celebration {
    position: relative;
    animation: celebrate 2s ease-in-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.05); }
}

/* Final game message animation and styling */
.final-game-message {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    animation: slideInUp 1s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.game-complete {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--color-2);
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.winner-announcement {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.winner-announcement.winner-celebration {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(255, 215, 0, 0.1));
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 20px;
    margin-top: 15px;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.4);
    position: relative;
    overflow: hidden;
    font-weight: bold;
}

.winner-announcement.winner-celebration::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700, #FFA500);
    border-radius: 15px;
    z-index: -1;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes slideInUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Image Cropper Overlay */
.image-cropper-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-cropper-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.image-cropper-container {
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.98), rgba(45, 159, 255, 0.15));
    border: 2px solid rgba(45, 159, 255, 0.3);
    border-radius: 20px;
    padding: 1.5rem;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-cropper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.image-cropper-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--white);
}

.image-cropper-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.image-cropper-close:hover {
    opacity: 1;
}

.image-cropper-body {
    flex: 1;
    min-height: 250px;
    max-height: 50vh;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
}

.image-cropper-body img {
    display: block;
    max-width: 100%;
}

.image-cropper-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.image-cropper-btn {
    background: rgba(45, 159, 255, 0.2);
    border: 1px solid rgba(45, 159, 255, 0.3);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.image-cropper-btn:hover {
    background: rgba(45, 159, 255, 0.4);
    border-color: var(--color-1);
}

.image-cropper-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.button-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile adjustments for cropper */
@media (max-width: 768px) {
    .image-cropper-container {
        padding: 1rem;
        max-height: 85vh;
    }

    .image-cropper-body {
        min-height: 200px;
        max-height: 45vh;
    }

    .image-cropper-actions {
        flex-direction: column;
    }

    .image-cropper-actions .button {
        width: 100%;
    }
}
