body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f7f9fc;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.result-section {
    margin-top: 20px;
}

.result-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
}

.params-table th, .params-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.params-table th {
    background-color: #f5f7fa;
    font-weight: 600;
}

.param-key {
    color: #2980b9;
    font-weight: 500;
}

.param-value {
    color: #16a085;
    word-break: break-all;
}

.no-params {
    color: #7f8c8d;
    font-style: italic;
}

.components-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.components-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.components-table td:first-child {
    width: 120px;
    font-weight: 500;
    color: #2c3e50;
}

.component-value {
    word-break: break-all;
    color: #34495e;
}

.copy-btn {
    background-color: #e2e8f0;
    color: #4a5568;
    padding: 4px 8px;
    font-size: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.copy-btn:hover {
    background-color: #cbd5e0;
}

.history-section {
    margin-top: 30px;
}

.history-item {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    background-color: #f5f7fa;
    transition: background-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2c3e50;
}

/* Container for history item text and delete button */
.history-item-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    background-color: #f5f7fa;
    transition: background-color 0.2s;
}

.history-item-container:hover {
    background-color: #e2e8f0;
}

/* Text part of the history item */
.history-item-text {
    flex-grow: 1; /* Take available space */
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2c3e50;
    margin-right: 10px; /* Space between text and button */
}

/* Delete button for history items */
.history-delete-btn {
    background-color: transparent;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 18px; /* Make the 'x' larger */
    padding: 0 5px; /* Minimal padding */
    line-height: 1; /* Adjust line height for better centering */
    flex-shrink: 0; /* Prevent button from shrinking */
}

.history-delete-btn:hover {
    color: #e74c3c; /* Red color on hover */
    background-color: transparent; /* Ensure no background on hover */
}

/* Container for history item buttons */
.history-item-buttons {
    display: flex; /* Keep buttons in a row */
    align-items: center; /* Align buttons vertically */
    flex-shrink: 0; /* Prevent this container from shrinking */
}

/* Style for clickable URL parameters */
.clickable-url-param {
    color: #3498db; /* Link-like blue color */
    cursor: pointer;
    text-decoration: none; /* No underline by default */
}

.clickable-url-param:hover {
    text-decoration: underline; /* Underline on hover */
}

/* Comparison Selection Styles */
#compareSection {
    margin-top: 30px;
}

#selectedForCompare p {
    margin-bottom: 10px;
    color: #555;
}

#selectedForCompare .selected-url-item {
    background-color: #eef;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#selectedForCompare .selected-url-item span {
    flex-grow: 1;
    margin-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#compareBtn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* History Item Selection Styles */
.history-item-container.selected-for-compare {
    background-color: #d6eaf8; /* Light blue background for selected items */
    border-left: 3px solid #3498db;
}

.select-compare-btn {
    background-color: #aed6f1;
    color: #2980b9;
    padding: 2px 6px;
    font-size: 11px;
    margin-left: 8px;
    vertical-align: middle;
    border-radius: 3px;
}

.select-compare-btn:hover {
    background-color: #85c1e9;
}

.select-compare-btn.selected {
    background-color: #3498db;
    color: white;
}

.select-compare-btn:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}
