body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align items at the start to allow scrolling */
    height: 100vh;
    margin: 0;
    overflow: auto; /* Allow scrolling */
}

.container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 90%;
    max-width: 600px;
    margin: 20px;
    box-sizing: border-box; /* Ensures padding is included in width calculations */
}

h1, h2 {
    color: #007BFF;
    font-size: 1.5em;
    margin: 0.5em 0;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 1em;
}

input[type="url"] {
    width: 100%; /* Full width */
    padding: 10px;
    padding-right: 30px; /* Make space for the clear button */
    box-sizing: border-box; /* Ensures padding is included in width calculations */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    height: auto;
}

.clear-button {
    position: absolute;
    right: 10px;
    top: 50%;
    /*transform: translateY(-50%);*/
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #007BFF;
    height: auto;
    width: auto;
    padding: 0;
    line-height: 1;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.checkbox-label {
    margin-left: 5px;
    font-size: 1em;
}

button[type="submit"] {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 45%; /* Set the clean button to 45% of the input field width */
    font-size: 1em;
    margin-top: 10px;
    text-align: center; /* Center the text within the button */
    display: block;
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

a {
    color: #007BFF;
    text-decoration: none;
    font-size: 1em;
}

a:hover {
    text-decoration: underline;
}

small {
    color: #666;
    font-size: 0.8em;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 100px;
    width: 100%; /* Make logo responsive */
    height: auto; /* Maintain aspect ratio */
}

#cleanedUrl-container {
    margin-top: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

#cleanedUrl {
    font-size: 1.1em;
    font-weight: bold;
    color: #007BFF;
    word-wrap: break-word; /* Ensure long URLs break nicely */
    flex-grow: 1; /* Allow URL to take available space */
}

.copy-button {
    margin-left: 10px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.2em; /* Use relative font size */
    color: #007BFF;
    display: none; /* Initially hidden */
    align-items: center;
    padding: 0;
    line-height: 1;
}

.copied-text {
    margin-left: 10px;
    font-size: 0.9em;
    color: #007BFF;
    font-style: italic;
    display: none; /* Initially hidden */
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        width: 100%;
        margin: 10px;
        padding: 15px;
    }

    .logo {
        max-width: 80px;
    }

    h1, h2 {
        font-size: 1.2em;
    }

    input[type="url"] {
        width: calc(100% - 35px); /* Adjust for smaller clear button */
    }

    .clear-button {
        font-size: 1.2em;
    }
}
