* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at top, #1f2547 0%, #10132a 65%);
  color: #f4f4fb;
  text-align: center;
}

h1 {
  font-size: 2rem;
  margin: 0;
}

.subtitle {
  color: #b7bce0;
  margin-top: -12px;
}

.buttons-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.big-btn {
  padding: 20px 36px;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.big-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(108, 92, 231, 0.45);
}

.big-btn.secondary {
  background: linear-gradient(135deg, #00b894, #55efc4);
  box-shadow: 0 8px 20px rgba(0, 184, 148, 0.35);
}

.card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 480px;
  width: 100%;
  backdrop-filter: blur(6px);
}

.room-code {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  background: linear-gradient(135deg, #ffeaa7, #fab1a0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 8px 0 4px;
}

.hint {
  font-size: 0.85rem;
  color: #9aa0c9;
}

.word-form {
  display: flex;
  gap: 10px;
  margin: 20px 0 14px;
}

input[type="text"] {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: white;
  font-size: 1rem;
}

input[type="text"]:focus {
  outline: 2px solid #a29bfe;
}

.code-input {
  text-align: center;
  font-size: 1.6rem;
  letter-spacing: 0.4em;
  font-weight: 700;
}

button {
  font-family: inherit;
}

.btn {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: white;
  background: #6c5ce7;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.word-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.word-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 10px;
}

.word-list .remove {
  background: none;
  border: none;
  color: #ff7675;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 8px;
}

.go-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff7675, #fd79a8);
  box-shadow: 0 8px 20px rgba(253, 121, 168, 0.35);
}

.status {
  min-height: 22px;
  color: #ffeaa7;
  font-size: 0.9rem;
}

.error {
  color: #ff7675;
}

.wheel-wrap {
  position: relative;
  width: min(90vw, 400px);
  height: min(90vw, 400px);
  margin: 10px auto;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.5);
  transform: rotate(0deg);
}

.pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 28px solid #ffeaa7;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
  z-index: 5;
}

.hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffeaa7;
  box-shadow: 0 0 0 4px #10132a, 0 4px 8px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.result {
  font-size: 1.4rem;
  font-weight: 700;
  min-height: 34px;
  color: #55efc4;
}

.back-link {
  color: #b7bce0;
  font-size: 0.85rem;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.empty-wheel-msg {
  color: #9aa0c9;
  font-style: italic;
}
