/* ==========================================================================
   Design Tokens & Modern Theme Variables
   ========================================================================== */
:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #111726;
  --bg-tertiary: #192238;
  --card-bg: rgba(18, 24, 40, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.16);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.35);
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --gradient-neon: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --gradient-hub: radial-gradient(circle at 35% 35%, #ffd166 0%, #e65100 65%, #6a040f 100%);
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 36px -8px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ambient dynamic background lighting */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #6366f1, transparent);
  top: -100px;
  left: -80px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #f59e0b, transparent);
  bottom: -150px;
  right: -100px;
}

.glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #ec4899, transparent);
  top: 30%;
  left: 45%;
  opacity: 0.25;
}

/* Confetti canvas */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.app-layout {
  position: relative;
  z-index: 1;
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
}

/* Main Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 28px;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gradient-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.brand-icon svg {
  width: 28px;
  height: 28px;
  animation: slowSpin 20s linear infinite;
}

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #ffffff 30%, #ffd166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.glass-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ==========================================================================
   Content Grid (3 Columns)
   ========================================================================== */
.content-grid {
  display: grid;
  grid-template-columns: 360px 1fr 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1280px) {
  .content-grid {
    grid-template-columns: 320px 1fr 320px;
  }
}

@media (max-width: 1080px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Panels */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: border-color 0.25s ease;
}

.card:hover {
  border-color: var(--card-border-hover);
}

.panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 14px;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.panel-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ==========================================================================
   Left Panel: User Form & List
   ========================================================================== */
.input-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-wrapper {
  display: flex;
  gap: 8px;
}

.text-input {
  flex: 1;
  background: rgba(10, 14, 25, 0.8);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.text-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.text-input::placeholder {
  color: var(--text-dim);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.form-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-primary {
  background: var(--gradient-gold);
  color: #000;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger-ghost {
  background: rgba(244, 63, 94, 0.08);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger-ghost:hover {
  background: rgba(244, 63, 94, 0.18);
  color: #f43f5e;
}

.quick-tools {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* User List */
.user-list-wrapper {
  position: relative;
  max-height: 480px;
  min-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.user-list-wrapper::-webkit-scrollbar {
  width: 6px;
}

.user-list-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.user-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.user-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.user-name-text {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-delete-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.user-delete-btn:hover {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.15);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.82rem;
  max-width: 240px;
  line-height: 1.4;
}

/* ==========================================================================
   Center Panel: Wheel Stage
   ========================================================================== */
.wheel-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
}

.wheel-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Top Pointer Indicator */
.pointer-wrapper {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-pointer {
  position: relative;
  width: 44px;
  height: 52px;
  transform-origin: 50% 10%;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
  transition: transform 0.05s ease-out;
}

.pointer-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  background: radial-gradient(circle at 35% 35%, #ffd166, #d97706);
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  z-index: 2;
}

.pointer-pin {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 38px solid #ff416c;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  border-radius: 4px;
}

.pointer-pin::after {
  content: '';
  position: absolute;
  top: -38px;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 28px solid #ff4b2b;
}

/* Canvas Container */
.canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.65));
}

/* Center Spin Hub */
.wheel-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.wheel-center-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.wheel-center-btn:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.hub-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.hub-core {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--gradient-hub);
  border: 4px solid #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.4), 0 8px 24px rgba(0, 0, 0, 0.6);
}

.hub-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  line-height: 1.1;
}

.hub-sub {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffd166;
  letter-spacing: 0.1em;
}

/* Wheel Controls */
.wheel-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
}

.btn-spin {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #ffffff;
  font-size: 1.15rem;
  padding: 16px 48px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
  letter-spacing: 0.05em;
  width: 100%;
  max-width: 320px;
}

.btn-spin:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.6);
}

.btn-spin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.spin-icon {
  font-size: 1.3rem;
}

.spin-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ==========================================================================
   Right Panel: History Log
   ========================================================================== */
.history-stats {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.history-list-wrapper {
  max-height: 480px;
  min-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-list-wrapper::-webkit-scrollbar {
  width: 6px;
}

.history-list-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideIn 0.3s ease-out;
}

.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-round {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
}

.history-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.history-winner-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
}

.history-winner-icon {
  font-size: 1.1rem;
}

.history-winner-name {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.95rem;
}

.history-participants-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
}

.history-participants-label {
  color: var(--text-dim);
  font-weight: 600;
}

.history-participants-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.history-user-tag {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.history-user-tag.tag-won {
  background: rgba(245, 158, 11, 0.2);
  color: #ffd166;
  font-weight: 600;
}

/* ==========================================================================
   Winner Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.hidden {
  display: none !important;
}

.modal-card {
  position: relative;
  background: #141b2d;
  border: 2px solid var(--accent-gold);
  border-radius: 28px;
  padding: 40px 32px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(245, 158, 11, 0.25);
  animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-close-icon-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.1);
}

@keyframes modalPop {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.modal-crown {
  font-size: 3.5rem;
  margin-bottom: 8px;
  animation: floatCrown 2.5s ease-in-out infinite;
}

@keyframes floatCrown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.modal-badge {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.modal-congrats {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 16px;
}

.winner-display {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffd166;
  text-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
  padding: 16px 20px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  word-break: break-word;
}

.winner-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions .btn {
  flex: 1;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 640px) {
  .app-layout {
    padding: 16px 12px;
    gap: 16px;
  }

  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
  }

  .brand-title {
    font-size: 1.25rem;
  }

  .panel {
    padding: 16px;
  }

  .wheel-stage {
    max-width: 340px;
  }

  .wheel-center-btn {
    width: 80px;
    height: 80px;
  }

  .hub-core {
    width: 68px;
    height: 68px;
  }

  .hub-text {
    font-size: 0.95rem;
  }

  .btn-spin {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .modal-actions {
    flex-direction: column;
  }
}

/* ==========================================================================
   Password Auth Modals
   ========================================================================== */
.modal-auth-card {
  max-width: 420px;
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 45px rgba(99, 102, 241, 0.25);
}

.modal-auth-icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.5));
}

.modal-auth-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.modal-auth-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.4;
}

.modal-hint-text code {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-gold);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.auth-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-password-input {
  width: 100%;
  padding-right: 48px;
}

.pwd-eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.pwd-eye-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-error-msg {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fb7185;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  animation: shake 0.35s ease;
}

.auth-success-msg {
  font-size: 0.82rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.shake-input {
  animation: shake 0.35s ease;
  border-color: #f43f5e !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
