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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 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: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 600px;
  padding: 40px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  font-size: 32px;
  color: #1a4d7c;
  margin-bottom: 10px;
  font-weight: 700;
}

.header p {
  color: #666;
  font-size: 16px;
}

.emotion-select {
  margin-bottom: 25px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

.emotion-btn {
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.emotion-btn:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.emotion-btn.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

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

.input-label {
  display: block;
  margin-bottom: 12px;
  color: #333;
  font-weight: 600;
  font-size: 16px;
}

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

.input-box {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  outline: none;
}

.input-box:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.generate-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.output-section {
  position: relative;
}

.output-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 30px 24px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.output-text {
  font-size: 20px;
  color: #333;
  line-height: 1.7;
  text-align: center;
}

.output-placeholder {
  color: #999;
  font-size: 16px;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: #666;
  font-size: 16px;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
  transition: all 0.2s ease;
  display: none;
}

.copy-btn:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.copy-btn.copied {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.copy-btn.visible {
  display: block;
}

.footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  color: #999;
  font-size: 14px;
}

@media (max-width: 600px) {
  .container {
    padding: 24px;
  }
  .header h1 {
    font-size: 24px;
  }
  .input-wrapper {
    flex-direction: column;
  }
  .generate-btn {
    width: 100%;
  }
  .output-text {
    font-size: 18px;
  }
}