* {
  transition: none !important;
  animation: none !important;
}

:root {
  --primary-color: #0069d9;
  --secondary-color: #28a745;
  --warning-color: #f0ad4e;
  --bg-color: #f8f9fa;
  --text-color: #333;
  --gradient-1: linear-gradient(45deg, #ff6b6b, #ff8e53);
  --gradient-2: linear-gradient(45deg, #4facfe, #00f2fe);
  --gradient-3: linear-gradient(45deg, #667eea, #764ba2);
  --question-bg: white;
  --question-text: #333;
  --container-bg: #f5f7fa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Prompt', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  background-color: #f5f7fa;
  background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  background-attachment: fixed;
}

.setup-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.container {
  width: 100%;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateZ(0);
  will-change: transform;
}

.title-container {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px;
  transform: translateZ(0);
}

.game-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: bold;
  margin: 0;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  line-height: 1.2;
  transform: translateZ(0);
}

.game-subtitle {
  font-size: clamp(1rem, 4vw, 1.5rem);
  color: #666;
  margin-top: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 4px;
}

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

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
}

input, select {
  width: 100%;
  padding: clamp(8px, 2vw, 12px);
  border-radius: 12px;
  border: 2px solid #e0e0e0;
  font-size: clamp(14px, 3vw, 16px);
  font-family: 'Prompt', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: white;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0,105,217,0.1);
}

button {
  width: 100%;
  padding: clamp(12px, 3vw, 15px) clamp(20px, 5vw, 25px);
  border-radius: 12px;
  border: none;
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 600;
  cursor: pointer;
  background: var(--gradient-1);
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: translateZ(0);
  will-change: transform;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.2);
}

button:active {
  transform: translateY(0);
}

.player-list-container {
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 15px;
  border: 2px solid rgba(0,105,217,0.1);
  overflow: hidden;
  transform: translate3d(0,0,0);
  will-change: contents;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.player-list {
  background: transparent;
  padding: 0;
  margin: 0;
  transform: translate3d(0,0,0);
  will-change: contents;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.player-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.edit-button {
  width: auto;
  padding: 8px 15px;
  font-size: 0.9rem;
  background: var(--gradient-2);
}

#playerOrderList {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.player-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  position: relative;
  width: 100%;
  overflow: visible;
  min-height: 44px;
  cursor: move;
  will-change: transform;
}

.player-item.dragging {
  opacity: 0.9;
  background: #f8f9fa;
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  z-index: 9999;
  pointer-events: none;
}

body .player-item.dragging {
  z-index: 9999;
}

.player-item.placeholder {
  opacity: 0.4;
  background: rgba(0,105,217,0.1);
  border: 2px dashed rgba(0,105,217,0.2);
  pointer-events: none;
}

.player-item .drag-handle {
  cursor: grab;
  padding: 12px;
  color: #666;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  font-size: 18px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-item.dragging .drag-handle {
  cursor: grabbing;
}

.player-item .player-name {
  flex: 1;
  margin: 0 8px;
  font-size: clamp(14px, 3vw, 16px);
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.player-item .delete-btn {
  background: none;
  border: none;
  color: #ff4444;
  cursor: pointer;
  padding: 8px;
  font-size: 16px;
  min-width: 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  margin-left: auto;
  pointer-events: auto;
  touch-action: manipulation;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .container {
    padding: 15px;
  }
  
  .title-container {
    padding: 10px;
    margin-bottom: 30px;
  }
  
  .input-group {
    margin-bottom: 20px;
  }
  
  button {
    padding: 12px 20px;
  }

  .player-item {
    padding: 6px 8px;
    margin-bottom: 6px;
    min-height: 40px;
    touch-action: none;
  }

  .player-item.dragging {
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
  }

  .player-item .drag-handle {
    padding: 6px;
    min-width: 32px;
    font-size: 14px;
    touch-action: none;
  }

  .player-item .delete-btn {
    padding: 6px;
    min-width: 32px;
    width: 32px;
    height: 32px;
    font-size: 14px;
    touch-action: manipulation;
  }

  .player-item .player-name {
    font-size: 14px;
    margin: 0 4px;
  }

  .player-list-container {
    padding: 12px;
    margin: 12px 0;
  }
}

@media (max-width: 360px) {
  .player-item {
    padding: 4px 6px;
    min-height: 36px;
  }

  .player-item .drag-handle {
    padding: 4px;
    min-width: 28px;
    font-size: 12px;
  }

  .player-item .delete-btn {
    padding: 4px;
    min-width: 28px;
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .player-item .player-name {
    font-size: 12px;
    margin: 0 4px;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .choice-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .choice-btn {
    width: 100%;
    padding: 20px;
    touch-action: manipulation;
  }

  .player-name {
    padding: 15px 25px;
  }

  .question-display {
    margin: 15px;
    padding: 20px;
    font-size: 1.4em;
  }

  .question-text {
    font-size: 1em;
  }

  #nextButton {
    padding: 12px 24px;
    font-size: 1.1em;
  }
}

.game-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 1000;
  padding: 20px;
  text-align: center;
  transform: translateZ(0);
}

h1 {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.game-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  max-width: 800px;
  margin: auto;
}

.player-name {
  font-size: clamp(1.5rem, 6vw, 3rem);
  margin-bottom: clamp(30px, 5vw, 50px);
  position: relative;
  display: inline-block;
  padding: clamp(20px, 4vw, 40px) clamp(30px, 6vw, 60px);
  text-align: center;
  z-index: 1;
  animation: slideInName 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 200px;
  width: auto;
}

.player-name::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  transform: translateX(-50%) skew(-5deg);
  z-index: -1;
  min-width: 100%;
  padding: 0 20px;
}

.player-name span {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 4px;
  display: block;
  position: relative;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.1);
}

