:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-bg: #f9f9f9;
  --dark-bg: #1a1a2e;
  --border-color: #ddd;
  --success-color: #27ae60;
  --warning-color: #f39c12;
}

* {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.container {
  box-sizing: border-box;
  color: #333;
  width: 100%;
  max-width: 1540px;
  min-width: 1100px;
  margin: 20px auto;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.container * {
  box-sizing: border-box;
}

header {
  background: linear-gradient(90deg, var(--primary-color) 0%, #34495e 100%);
  color: white;
  padding: 25px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-icon {
  font-size: 42px;
  background: var(--secondary-color);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.header-tip {
  position: absolute;
  right: 30px;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  backdrop-filter: blur(5px);
}

main {
  display: flex;
  padding: 20px;
  gap: 20px;
}

.input-section,
.output-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header h2 {
  color: var(--primary-color);
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header .counter {
  background: var(--light-bg);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

textarea {
  width: 100%;
  height: 400px;
  padding: 10px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  transition: all 0.3s;
}

textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary {
  background: #7f8c8d;
  color: white;
}

.btn-warning {
  background: var(--warning-color);
  color: white;
}

.btn-danger {
  background: var(--accent-color);
  color: white;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.divider {
  width: 1px;
  background: var(--border-color);
  margin: 0 20px;
  position: relative;
}

.divider::after {
  content: "⇅";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  color: var(--secondary-color);
}

.info-section {
  background: var(--light-bg);
  border-radius: 10px;
  margin: 0 20px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.info-header h3 {
  font-size: 24px;
}

.info-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.info-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-box h4 {
  color: var(--secondary-color);
  margin-bottom: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-box p {
  color: #555;
  line-height: 1.6;
  font-size: 15px;
  margin-bottom: 8px;
}

.notification {
  position: fixed;
  top: 80px;
  right: 30px;
  padding: 15px 25px;
  border-radius: 8px;
  background: var(--success-color);
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateX(200%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification.show {
  transform: translateX(0);
}

.xml-tag {
  color: #e06c75;
}

.xml-attr {
  color: #d19a66;
}

.xml-value {
  color: #98c379;
}

.xml-comment {
  color: #5c6370;
  font-style: italic;
}

footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

.highlight {
  animation: highlight 1.5s ease;
}

@keyframes highlight {
  0% {
    background-color: rgba(46, 204, 113, 0.3);
  }

  100% {
    background-color: transparent;
  }
}

.example-select {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
  z-index: 10;
  display: none;
  overflow: hidden;
}

.example-option {
  padding: 12px 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.example-option:hover {
  background: #f0f7ff;
}

.example-option.active {
  background: var(--secondary-color);
  color: white;
}

.sample-btn-container {
  position: relative;
  flex: 1;
}

.sample-btn-container.active .example-select {
  display: block;
}
