@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Orbitron', monospace;
  display: flex;
  margin: 0;
  height: 100vh;
  background: linear-gradient(135deg, #1e3c72, #2a5298, #3b82f6);
  color: white;
  overflow: hidden;
}

.container {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
}

.wheel-container {
  position: relative;
  margin: 20px;
}

.wheel-outer {
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.3);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 50px rgba(255, 215, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.3); }
  to { box-shadow: 0 0 80px rgba(255, 215, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.3); }
}

.wheel {
  width: 560px;
  height: 560px;
  border-radius: 50%;
  position: relative;
  transform-origin: center;
  transition: transform cubic-bezier(0.25, 0.1, 0.25, 1) 2.5s;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.wheel svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: linear-gradient(45deg, #333, #666);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  z-index: 10;
  border: 3px solid #ffd700;
}

.triangle {
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 50px solid #ff0000;
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  z-index: 15;
  filter: drop-shadow(0 5px 10px rgba(255, 0, 0, 0.5));
}

.segment-text {
  font-family: 'Orbitron', monospace;
  font-weight: bold;
  font-size: 16px;
  fill: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.name-inputs {
  flex: 1;
  max-width: 350px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin: 20px;
  
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
}

.name-inputs h3 {
  margin-top: 0;
  color: #ffd700;
  text-align: center;
  font-size: 1.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.input-group {
  margin-bottom: 20px;
}

.input-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  margin-bottom: 15px;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.input-row input {
  flex: 1;
}

.add-btn {
  height: 50px;
  padding: 0 20px;
  white-space: nowrap;
  min-width: auto;
  border-radius: 0 25px 25px 0;
  border-left: none;
  background: rgba(0, 255, 65, 0.15);
  border-color: rgba(0, 255, 65, 0.4);
  color: rgba(0, 255, 65, 1);
  font-weight: 500;
  border-top: 1px solid rgba(0, 255, 65, 0.4);
  border-right: 1px solid rgba(0, 255, 65, 0.4);
  border-bottom: 1px solid rgba(0, 255, 65, 0.4);
}

.add-btn:hover {
  background: rgba(0, 255, 65, 0.25);
  border-color: rgba(0, 255, 65, 0.6);
}

#nameInput {
  width: 100%;
  height: 50px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-right: none;
  border-radius: 25px 0 0 25px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-family: 'Orbitron', monospace;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
  outline: none;
}

#nameInput:focus {
  border-color: rgba(0, 255, 65, 0.4);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1), 0 0 8px rgba(0, 255, 65, 0.3);
}

.buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.utility-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: flex-end;
  align-items: center;
}

.utility-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  opacity: 0.7;
  transform: scale(1);
}

.utility-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}



.header-name-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  margin: 8px 15px 8px 0;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(5px);
  font-style: italic;
  opacity: 0.8;
}

.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.delete-all-btn {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.delete-all-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.delete-all-btn.confirm-mode {
  background: #ff4444;
  color: white;
  border-color: #ff0000;
  animation: pulse-warning 1s ease-in-out infinite alternate;
}

.delete-all-btn.confirm-mode:hover {
  background: #ff2222;
  border-color: #dd0000;
}

@keyframes pulse-warning {
  from { 
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
  }
  to { 
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.8);
  }
}

.header-utility-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.header-utility-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}



.names-container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.names {
  list-style-type: none;
  padding: 0px;
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 215, 0, 0.5) rgba(255, 255, 255, 0.1);
}

.audio-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.mute-btn {
  background: none;
  border: none;
  color: #ffd700;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mute-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  transform: scale(1.1);
}

.mute-btn.muted {
  color: #ff4444;
}

.settings-btn-audio {
  background: none;
  border: none;
  color: #ffd700;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-btn-audio:hover {
  background: rgba(255, 215, 0, 0.2);
  transform: scale(1);
  color: rgba(255, 215, 0, 1);
}

.volume-slider {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  appearance: none;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffd700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(255, 215, 0, 0.5);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffd700;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.names::-webkit-scrollbar {
  width: 8px;
}

.names::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.names::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.5);
  border-radius: 4px;
}

.names::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.7);
}

.name-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  margin: 8px 0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(5px);
  width: 100%;
  box-sizing: border-box;
}

.name-item:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 215, 0, 0.7) !important;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4) !important;
}

.name-item.selected {
  background: rgba(0, 255, 0, 0.3);
  border-color: #00ff00;
}

.name-item.unselected {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  opacity: 0.5;
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.6);
}

