* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding-top: 60px;
  padding-bottom: 45px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 12px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  z-index: 1000;
}

h1 {
  font-size: 20px;
  color: #2c3e50;
  margin: 0;
}

h1 a {
  color: #2c3e50;
  text-decoration: none;
  cursor: pointer;
}

h1 a:hover {
  color: #3498db;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.share-link {
  display: flex;
  gap: 5px;
  align-items: center;
}

.share-link input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  width: 300px;
}

.editor-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  min-height: 400px;
  height: 600px;
  resize: vertical;
  overflow: visible;
}

.editor-panel {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.panel-header {
  background-color: #34495e;
  color: white;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  font-size: 16px;
  font-weight: 500;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

.btn-prettify {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  background-color: #5a6c7d;
  color: white;
  transition: background-color 0.2s;
}

.btn-prettify:hover {
  background-color: #4a5c6d;
}

.editor-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.line-numbers {
  background-color: #f7f7f7;
  color: #888;
  padding: 15px 10px;
  text-align: right;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.5;
  user-select: none;
  border-right: 1px solid #ddd;
  overflow: hidden;
  min-width: 40px;
  white-space: pre;
}

textarea {
  flex: 1;
  padding: 15px;
  border: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  resize: none;
  outline: none;
  line-height: 1.5;
  height: 100%;
  overflow-y: auto;
}

.validation-results {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.results-content {
  padding: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.success {
  color: #27ae60;
  font-weight: 500;
  padding: 10px;
  background-color: #d5f4e6;
  border-radius: 4px;
  border-left: 4px solid #27ae60;
}

.error {
  color: #c0392b;
  font-weight: 500;
  padding: 10px;
  background-color: #fadbd8;
  border-radius: 4px;
  border-left: 4px solid #c0392b;
  margin-bottom: 10px;
}

.error-list {
  margin-top: 10px;
}

.error-item {
  background-color: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 8px;
}

.error-path {
  font-weight: 600;
  color: #c0392b;
  margin-bottom: 4px;
}

.error-message {
  color: #555;
  font-size: 14px;
}

.info {
  color: #7f8c8d;
  font-style: italic;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 10px 20px;
  background: white;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
  font-size: 12px;
  color: #7f8c8d;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.footer a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.footer-icon {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px;
  min-height: 14px;
  max-width: 14px;
  max-height: 14px;
  vertical-align: middle;
  display: inline-block;
  object-fit: contain;
}

.footer span {
  color: #bdc3c7;
}

@media (max-width: 768px) {
  .editor-container {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-link input {
    width: 200px;
  }
}
