
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #181c24 0%, #232a36 100%);
  color: #f5f6fa;
  touch-action: manipulation;
  min-height: 100vh;
}

#app {
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 8px;
  border-radius: 24px;
  background: rgba(30,34,44,0.92);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  position: relative;
}

.button {
  background: linear-gradient(90deg, #ff5252 0%, #ff7b7b 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 18px;
  font-size: 1.15em;
  margin: 10px 0;
  width: 100%;
  box-shadow: 0 4px 16px rgba(255,82,82,0.12);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  touch-action: manipulation;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.button:active {
  background: linear-gradient(90deg, #e04040 0%, #ff5252 100%);
  box-shadow: 0 2px 8px rgba(255,82,82,0.18);
  transform: scale(0.98);
}

.card {
  perspective: 1200px;
  width: 100%;
  height: 200px;
  margin: 32px 0;
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  background: none;
}
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(.68,-0.55,.27,1.55);
  transform-style: preserve-3d;
  border-radius: 24px;
}
.card.flipped .card-inner {
  transform: rotateY(180deg);
}
.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1em;
  border-radius: 24px;
  background: linear-gradient(120deg, #232a36 0%, #2e3542 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.card-back {
  background: linear-gradient(120deg, #ff5252 0%, #ff7b7b 100%);
  color: #fff;
  transform: rotateY(180deg);
  font-size: 2em;
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #232a36 0%, #ff5252 100%);
  color: #fff;
  padding: 16px 32px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(255,82,82,0.18);
  z-index: 9999;
  font-size: 1.1em;
  opacity: 0.97;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: toastIn 0.3s;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) scale(0.95); }
  to { opacity: 0.97; transform: translateX(-50%) scale(1); }
}

/* Loading Spinner */
.spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}
.spinner .lds-ring {
  display: inline-block;
  position: relative;
  width: 64px;
  height: 64px;
}
.spinner .lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 48px;
  height: 48px;
  margin: 8px;
  border: 6px solid #ff5252;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(.68,-0.55,.27,1.55) infinite;
  border-color: #ff5252 transparent transparent transparent;
}
.spinner .lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.spinner .lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.spinner .lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}
.spinner .lds-ring div:nth-child(4) {
  animation-delay: 0s;
}
@keyframes lds-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

input, select {
  background: #232a36;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 1em;
  margin: 6px 0 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  outline: none;
  width: 100%;
  font-family: inherit;
}
input:focus, select:focus {
  background: #2e3542;
}
label {
  display: block;
  margin-bottom: 8px;
  font-size: 1em;
  color: #ff7b7b;
  font-weight: 500;
}
h1, h2, h3 {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-weight: 800;
  color: #ff5252;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
p {
  color: #f5f6fa;
  font-size: 1.1em;
  margin-bottom: 12px;
}

@media (min-width: 600px) {
  #app {
    pointer-events: none;
    opacity: 0.3;
    filter: blur(2px);
  }
  body::after {
    content: "Nur auf mobilen Geräten spielbar!";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, #ff5252 0%, #ff7b7b 100%);
    color: #fff;
    padding: 40px 48px;
    border-radius: 24px;
    font-size: 2.2em;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(255,82,82,0.22);
    font-weight: 700;
    letter-spacing: 0.04em;
  }
}

/* Enhanced Styles für clean game.js */

/* Game Container */
.game-container {
  max-width: 280px;
  margin: 0 auto;
  padding: 8px;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .card-modern {
    padding: 12px;
    margin: 6px 0;
    border-radius: 12px;
    max-width: 320px;
  }
  
  .game-title {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
  }
  
  .primary-button {
    padding: 10px 14px;
    font-size: 0.9rem;
    margin: 8px 0;
    border-radius: 12px;
  }
  
  .secondary-button {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 12px;
  }
  
  .game-container {
    padding: 8px;
    max-width: 320px;
  }
  
  .section-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
  }
  
  .game-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
  }
}

.card-modern {
  background: rgba(40, 44, 52, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px;
  margin: 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* Typography */
.game-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.2rem;
  background: linear-gradient(135deg, #ff5252, #ff7b7b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.game-subtitle, .section-subtitle {
  text-align: center;
  color: rgba(245, 246, 250, 0.7);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: #f5f6fa;
}

/* Buttons */
.primary-button {
  background: linear-gradient(135deg, #ff5252, #ff7b7b);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  width: 100%;
  margin: 8px 0;
  box-shadow: 0 4px 16px rgba(255, 82, 82, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 82, 82, 0.4);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 82, 82, 0.3);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.1);
  color: #f5f6fa;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  width: 100%;
  margin: 6px 0;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

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

.button-icon {
  font-size: 1.2rem;
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

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

.setting-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #f5f6fa;
  font-size: 0.95rem;
}

.modern-select, .modern-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #f5f6fa;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.modern-select:focus, .modern-input:focus {
  outline: none;
  border-color: #ff5252;
  box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.2);
}

.multi-select {
  min-height: 120px;
}

/* Checkboxes */
.checkbox-group {
  margin: 16px 0;
}