.name-controls {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  font-family: 'Orbitron', monospace;
  font-weight: normal;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.btn-primary {
  background: rgba(0, 255, 65, 0.2);
  border-color: rgba(0, 255, 65, 0.4);
  color: rgba(0, 255, 65, 0.9);
}

.btn-secondary {
  background: rgba(255, 107, 53, 0.2);
  border-color: rgba(255, 107, 53, 0.4);
  color: rgba(255, 107, 53, 0.9);
}

.btn-danger {
  background: rgba(255, 0, 64, 0.2);
  border-color: rgba(255, 0, 64, 0.4);
  color: rgba(255, 0, 64, 0.9);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.spin-btn {
  font-size: 18px;
  padding: 15px 40px;
  margin-top: 30px;
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: black;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.winner-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  color: #ffd700;
  padding: 40px;
  border-radius: 20px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  z-index: 1000;
  border: 3px solid #ffd700;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
  display: none;
  min-width: 400px;
  max-width: 500px;
  backdrop-filter: blur(10px);
}

.winner-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.winner-buttons .btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid;
  min-width: 120px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.btn-primary {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border-color: #ffd700;
}

.btn-primary:hover {
  background: rgba(255, 215, 0, 0.3);
  color: #ffed4e;
  border-color: #ffed4e;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.small-btn {
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 12px;
}

.status-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-right: 8px;
  accent-color: #ffd700;
}

.toggle-all-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #ffd700;
}

.remove-btn {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.remove-btn:hover {
  background: #ff4444;
  color: white;
  border-color: #ff0000;
  transform: scale(1.1);
}

.dog-of-day {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 15px;
  border: 3px solid #ffd700;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  z-index: 100;
  min-width: 150px;
}

.dog-of-day h4 {
  margin: 0 0 10px 0;
  color: #ffd700;
  font-size: 14px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.dog-frame {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  padding: 5px;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dog-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.dog-name {
  color: white;
  font-size: 16px;
  font-weight: bold;
  margin: 5px 0 0 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.template-buttons {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.template-buttons h5 {
  color: #ffd700;
  margin: 0 0 10px 0;
  font-size: 14px;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.template-buttons {
  display: flex;
  flex-direction: column;
}

.template-buttons .template-row {
  display: flex;
  gap: 8px;
}

.template-btn {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  color: rgba(255, 215, 0, 0.9);
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.template-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

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

.names-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.header-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}



.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.settings-popup {
  background: rgba(30, 60, 114, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  width: 400px;
  max-width: 90vw;
  color: white;
  font-family: 'Orbitron', monospace;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px 0 25px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  margin-bottom: 20px;
}

.settings-header h3 {
  color: #ffd700;
  margin: 0;
  font-size: 1.3em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.close-btn {
  background: none;
  border: none;
  color: rgba(255, 107, 53, 0.9);
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 107, 53, 0.2);
  transform: scale(1.1);
}

.settings-content {
  padding: 0 25px 25px 25px;
}

.setting-group {
  margin-bottom: 20px;
}

.setting-group label {
  display: block;
  color: #ffd700;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.speed-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.speed-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  min-width: 35px;
  text-align: center;
}

.speed-slider {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  appearance: none;
}

.speed-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(255, 215, 0, 0.4);
  transition: all 0.3s ease;
}

.speed-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

.speed-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  cursor: pointer;
  border: none;
  box-shadow: 0 3px 8px rgba(255, 215, 0, 0.4);
}

.speed-value {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.speed-value span {
  color: #ffd700;
  font-weight: 600;
}

/* Template Editor Styles */
.template-editor {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.template-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.template-section label {
  font-size: 13px;
  font-weight: 600;
  color: #ffd700;
  margin-bottom: 5px;
}

.template-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}

.template-textarea:focus {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.template-textarea::placeholder {
  color: #999;
  font-style: italic;
}

.btn-small {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 255, 65, 0.15);
  border-color: rgba(0, 255, 65, 0.4);
  color: rgba(0, 255, 65, 0.9);
  align-self: flex-start;
}

.btn-small:hover {
  background: rgba(0, 255, 65, 0.25);
  border-color: rgba(0, 255, 65, 0.6);
  transform: translateY(-1px);
}

.btn-small.reset-btn {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.4);
  color: rgba(255, 107, 53, 0.9);
  align-self: center;
  margin-top: 10px;
}

.btn-small.reset-btn:hover {
  background: rgba(255, 107, 53, 0.25);
  border-color: rgba(255, 107, 53, 0.6);
}