*{
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  position: relative;
  color: #333;
}

.container * {
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 25px;
  width: 100%;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

header p {
  opacity: 0.9;
  font-size: 1.1rem;
}

.main-content {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.editor-section,
.result-section {
  flex: 1;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.section-header {
  background: #3498db;
  color: white;
  padding: 15px 20px;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

textarea {
  width: 100%;
  height: 560px;
  padding: 15px;
  font-family: 'Consolas', 'Monaco', monospace;
  border: none;
  resize: none;
  outline: none;
  background: #fff;
  color: #555;
  font-size: 15px;
  line-height: 1.6;
  tab-size: 4;
}

.button-group {
  display: flex;
  gap: 20px;
  padding: 15px 20px;
  border-top: 1px solid #ddd;
}

.btn {
  padding: 12px 42px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.format-btn {
  background: #3498db;
  color: white;
}

.format-btn:hover {
  background: #2980b9;
}

.copy-btn {
  background: #2ecc71;
  color: white;
}

.copy-btn:hover {
  background: #27ae60;
}

.clear-btn {
  background: #e74c3c;
  color: white;
}

.clear-btn:hover {
  background: #c0392b;
}

#result {
  background: white;
  color: #666;
  height: 642px;
  padding: 15px;
  overflow: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  color: #555;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre;
}

.notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 30px;
  background: rgba(44, 62, 80, 0.95);
  color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
  font-size: 1.1rem;
}

.notice.show {
  opacity: 1;
}

footer {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.feature-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  transition: transform 0.3s ease;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #2c3e50;
}

.feature-desc {
  color: #7f8c8d;
  line-height: 1.7;
}

.about h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.about p {
  line-height: 1.5;
  font-size: 1rem;
  margin-top: 10px;
  opacity: 0.8;
}

/* 加载状态 */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #3498db;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
