body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

h1 {
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.editor-panel {
    flex: 2 1 0;
    min-width: 150px;
    max-width: 90vw;
    padding: 24px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.resizer {
    width: 6px;
    background: #d0d0d0;
    cursor: col-resize;
    height: 100vh;
    z-index: 10;
}

.xpath-panel {
    flex: 1 1 0;
    min-width: 200px;
    max-width: 90vw;
    padding: 24px;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
}

header h1 {
    margin-top: 0;
}

textarea#xmlInput {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-family: monospace;
    font-size: 14px;
    resize: none;
    box-sizing: border-box;
}

button {
    background-color: #5cb85c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 10px;
}

button:hover {
    background-color: #4cae4c;
}

#xpathInput {
    width: 100%;
    padding: 8px;
    margin-bottom: 16px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#resultTable {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
}
#resultTable th, #resultTable td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
    word-break: break-all;
}
#resultTable th {
    background: #e9ecef;
}

#resultTable th:first-child, #resultTable td:first-child {
    width: 40px;
    min-width: 40px;
    max-width: 60px;
    text-align: center;
}

#resultTable tbody {
    display: block;
    max-height: 50vh;
    overflow-y: auto;
    width: 100%;
}
#resultTable thead, #resultTable tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.error {
    color: red;
    margin-top: 10px;
}

@media (max-width: 700px) {
  .container {
    flex-direction: column;
    height: 100vh;
    width: 100vw;
  }
  .editor-panel, .xpath-panel {
    width: 100vw !important;
    min-width: 0;
    max-width: 100vw;
    height: unset;
    min-height: 100px;
    max-height: unset;
    flex: none;
  }
  .editor-panel {
    height: 50vh;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0;
  }
  .resizer {
    width: 100vw;
    height: 8px;
    min-height: 8px;
    max-height: 16px;
    background: #d0d0d0;
    cursor: row-resize;
    border: none;
    z-index: 10;
  }
  .xpath-panel {
    height: 50vh;
    padding-top: 8px;
    padding-bottom: 24px;
    border-top: none;
  }
  textarea#xmlInput {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    resize: none;
  }
}