body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(135deg, #ff7eb3 0%, #ffb86c 28%, #ffe66d 55%, #4ecdc4 82%, #7209b7 100%);
  background-size: 260% 260%;
  animation: shift 16s ease infinite;
  padding: 22px 18px 46px;
}

@keyframes shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.container { max-width: 1060px; margin: 0 auto; position: relative; z-index: 2; }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 10px 22px;
  border: 3px solid #fff;
  box-shadow: 0 8px 0 rgba(43, 16, 85, 0.14);
  margin-bottom: 24px;
}

.nav-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ff4d8d, #ff6b35, #8338ec, #00c2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub { font-size: 0.9rem; opacity: 0.75; }

.music-btn {
  font-family: var(--font-display);
  font-weight: 700;
  color: #2b1055;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 999px;
  background: #d8f3dc;
  border: 2px solid #06d6a0;
}

.vol-slider { width: 74px; accent-color: #ff4d8d; }

.admin-link {
  font-family: var(--font-display);
  font-weight: 700;
  color: #8338ec;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f3e8ff;
  border: 2px solid #d8b4fe;
}

.hero {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 38px;
  padding: 36px 30px;
  border: 4px solid #fff;
  box-shadow: 0 14px 0 rgba(43, 16, 85, 0.16), 0 28px 50px rgba(43, 16, 85, 0.2);
  text-align: center;
}

.hero-emoji { font-size: 3.2rem; margin-bottom: 4px; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0 0 8px;
  line-height: 1.08;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--muted);
  margin: 0 auto 24px;
  max-width: 680px;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 22px 0 28px;
  text-align: left;
}

.mode-card {
  background: #faf5ff;
  border: 3px solid #d8b4fe;
  border-radius: 26px;
  padding: 18px 20px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.mode-card.active {
  background: linear-gradient(135deg, #fff0f6, #eef9ff);
  border-color: #ff4d8d;
  box-shadow: 0 7px 0 rgba(255, 77, 141, 0.25);
  transform: translateY(-2px);
}

.mode-card.disabled { opacity: 0.6; cursor: not-allowed; }
.mode-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mode-title { font-family: var(--font-display); font-size: 1.2rem; }
.mode-desc { margin: 8px 0 0; font-weight: 700; color: var(--muted); }
.mode-badge { font-size: 0.78rem; padding: 4px 10px; }

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 12px;
  align-items: stretch;
}

@media (max-width: 740px) { .actions-row { grid-template-columns: 1fr; } }

.action-panel {
  background: #fff;
  border-radius: 28px;
  padding: 24px;
  border: 3px solid #e9d5ff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.action-panel h2 { font-family: var(--font-display); margin: 0 0 8px; }
.action-panel p { font-weight: 700; color: var(--muted); margin: 0 0 18px; }

.btn-full { width: 100%; }
.btn-launch { font-size: 1.25rem; padding: 16px 28px; }

.code-input {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.35em;
  text-align: center;
  border-radius: 999px;
  border: 3px solid #00c2ff;
  outline: none;
  margin-bottom: 12px;
  color: var(--ink);
}

.pill {
  display: inline-block;
  background: #fff3b0;
  border: 2px solid #ffd60a;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 0.92rem;
}

.msg-status { margin-top: 10px; font-weight: 800; color: #8338ec; }
.msg-error { margin-top: 10px; font-weight: 800; color: #d00000; }
