* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  :root {
    --bg: #1a1a2e;
    --card: #16213e;
    --accent: #e94560;
    --accent-hover: #ff6b6b;
    --text: #eee;
    --text-muted: #aaa;
    --wheel-colors: #3498db, #2ecc71, #f1c40f, #e74c3c, #9b59b6, #1abc9c, #e67e22, #34495e;
  }
  
  body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
  }
  
  .hidden {
    display: none !important;
  }
  
  .view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--card);
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .header h1 {
    font-size: 1.25rem;
    font-weight: 600;
  }
  
  .admin-link {
    color: var(--accent);
    text-decoration: none;
  }
  
  .admin-link:hover {
    color: var(--accent-hover);
  }
  
  .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }

  /* Trang chủ: bánh xe + danh sách bên cạnh */
  .wheel-main {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
  }
  .wheel-block {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .participants-sidebar {
    width: 100%;
    min-width: 320px;
    max-width: 420px;
    height: 800px;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
  }
  .participants-sidebar h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  .participants-sidebar .hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  .participants-sidebar .add-many {
    margin-bottom: 1rem;
  }
  .participants-sidebar .add-many textarea {
    width: 100%;
    height: 580px;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    color: var(--text);
    font-size: 0.95rem;
    resize: vertical;
    margin-bottom: 0.5rem;
  }
  .participants-sidebar .add-many .btn { margin-top: 15px; }
  
  /* Wheel – bánh xe to hơn, dễ nhìn */
  .wheel-container {
    position: relative;
    margin-bottom: 2rem;
  }
  
.wheel-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  border-top: 40px solid var(--accent);
    z-index: 10;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  }
  
.wheel {
  width: min(650px, 95vw);
  height: min(650px, 95vw);
  max-width: 650px;
  max-height: 650px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 10px var(--card), 0 0 0 14px rgba(255,255,255,0.1), 0 10px 40px rgba(0,0,0,0.4);
    transition: transform 20s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  }
  
  .wheel.spinning {
    pointer-events: none;
  }
  
  /* Nền bánh xe (màu từng ô) */
  .wheel-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
  }
  
  /* Lớp tên – chữ to, có nền nhẹ để đỡ rối */
  .wheel-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  
/* Tên theo hướng dọc (dọc theo bán kính ô) như ảnh mẫu */
.wheel-label {
  position: absolute;
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.95), 0 0 3px #000;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  letter-spacing: 0.02em;
}
  
  .spin-hint {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
  }
  
  .controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
    transition: background 0.2s;
  }
  
  .btn:hover {
    background: var(--accent-hover);
  }
  
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .btn-spin {
    font-size: 1.25rem;
    padding: 1rem 2.5rem;
  }
  
  .result {
    min-height: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2ecc71;
    text-align: center;
  }

  /* Nhập danh sách (trang chủ, không cần admin) */
  .participants-section {
    width: 100%;
    max-width: 480px;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card);
    border-radius: 12px;
  }
  .participants-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  .participants-section .hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  .participants-section textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    color: var(--text);
    font-size: 0.95rem;
    resize: vertical;
    margin-bottom: 1rem;
  }
  
  /* Admin */
  .admin-main {
    align-items: stretch;
    max-width: 520px;
    margin: 0 auto;
  }
  
  .login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background: var(--card);
    border-radius: 12px;
  }
  
  .login-form label {
    font-weight: 500;
  }
  
  .login-form input {
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    color: var(--text);
    font-size: 1rem;
  }
  
  .login-form input:focus {
    outline: none;
    border-color: var(--accent);
  }
  
  .error {
    color: #e74c3c;
    font-size: 0.9rem;
  }
  
  .admin-section {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
  }
  
  .admin-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .admin-section textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    color: var(--text);
    font-size: 0.95rem;
    resize: vertical;
    margin-bottom: 1rem;
  }
  
  .admin-section .hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .admin-section select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgb(199 20 35 / 20%);
  color: #f31414;
  font-size: 1rem;
  margin-bottom: 1rem;
}
  
  .admin-section .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .btn-primary { background: #2ecc71; }
  .btn-primary:hover { background: #27ae60; }
  .btn-secondary { background: #7f8c8d; }
  .btn-secondary:hover { background: #95a5a6; }
  .btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }
  .btn-ghost {
    background: transparent;
    color: var(--text-muted);
  }
  .btn-ghost:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
  }

  /* Modal người thắng + pháo hoa */
  .winner-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
  }
  .winner-overlay.hidden {
    display: none !important;
  }
  .confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1001;
    overflow: hidden;
  }
  .confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 1px;
    animation: confetti-fall 3.5s linear forwards;
  }
  @keyframes confetti-fall {
    0% {
      transform: translateY(-20px) rotate(0deg);
      opacity: 1;
    }
    100% {
      transform: translateY(100vh) rotate(720deg);
      opacity: 0;
    }
  }
  .winner-modal {
    position: relative;
    z-index: 1002;
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
  }
  .winner-modal-header {
    background: #27ae60;
    color: #fff;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
  }
  .winner-modal-body {
    background: #2c3e50;
    padding: 1.5rem 1.5rem 1.25rem;
  }
  .winner-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 1.25rem;
    text-transform: capitalize;
  }
  .winner-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
  }
  .winner-modal-actions .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
  }