.modern-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
}

.modern-checkbox input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 14px;
  color: transparent;
}

.modern-checkbox input[type="checkbox"]:checked + .checkmark {
  background: #ff5252;
  border-color: #ff5252;
  color: white;
}

/* Custom Words */
.custom-words-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

/* Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.info-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

#playerCountCard {
  cursor: pointer;
  user-select: none;
}

#playerCountCard:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

#playerCountCard:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.12);
}

#quickStartIcon {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  display: inline-block;
}

#quickStartIcon:hover {
  transform: scale(1.2);
  filter: brightness(1.3);
}

#quickStartIcon:active {
  transform: scale(1.1);
}

.info-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.info-text {
  font-weight: 500;
  color: rgba(245, 246, 250, 0.8);
}

/* Tip Box */
.tip-box {
  background: rgba(255, 191, 36, 0.1);
  border: 1px solid rgba(255, 191, 36, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  text-align: center;
}

.tip-box p {
  margin: 0;
  color: #fbbf24;
  font-size: 0.9rem;
}

/* Player Setup */
.players-setup {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.player-setup {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
}

.player-number {
  font-weight: 600;
  color: #ff5252;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.player-inputs {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.avatar-select {
  width: 70px;
  text-align: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 4px;
  color: white;
  cursor: pointer;
  max-height: 120px;
  overflow-y: auto;
}

.avatar-select option {
  background: rgba(40, 44, 52, 0.95);
  color: white;
  padding: 4px;
  font-size: 1rem;
}

/* Player Turn */
.player-turn {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.player-avatar {
  font-size: 3rem;
  margin-right: 20px;
}

.player-info {
  flex: 1;
}

.player-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f5f6fa;
  margin-bottom: 4px;
}

.turn-indicator {
  font-size: 0.9rem;
  color: rgba(245, 246, 250, 0.6);
}

/* Word Card */
.word-card {
  perspective: 1000px;
  height: 200px;
  margin: 24px 0;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.word-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.card-front {
  background: linear-gradient(135deg, #374151, #4b5563);
  color: rgba(255, 255, 255, 0.8);
}

.card-back {
  background: linear-gradient(135deg, #ff5252, #ff7b7b);
  color: white;
  transform: rotateY(180deg);
}

.tap-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: pulse 2s infinite;
}

.tap-text {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Word Display */
.word-display {
  text-align: center;
}

.word-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.word-text {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.category-text {
  font-size: 1rem;
  opacity: 0.9;
}

/* Impostor Notice */
.impostor-notice {
  text-align: center;
  margin-bottom: 16px;
}

.impostor-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.impostor-text {
  font-size: 1.5rem;
  font-weight: 700;
}

.impostor-tip {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.tip-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.tip-text {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Discussion Starter */
.discussion-starter {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 24px;
  text-align: center;
  color: white;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}

.starter-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.starter-text {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Discussion Tips */
.discussion-tips {
  margin: 24px 0;
}

.tip-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.tip-emoji {
  font-size: 1.5rem;
  margin-right: 16px;
}

/* Vote Grid */
.vote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 24px 0;
}

.vote-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  color: #f5f6fa;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vote-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ff5252;
}

.vote-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 82, 82, 0.1);
  border-color: rgba(255, 82, 82, 0.3);
}

.vote-button.disabled:hover {
  background: rgba(255, 82, 82, 0.1);
  border-color: rgba(255, 82, 82, 0.3);
}

.vote-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vote-avatar {
  font-size: 1.5rem;
}

.vote-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.vote-self {
  color: rgba(255, 82, 82, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: 8px;
}

.vote-count {
  background: #ff5252;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 60px;
  text-align: center;
}

/* Current Voter Display */
.current-voter {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 24px;
  color: white;
}

.voter-avatar {
  font-size: 3rem;
  margin-right: 20px;
}

.voter-info {
  flex: 1;
}

.voter-question {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.voter-progress {
  font-size: 0.9rem;
  opacity: 0.9;
}

.vote-info {
  text-align: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: rgba(245, 246, 250, 0.8);
  font-style: italic;
}

/* Result Styles */
.result-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 16px;
  color: white;
}

.result-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.result-failure {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.result-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.result-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.result-details {
  margin-bottom: 24px;
}

.result-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 12px;
}

.result-label {
  font-weight: 600;
  color: rgba(245, 246, 250, 0.7);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.result-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: #f5f6fa;
}

.word-reveal {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #ff5252 !important;
}

.impostor-reveal {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  margin: 0 4px;
}

.voted-out {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  margin: 0 4px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 600;
  z-index: 1000;
  animation: slideInUp 0.3s ease;
}

/* Animations */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes slideInUp {
  from {
    transform: translate(-50%, 100px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* Spinner Override */
#spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

/* PWA Install Prompt */
.install-prompt {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  border-radius: 15px;
  margin-top: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.install-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.install-icon {
  font-size: 1.5rem;
}

.install-text {
  font-weight: 600;
  font-size: 1.1rem;
}

.install-button {
  background: white;
  color: #667eea;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.install-button:hover {
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
