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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #2b1216 0%, #16090c 100%);
  min-height: 100vh;
  padding: 20px;
}

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

.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  color: white;
  font-size: 2.5em;
  font-weight: 300;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.nav-btn {
  background: #7b4f54;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-block;
  color: #fff;
  padding: 12px 24px;
  border: none;
  box-shadow: 0 2px 8px rgba(75, 9, 15, 0.15);
}

.nav-btn:hover {
  background: #a75665;
}

.box-shadow {
  box-shadow: 0 10px 40px rgba(75, 9, 15, 0.35);
  overflow: hidden;
  min-height: 600px;
}

.file-input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  top: 0;
  left: 0;
  display: none; /* Solo se muestra cuando se llama con click */
}

.content-section {
  padding: 0;
  height: calc(100vh - 200px);
  min-height: 600px;
}

.section-header {
  padding: 20px 30px;
  background: #faecee;
  border-bottom: 1px solid #e8d6d9;
}

.section-title {
  color: #4a0d14;
  font-size: 1.8em;
  margin: 0;
  font-weight: 600;
}

.editor-container {
  display: flex;
  height: 60vh;
  min-height: 400px;
  gap: 20px;
}

.editor-panel {
  flex: 1 1 0;
  min-height: 400px;
  overflow: auto;
  border-right: 1px solid #e8d6d9;
  display: flex;
  flex-direction: column;
}

.editor-header {
  background: #6b0f1a;
  color: white;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
}

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

.CodeMirror {
  height: 100% !important;
  width: 100% !important;
  font-size: 14px;
  line-height: 1.5;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.CodeMirror-scroll {
  overflow-x: auto !important;
  overflow-y: auto !important;
}

.results-panel {
  flex: 1 1 0;
  min-height: 400px;
  overflow: auto;
  background: #fff;
  border-radius: 0 8px 8px 0;
  border-left: 1px solid #e8d6d9;
  box-shadow: 0 2px 8px rgba(75, 9, 15, 0.08);
}

.results-content {
  height: 100%;
  min-height: 350px;
  max-height: 55vh;
  overflow-y: auto;
}

.empty-state {
  text-align: center;
  color: #7b4f54;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 3em;
  margin-bottom: 15px;
  opacity: 0.5;
}

@media (max-width: 1024px) {
  .editor-container {
    flex-direction: column;
    height: auto;
    min-height: 600px;
  }
  .editor-panel,
  .results-panel {
    min-height: 300px;
    height: auto;
  }
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 2em;
  }
  .nav-buttons {
    gap: 10px;
  }
  .nav-btn {
    padding: 10px 16px;
  }
}