
    .text-compare-body {
      font-family: Arial, sans-serif;
      max-width: 900px;
      margin: 0 auto;
      margin-top: 50px;
      background-color: #f0f2f5;
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      overflow-x: hidden;
    }
    #appTitle { color: #333; text-align: center; }
    .container {
      background-color: white; padding: 20px; border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: relative;
    }
    .controls-main {
      display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px;
      margin-bottom: 20px; justify-content: center;
    }
    .tc-button {
      padding: 10px 15px; background-color: #007bff; color: white;
      border: none; border-radius: 4px; cursor: pointer; min-width: 150px;
      text-align: center; vertical-align: middle; display: inline-block;
    }
    .tc-button:hover:not(:disabled) { background-color: #0056b3; }
    .tc-button:disabled { background-color: #cccccc; cursor: not-allowed; }

    .text-input-area {
        display: flex;
        gap: 20px;
        margin-bottom: 20px;
    }
    .text-input-area > div {
        flex: 1;
    }
    .text-input-area label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }
    .text-input-area textarea {
        width: 100%;
        min-height: 200px;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
        font-family: monospace;
        font-size: 0.9em;
        resize: vertical;
        user-select: text;
       -webkit-user-select: text;
       -moz-user-select: text;
       -ms-user-select: text;
    }

    #comparisonOptions {
        margin-bottom: 15px; padding: 10px; border: 1px solid #eee;
        border-radius: 4px; background-color: #f9f9f9;
        display: flex;
        gap: 20px;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }
    #comparisonOptions label {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 0.9em;
    }

    #diffOutputSection { margin-top: 20px; }
    #diffOutputContainer {
        border: 1px solid #ddd;
        background-color: #fff;
        padding: 15px;
        border-radius: 4px;
        min-height: 100px;
        max-height: 600px; /* Increased height */
        overflow: auto; /* Scroll for both X and Y if content is too wide */
        font-family: monospace;
        font-size: 0.9em;
        user-select: text;
       -webkit-user-select: text;
       -moz-user-select: text;
       -ms-user-select: text;
    }
    .diff-line {
        display: flex;
        white-space: pre-wrap; /* Wrap within line content */
        min-height: 1.2em; /* Ensure line height */
    }
    .line-numbers-container {
        min-width: 70px; /* Wider for two line numbers */
        padding-right: 10px;
        text-align: right;
        color: #888;
        user-select: none;
       -webkit-user-select: none;
       -moz-user-select: none;
       -ms-user-select: none;
       flex-shrink: 0; /* Prevent shrinking */
    }
    .line-num-a { display: inline-block; width: 30px; text-align: right; }
    .line-num-b { display: inline-block; width: 30px; text-align: right; }

    .line-content {
        flex-grow: 1;
        padding-left: 5px; /* Small padding from line numbers */
    }

    /* Original line-level diff styles */
    .diff-added { background-color: #e6ffed; }
    .diff-added .line-content::before { content: "+ "; color: green; font-weight: bold; }
    .diff-removed { background-color: #ffeef0; }
    .diff-removed .line-content::before { content: "- "; color: red; font-weight: bold; }
    .diff-common .line-content::before { content: "  "; } /* For alignment */

    /* Styles for in-line changes */
    .diff-changed-container .line-content::before { content: "~ "; color: orange; font-weight: bold;}

    .word-diff-removed {
        background-color: #fdd; /* Light red */
        text-decoration: line-through;
    }
    .word-diff-added {
        background-color: #dfd; /* Light green */
        font-weight: bold;
    }
    /* Common words within a changed line don't need special styling unless desired */


    #status { margin-top: 15px; text-align: center; color: #666; min-height: 20px; }

    @media (max-width: 768px) {
      .controls-main { flex-direction: column; align-items: center; }
      .controls-main .tc-button { width: 80%; margin-bottom: 5px; }
      .text-input-area { flex-direction: column; }
      .text-input-area textarea { min-height: 150px; }
      #comparisonOptions { flex-direction: column; align-items: flex-start; }
    }
