body {
    margin: 0;
    padding: 0;
    background: #0f172a;
    color: white;
    font-family: Arial, sans-serif;
}

.screen {
    display: none;
    text-align: center;
    padding: 20px;
    min-height: 100vh;

    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.active {
    display: flex;
}

h1, h2, h3 {
    margin-bottom: 20px;
}

input {
    padding: 12px;
    margin: 10px 0;
    width: 90%;
    max-width: 300px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
}

button {
    padding: 12px 20px;
    margin: 8px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

#fingerButtons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

#fingerButtons button {
    flex: 1 1 40%;
    max-width: 120px;
}

.joinSection {
    margin-top: 20px;
}

#scoreboardCard{
  position:fixed;
  top:10px;
  left:50%;
  transform:translateX(-50%);
  width:95%;
  max-width:900px;

background: #121212;
  color: white;
  padding: 15px;
  border-radius:16px;


  box-shadow:0 6px 20px rgba(0,0,0,0.2);

  font-family:sans-serif;
}

.scoreRow1{
  display:flex;
  justify-content:space-between;
  font-size:14px;
  margin-bottom:5px;
}

.scoreRow2{
  display:flex;
  justify-content:space-between;
  font-weight:bold;
  margin-bottom:8px;
}

.scoreRow3{
  text-align:center;
  font-size:28px;
  font-weight:bold;
  margin-bottom:10px;
}

.scoreRow4{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  font-size:14px;
  margin-bottom:10px;
}

.scoreItem{
  margin-right:10px;
  font-weight:600;
}

.scoreRow5{
  display:flex;
  justify-content:center;
  gap:6px;
}

#scoreboardCard{
display:flex;
flex-direction:column;
gap:8px;
}

.fingerBtn.selected{
background:#00AE00;
color:white;
}

.ballBox{
  width:30px;
  height:30px;
  background:#222;
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  font-weight:bold;
}

.ballFlash{
  animation:ballFlash 0.5s;
}

@keyframes ballFlash{
  0%{transform:scale(1.5);background:#00FF00}
  100%{transform:scale(1)}
}

.lobbyCard{
background:#121212;
padding:25px;
border-radius:16px;
width:90%;
max-width:400px;
box-shadow:0 8px 25px rgba(0,0,0,0.4);
}

.roomCodeBox{
background:#1f2937;
padding:10px;
border-radius:8px;
margin-bottom:20px;
font-weight:bold;
}

.teamRow{
display:flex;
justify-content:space-between;
gap:15px;
margin-bottom:20px;
}

.teamBox{
flex:1;
background:#1f2937;
padding:15px;
border-radius:10px;
}

#themeToggle{
position:fixed;
top:15px;
right:15px;
z-index:999;
background:#1f2937;
color:white;
border:none;
padding:8px 12px;
border-radius:8px;
cursor:pointer;
}

body.light{
background:#f3f4f6;
color:#111;
}

body.light #scoreboardCard{
background:white;
color:#111;
}

body.light .lobbyCard{
background:white;
color:#111;
}

body.light .teamBox{
background:#e5e7eb;
}

body.light .roomCodeBox{
background:#e5e7eb;
}
