* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 20px auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 25px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 95%;
  margin: 0 auto;
}

.input-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.input-group {
  display: flex;
  margin-bottom: 20px;
}

.url-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #ddd;
  border-radius: 8px 0 0 8px;
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.3s;
}

.url-input:focus {
  border-color: #4d90fe;
}

.view-btn {
  padding: 0 30px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.view-btn:hover {
  background: #45a049;
}

.options {
  display: flex;
  align-items: center;
  gap: 20px;
}

.auto-height {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  opacity: 0.85;
}

.auto-height input {
  width: 20px;
  height: 20px;
}

.toolbar {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 50px;
  background: #f1f1f1;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.format-btn {
  background: #FFC107;
  color: #333;
}

.format-btn:hover {
  background: #ffb300;
}

.copy-btn {
  background: #2196F3;
  color: white;
}

.copy-btn:hover {
  background: #0b7dda;
}

.download-btn {
  background: #4CAF50;
  color: white;
}

.download-btn:hover {
  background: #45a049;
}

.clear-btn {
  background: #f44336;
  color: white;
}

.clear-btn:hover {
  background: #d32f2f;
}

.code-container {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 25px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.code-header {
  background: #666;
  color: #f1f1f1;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
}

.code-area {
  background: #fff;
  padding: 10px;
  overflow: auto;
  max-height: 600px;
  min-height: 300px;
}

.auto-height-enabled .code-area {
  max-height: none;
}

#source-code {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  word-wrap: break-word;
}

.highlight-tag {
  color: #569CD6;
}

.highlight-attr {
  color: #9CDCFE;
}

.highlight-value {
  color: #CE9178;
}

.highlight-comment {
  color: #6A9955;
}

.highlight-doctype {
  color: #808080;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 25px;
}

.feature-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #2c3e50;
}

.feature-desc {
  color: #555;
  font-size: 1rem;
}

footer {
  text-align: center;
  color: #666;
  padding: 10px;
}

.notification {
  position: fixed;
  top: 60px;
  right: 20px;
  padding: 15px 25px;
  background: #4CAF50;
  color: white;
  border-radius: 8px;
  font-weight: 500;
  transform: translateX(150%);
  transition: transform 0.3s ease-out;
  z-index: 1000;
}

.notification.show {
  transform: translateX(0);
}
.notification.error {
  background-color: #f44336; /* 错误红色 */
}