.player-name::after {
  display: none;
}

.choice-buttons {
  display: flex;
  gap: clamp(15px, 4vw, 30px);
  margin: 30px auto;
  width: 100%;
  max-width: 800px;
  padding: 20px;
  will-change: transform;
}

.choice-btn {
  flex: 1;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  padding: clamp(20px, 5vw, 40px);
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  transform: translateZ(0);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.choice-btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.truth-btn {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.dare-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  color: white;
}

.question-display {
  font-size: 1.8em;
  margin: 30px;
  padding: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 600px;
  position: relative;
  overflow: visible;
  will-change: transform;
  transform: translateZ(0);
}

.question-type {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  font-size: 0.7em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  background: var(--gradient-2);
  color: white;
}

.question-text {
  margin-top: 25px;
  line-height: 1.4;
  font-size: 1.2em;
  color: var(--text-color);
  font-weight: 500;
}

#nextButton {
  font-size: 1.3em;
  padding: 15px 30px;
  background-color: var(--secondary-color);
  border-radius: 50px;
  max-width: 300px;
  will-change: transform;
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
}

#nextButton:active {
  transform: scale(0.98);
}

/* Animations */
@keyframes slideInName {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1),
                0 0 0 2px rgba(255,255,255,0.5),
                0 0 30px rgba(79,172,254,0.0);
  }
  50% {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1),
                0 0 0 2px rgba(255,255,255,0.5),
                0 0 50px rgba(79,172,254,0.3);
  }
}

.player-order-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.hub-button {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
  background: var(--gradient-3);
  color: white;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: none !important;
  position: fixed !important;
  margin: 0 !important;
}

.hub-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.menu-button {
  position: fixed;
  top: 20px;
  left: 20px;
  width: auto;
  padding: 8px 15px;
  font-size: 0.9em;
  background-color: rgba(0, 0, 0, 0.1);
  color: var(--text-color);
  border-radius: 20px;
  transition: all 0.3s ease;
  z-index: 1000;
}

.menu-button:hover {
  background-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.timer-display {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  position: relative;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: visible;
  transition: opacity 0.3s ease;
}

.timer-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(45deg, var(--primary-color), #4a90e2);
  border-radius: 4px;
  transition: width 0.2s linear;
  transform: translateZ(0);
  will-change: width;
}

.timer-warning .timer-bar {
  background: linear-gradient(45deg, #dc3545, #f0ad4e);
}

.times-up-message {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: #dc3545;
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: bold;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.times-up-icon {
  font-size: 1.2em;
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.times-up-text {
  font-size: 1em;
}

.question-display.urgent {
  animation: none;
  border-color: #dc3545;
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
  transition: all 0.3s ease;
}

@keyframes pulseWarning {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-2px, 0, 0);
  }
  40%, 60% {
    transform: translate3d(2px, 0, 0);
  }
}

@keyframes warningPulse {
  0%, 100% {
    background: var(--bg-color);
    transform: translateZ(0);
  }
  50% {
    background: rgba(220, 53, 69, 0.1);
    transform: translateZ(0);
  }
}

@keyframes urgentPulse {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.2);
  }
  50% {
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5);
  }
}

.game-container.time-warning {
  animation: none;
  background-color: rgba(220, 53, 69, 0.1);
  transition: background-color 0.3s ease;
}

.game-container.time-urgent {
  animation: none;
  background-color: rgba(220, 53, 69, 0.2);
  transition: background-color 0.3s ease;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .timer-bar,
  .question-display,
  .times-up-message,
  .times-up-icon {
    transition: none !important;
    animation: none !important;
  }
}

.current-player-name {
  display: inline-block;
  padding: 0 10px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 4px;
  position: relative;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.1);
  white-space: nowrap;
}

.top-buttons {
  position: fixed;
  top: 20px;
  left: 70px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.top-buttons button {
  width: auto;
  padding: 8px 15px;
  font-size: 0.9em;
  background-color: rgba(0, 0, 0, 0.1);
  color: var(--text-color);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.menu-button {
  background-color: rgba(0, 0, 0, 0.1);
  color: var(--text-color);
}

.menu-button:hover,
.top-buttons button:hover {
  background-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.copyright {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 0.9em;
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 600px) {
  .setup-container {
    padding: 10px;
    min-height: auto;
  }

  .container {
    padding: 15px;
  }

  .title-container {
    margin-bottom: 20px;
    padding: 10px;
  }

  .game-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .game-subtitle {
    font-size: clamp(0.8rem, 3vw, 1.2rem);
  }

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

  .player-list-container {
    max-height: 30vh;
    overflow-y: auto;
  }

  .game-container {
    padding: 10px;
  }

  .game-content {
    padding: 10px;
  }

  .question-display {
    margin: 15px;
    padding: 20px;
    font-size: clamp(1rem, 4vw, 1.5rem);
  }

  .choice-buttons {
    flex-direction: row;
    gap: 15px;
  }

  .choice-btn {
    padding: 15px;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
  }

  .player-name {
    font-size: clamp(1.2rem, 4vw, 2rem);
    padding: 15px 25px;
    margin-bottom: 20px;
  }
}

/* Remove unnecessary animations */
.animate__animated {
  animation-duration: 0.2s !important;
}

.animate__pulse {
  animation: none !important;
}

.animate__fadeIn {
  animation: none !important;
  opacity: 1 !important;
} 