* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-family: Arial, sans-serif;
    background-color: #dddddd;
    padding: 20px;
    align-items: start;
}

#cajas {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.caja-ejercicio {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.caja-ejercicio h2 {
    font-size: 1.2rem;
    color: #212529;
    margin-bottom: 12px;
}

.caja-ejercicio code {
    display: block;
    background-color: #e9ecef;
    padding: 12px;
    border-radius: 4px;
    font-family: "Courier New", Courier, monospace;
    color: #d63384;
    margin-bottom: 15px;
    overflow-x: auto;
}

.caja-ejercicio button {
    background-color: #0d6efd;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
}

.caja-ejercicio button:hover {
    background-color: #0b5ed7;
}

#caja-solucion {
    background-color: #212529;
    color: #20c997;
    padding: 25px;
    border-radius: 8px;
    font-family: "Courier New", Courier, monospace;
    font-size: 1.1rem;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    white-space: pre-wrap;
}

#xmlInput {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 500px;
    padding: 20px;
    font-family: monospace;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background-color: white;
    overflow: auto;
    white-space: pre;
    outline: none;
    margin-bottom: 20px;
    user-select: none;
}

mark {
    background-color: yellow;
    color: black;
    border-radius: 2px;
}

@media  (max-width: 768px){
    body {
        font-family: sans-serif;
        margin: 0;
        padding: 15px;
        background-color: #f4f4f4;
      }
      
      #cajas {
        display: grid;
        flex-direction: column; 
        gap: 20px;
      }
      
      #xmlInput {
        background: #272822;
        color: white;
        padding: 15px;
        border-radius: 8px;
        font-family: monospace;
        overflow-x: auto; 
        white-space: pre-wrap; 
        font-size: 13px;
      }
      
      .caja-ejercicio {
        background: white;
        padding: 15px;
        border-left: 5px solid #007bff;
        border-radius: 4px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
      }
      
      .caja-ejercicio h2 {
        font-size: 1.1rem; 
        margin-top: 0;
      }
      
      code {
        display: block;
        background: #eee;
        padding: 10px;
        margin: 10px 0;
        word-break: break-all;
      }
      
      button {
        width: 100%; 
        padding: 12px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
      }
      
      #caja-solucion {
        position: sticky;
        bottom: 0;
        background: #333;
        color: #20c997;
        padding: 15px;
        margin-top: 20px;
        text-align: center;
      }
}
