/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 主体样式 */
body {
  font-family: 'Microsoft YaHei', '微软雅黑', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
  line-height: 1.6;
}

/* 容器样式 */
.container {
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* 头部样式 */
.header {
  text-align: center;
  margin-bottom: 30px;
}

.title {
  font-size: 2.5rem;
  color: #4a5568;
  margin-bottom: 10px;
  font-weight: 300;
  letter-spacing: 2px;
}

.subtitle {
  color: #718096;
  font-size: 1rem;
  margin-bottom: 20px;
}

/* 表单样式 */
.form-section {
  margin-bottom: 30px;
}

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

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #4a5568;
  font-size: 1rem;
}

.form-input {
  width: 100%;
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f7fafc;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

.select {
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
  padding-right: 40px;
}

/* 按钮样式 */
.btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 25px;
}

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

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

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

/* 结果区域样式 */
.result-section {
  margin-top: 30px;
}

.result-title {
  font-size: 1.3rem;
  color: #4a5568;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 500;
}

.loading {
  display: none;
  text-align: center;
  color: #667eea;
  font-style: italic;
  padding: 20px;
}

.suggestions-container {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  min-height: 150px;
}

.placeholder {
  text-align: center;
  color: #a0aec0;
  font-style: italic;
  padding: 40px 20px;
}

/* 分组标题样式 */
.convention-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a5568;
  margin: 20px 0 10px 0;
  padding: 8px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  text-align: center;
}

.convention-group-title:first-child {
  margin-top: 0;
}

/* 建议项样式 */
.suggestion-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.suggestion-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.suggestion-item:last-child {
  margin-bottom: 0;
}

.variable-name {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 5px;
}

.variable-description {
  font-size: 0.9rem;
  color: #718096;
  line-height: 1.4;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.suggestion-item:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: #5a67d8;
}

/* 错误样式 */
.error {
  color: #e53e3e;
  background: #fed7d7;
  border: 1px solid #feb2b2;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

/* 成功提示 */
.success-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #48bb78;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.success-toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
    margin: 10px;
  }

  .title {
    font-size: 2rem;
  }

  .form-input {
    padding: 12px;
  }

  .btn {
    padding: 12px;
  }

  .suggestions-container {
    padding: 15px;
  }

  .suggestion-item {
    padding: 12px;
  }

  .copy-btn {
    position: static;
    opacity: 1;
    margin-top: 8px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  .container {
    padding: 15px;
  }

  .form-input {
    padding: 10px;
  }

  .suggestion-item {
    padding: 10px;
  }

  .variable-name {
    font-size: 1rem;
  }

  .variable-description {
    font-size: 0.85rem;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-item {
  animation: fadeIn 0.3s ease;
}

/* 加载动画 */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}