.spy-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  width: 100%;
  gap: 15px;
  color: #fff;
  padding: 40px 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.spy-menu-landscape {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  justify-content: stretch;
}

.spy-col-left, .spy-col-right {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}

.spy-col-left h3 {
  margin-top: 0;
}

.spy-menu h3 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #ffbf3f;
}
.spy-btn {
  background: #006fd6;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  min-width: 200px;
}
.spy-btn:hover {
  transform: scale(1.03);
  background: #2eb67d;
}
.spy-btn.danger {
  background: #ef626c;
}
.spy-btn.danger:hover {
  background: #c53030;
}
.spy-input {
  padding: 12px;
  font-size: 1.1rem;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #17202a;
  color: #fff;
  width: 100%;
  max-width: 300px;
}
.spy-player-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  max-height: 200px;
  overflow-y: auto;
  margin: 10px 0;
  padding-right: 5px;
}
.spy-player-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.spy-player-row input {
  flex: 1;
}
.spy-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 15px;
  width: 100%;
  height: calc(100% - 60px);
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  margin-top: 60px;
}
.spy-card {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #475569, #17202a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  color: #ffbf3f;
  font-weight: bold;
  font-size: 1.5rem;
  text-align: center;
  position: relative;
  transition: transform 0.3s, border-color 0.3s;
  user-select: none;
}
.spy-card:hover {
  transform: translateY(-5px);
  border-color: #ffbf3f;
}
.spy-card.is-eliminated {
  opacity: 0.4;
  pointer-events: none;
  background: #111;
  color: #ef626c;
  border-color: #ef626c;
}
.spy-card-name {
  position: absolute;
  bottom: 15px;
  font-size: 1.1rem;
  color: #fff;
  background: rgba(0,0,0,0.6);
  padding: 4px 10px;
  border-radius: 6px;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spy-card.has-voted {
  border-color: #2eb67d;
}
.spy-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(16, 24, 32, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
  text-align: center;
}
.spy-header {
  position: absolute;
  top: 0;
  left: 0; right: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  z-index: 5;
  background: rgba(0,0,0,0.7);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.spy-word-reveal {
  font-size: 3.5rem;
  color: #2eb67d;
  margin: 30px 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.spy-hidden {
  display: none !important;
}
.spy-role-text {
  font-size: 1.2rem;
  color: #a0aec0;
  margin-bottom: 20px;
}
.spy-controls {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.spy-room-code {
  font-size: 2rem;
  color: #00b8ff;
  letter-spacing: 4px;
  font-weight: 800;
  background: #17202a;
  padding: 10px 20px;
  border-radius: 8px;
  margin: 10px 0;
}
.spy-voting-tally {
  margin-top: 10px;
  font-size: 1rem;
  color: #ffbf3f;
}

.spy-speaker-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  text-align: center;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.spy-speaker-title {
  font-size: 2rem;
  color: #a29bfe;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.spy-speaker-name {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 10px 20px rgba(0,0,0,0.3);
  margin-bottom: 40px;
  word-break: break-word;
  padding: 0 20px;
}

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