* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: #121212;
  color: #f0f0f0;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  align-items: center;
}

.container {
  max-width: 1200px;
  width: 95%;
  padding: 1.5rem;
  text-align: center;
}

h1, h2, h3 {
  margin-bottom: 1rem;
}

.card {
  background-color: #1e1e1e;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
}


.card h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
  position: sticky;
  top: 0;
  background-color: #1e1e1e;
  z-index: 1;
  padding-bottom: 0.5rem;
}

input[type="text"],
input[type="number"] {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  background-color: #2b2b2b;
  color: #fff;
}

input::placeholder {
  color: #888;
}

button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  background-color: #4e9af1;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #347fd5;
}

.user-list {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1rem;
}

.user-list li {
  background-color: #2a2a2a;
  padding: 0.5rem;
  margin: 0.25rem 0;
  border-radius: 0.5rem;
}

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

.results li {
  background-color: #333;
  margin: 0.3rem 0;
  padding: 0.6rem;
  border-radius: 0.6rem;
}

.main-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.column {
  width: 100%;
}

@media (min-width: 768px) {
  .main-layout {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .column {
    flex: 1;
    margin-right: 1rem;
  }

  .column:last-child {
    margin-right: 0;
  }

  .host-only {
    max-width: 220px;
    flex-shrink: 0;
  }
}

.results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.card-flip {
  perspective: 1000px;
  width: 100px;
  height: 140px;
  margin-bottom: 2rem;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-flip.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 1rem;
  font-size: 1.8rem;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.card-front {
  background: #333;
  color: #aaa;
}

.card-back {
  background: #4e9af1;
  color: white;
  transform: rotateY(180deg);
}

.hidden {
  display: none !important;
}

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

.card-name {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #ccc;
}

.user-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2a2a2a;
  padding: 0.5rem;
  margin: 0.25rem 0;
  border-radius: 0.5rem;
}

@keyframes pop-in {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  80% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.checkmark {
  margin-left: 1rem;
  color: #00cc66;
  font-size: 1.1rem;
}

.checkmark-animate {
  animation: pop-in 0.4s ease-out;
}


#volume-float {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: #1e1e1e;
  padding: 0.75rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1000;
}

#volume-float input[type="range"] {
  width: 100px;
}

#volume-float button {
  background: none;
  border: none;
  color: #4e9af1;
  font-size: 1.2rem;
  cursor: pointer;
}