* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 0;
  color: #333;
}

.navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.7;
}

.brand-icon {
  font-size: 24px;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.navbar-link {
  padding: 10px 20px;
  text-decoration: none;
  color: #6c757d;
  font-weight: 500;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: block;
}

.navbar-link:hover {
  background: #f8f9fa;
  color: #667eea;
}

.navbar-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

body > .container {
  margin: 20px auto;
  max-width: 1400px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 40px;
}

.header-content h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 5px;
}

.version {
  font-size: 14px;
  opacity: 0.9;
}

.info-section {
  padding: 20px 40px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.info-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-box h3 {
  font-size: 16px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 12px;
}

.info-box ul {
  list-style: none;
  padding: 0;
}

.info-box li {
  padding: 6px 0;
  font-size: 14px;
  color: #6c757d;
}

.info-box li strong {
  color: #667eea;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 600px;
  max-height: 700px;
}

.input-section,
.output-section {
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.input-section {
  border-right: 1px solid #e9ecef;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #495057;
}

.upload-zone {
  flex: 1;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.upload-zone:hover {
  border-color: #667eea;
  background: #f0f2ff;
}

.upload-zone.drag-over {
  border-color: #667eea;
  background: #e8ebff;
}

.upload-zone input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-prompt {
  text-align: center;
  pointer-events: none;
}

.upload-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

.upload-prompt p {
  font-size: 16px;
  color: #495057;
  margin: 5px 0;
}

.upload-subtext {
  font-size: 14px;
  color: #6c757d;
}

.file-info {
  margin-top: 15px;
  padding: 12px;
  background: #e8f4fd;
  border-radius: 6px;
  font-size: 14px;
  color: #0c5460;
  display: none;
}

.file-info.visible {
  display: block;
}

.type-detected {
  margin-top: 10px;
  padding: 12px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #155724;
  display: none;
}

.type-detected.visible {
  display: block;
}

.type-detected.error {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.output-display {
  flex: 1;
  padding: 15px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
  overflow: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre;
  color: #333;
  word-break: break-all;
  max-width: 100%;
}

.output-display.has-content {
  background: white;
}

.placeholder {
  color: #adb5bd;
  font-style: italic;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.stats {
  margin-top: 15px;
  padding: 12px;
  background: #e8f4fd;
  border-radius: 6px;
  font-size: 13px;
  color: #0c5460;
  display: none;
}

.stats.visible {
  display: block;
}

button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  background: #adb5bd;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

footer {
  padding: 20px 40px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  text-align: center;
  font-size: 14px;
  color: #6c757d;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .input-section {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }

  .info-section {
    grid-template-columns: 1fr;
  }
}
