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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 25px;
  max-width: 600px;
  width: 100%;
  text-align: center;
}

h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 2rem;
  font-weight: 300;
}

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

label {
  display: block;
  margin-bottom: 10px;
  color: #666;
  font-weight: 500;
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 15px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: #667eea;
}

.button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.6);
}

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

.result-section {
  margin-top: 20px;
}

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

.result-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.copy-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  display: none;
}

.copy-button:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.copy-button:active {
  transform: translateY(0);
}

.copy-button.copied {
  background: #17a2b8;
}

.copy-button.show {
  display: inline-block;
}

.result {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 500;
  color: #333;
  border: 2px solid #e1e5e9;
}

.result.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.empty-message {
  color: #999;
  font-style: italic;
}

.settings-section {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e1e5e9;
}

.settings-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.setting-label {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.setting-input {
  width: 80px;
  padding: 8px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
  transition: border-color 0.3s ease;
}

.format-input {
  text-align: left;
  font-family: 'Courier New', monospace;
}

.setting-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #667eea;
}

.roulette-animation {
  animation: roulette 0.1s ease-in-out;
}

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

.setting-input:focus {
  outline: none;
  border-color: #667eea;
}

.result-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  font-size: 18px;
  font-weight: 500;
  color: #333;
  border: 2px solid #e1e5e9;
  animation: slideIn 0.4s ease;
}

.result-item.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

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

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  textarea {
    min-height: 120px;
  }
  
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .setting-input {
    width: 100%;
    max-width: 120px;
  }
  
  .format-input {
    max-width: 250px;
  }
  
  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}