body {
    margin: 0;
}

/* Navbar */
ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #f3f3f3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

li {
    display: inline-block;
}

li a, .dropbtn {
    display: inline-block;
    color: #666;
    text-align: center;
    padding: 15px 15px;
    text-decoration: none;
}

li a:hover, .dropdown:hover .dropbtn {
    background-color: #ddd;
}

li a.active {
    color: white;
    background-color: #007bff;
}

.dropdown {
    display: inline-block;
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
}

.dropdown-content a {
    color: black;
    padding: 12px 12px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.website-name {
    font-weight: bold;
    font-size: 1.5em;
    margin-left: 10px;
    margin-right: 10px;
    display: inline-block;
    text-align: center;
}

/* Page Style */
.container {
    margin-top: 20px;
    max-width: 1000px;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-left: auto;
    margin-right: auto;
}

form {
    margin-top: 20px;
}

/* Inputs side by side */
.input-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

textarea {
    width: 100%;
    height: 200px;
    resize: none;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.counter {
    text-align: right;
    font-size: 0.9em;
    color: #666;
}

.buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.copy-button, .clear-button {
    background-color: #007bff;
    color: white;
    padding: 10px 10px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    border: none;
}

.copy-button:hover, .clear-button:hover {
    background-color: #0056b3;
}

.copy-button {
    margin-top: 10px;
}

.notification {
    color: green;
    margin-top: 10px;
}

button {
    padding: 10px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

button:hover {
    background-color: #0056b3;
}

.qiafan-section {
    margin-top: 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.qiafan-section img {
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    width: 100%;
    object-fit: contain;
}

/* Comparison Layout */
.comparison-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.text-column {
    width: 45%;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: monospace;
    word-wrap: break-word;
    overflow-x: auto; /* Enable horizontal scrolling for long lines */
}

.text-column pre {
    white-space: pre-wrap; /* Keep line breaks, prevent text wrapping */
    overflow-x: auto; /* Allow horizontal scrolling */
    word-wrap: break-word; /* Handle long words */
    padding: 10px; /* Add padding for readability */
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Stack vertically on smaller screens */
@media (max-width: 768px) {
    .comparison-container, .input-container {
        display: block;
    }

    .text-column {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Highlight differences */
.diff-added {
    background-color: #d4edda; /* Green for added lines */
    color: #155724;
}

.diff-removed {
    background-color: #f8d7da; /* Red for removed lines */
    color: #721c24;
}

.complete-match {
    color: green;
    font-weight: bold;
}
