/* Text Cleaner 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: 200px;
  font-family: monospace;
  line-height: 1.5;
  resize: vertical;
}

.textarea-field[readonly] {
  background: #f8f9fa;
  cursor: default;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.option-group {
  background: rgba(255,255,255,0.8);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s ease;
}

.option-group:hover {
  background: rgba(102, 126, 234, 0.05);
  border-color: #667eea;
  transform: translateY(-1px);
}

.option-title {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e9ecef;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 4px 0;
}

.option-item:last-child {
  margin-bottom: 0;
}

.option-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #667eea;
}

.option-item label {
  font-size: 12px;
  color: #495057;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.option-item:hover label {
  color: #2c3e50;
}

.option-item input[type="checkbox"]:checked + label {
  color: #667eea;
  font-weight: 500;
}

.stats {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  flex-wrap: wrap;
}

.stat-item {
  background: rgba(255,255,255,0.9);
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-label {
  color: #6c757d;
  font-weight: 500;
}

.stat-value {
  font-weight: 600;
  color: #2c3e50;
  font-family: monospace;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
  
  .stats {
    justify-content: center;
  }
  
  .toolbar {
    justify-content: center;
  }
}

/* 动画效果 */
.option-group.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.15); }
  100% { background: rgba(255,255,255,0.8); }
}

.textarea-field.updated {
  animation: glow 0.5s ease-in-out;
}

@keyframes glow {
  0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
  50% { box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

/* 处理状态 */
.processing {
  opacity: 0.7;
  pointer-events: none;
}

.processing .btn {
  position: relative;
}

.processing .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 结果统计样式 */
.stat-item.positive .stat-value {
  color: #28a745;
}

.stat-item.negative .stat-value {
  color: #dc3545;
}

.stat-item.neutral .stat-value {
  color: #6c757d;
}