/* Case Converter Specific Styles */

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

.textarea-field {
  min-height: 120px;
  font-family: monospace;
  line-height: 1.5;
  resize: vertical;
}

.conversion-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.conversion-item {
  background: rgba(255,255,255,0.8);
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.conversion-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.conversion-item:hover {
  border-color: #667eea;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.conversion-item:hover::before {
  transform: scaleX(1);
}

.conversion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.conversion-title {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 6px;
}

.conversion-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.copy-btn {
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover {
  background: #f8f9fa;
  border-color: #667eea;
  color: #667eea;
}

.conversion-result {
  font-family: monospace;
  font-size: 14px;
  color: #495057;
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  word-break: break-all;
  min-height: 20px;
  line-height: 1.4;
}

.conversion-result.empty {
  color: #6c757d;
  font-style: italic;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.example-item {
  background: rgba(255,255,255,0.8);
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.3s ease;
}

.example-item:hover {
  background: rgba(102, 126, 234, 0.05);
  border-color: #667eea;
  transform: translateY(-1px);
}

.example-title {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.example-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.example-input {
  font-family: monospace;
  background: #e9ecef;
  padding: 4px 6px;
  border-radius: 3px;
  color: #495057;
}

.example-arrow {
  color: #667eea;
  font-weight: 600;
}

.example-output {
  font-family: monospace;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  padding: 4px 6px;
  border-radius: 3px;
  color: #155724;
  font-weight: 500;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .examples-grid {
    grid-template-columns: 1fr;
  }
  
  .example-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .example-arrow {
    transform: rotate(90deg);
    align-self: center;
  }
  
  .toolbar {
    justify-content: center;
  }
}

/* 动画效果 */
.conversion-item.updated {
  animation: highlight 0.5s ease-in-out;
}

@keyframes highlight {
  0% { background: rgba(255,255,255,0.8); }
  50% { background: rgba(102, 126, 234, 0.1); }
  100% { background: rgba(255,255,255,0.8); }
}

.copy-btn.copied {
  background: #d4edda !important;
  border-color: #28a745 !important;
  color: #155724 !important;
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  font-style: italic;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: 12px;
}