body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f3f4f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s;
}
.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: background-color 0.3s;
}
h1 {
    margin-bottom: 20px;
    color: #111827;
}
form {
    display: flex;
    flex-direction: column;
}
input[type="url"] {
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}
button {
    padding: 15px;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #1d4ed8;
}

form input[type="text"] {
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}

.result {
    margin-top: 20px;
}
.result input {
    width: calc(100% - 110px);
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}
.result button {
    padding: 10px 15px;
    margin-left: 10px;
    background-color: #10b981;
}
.result button:hover {
    background-color: #059669;
}
.error {
    color: #dc2626;
}
.toggle-theme {
    position: absolute;
    top: 20px;
    right: 20px;
}
#switch {
    opacity: 0;
    position: absolute;
}
label {
    background-color: #111827;
    border-radius: 50px;
    cursor: pointer;
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}
label::after {
    background-color: #fff;
    border-radius: 50%;
    content: '';
    height: 20px;
    left: 2px;
    position: absolute;
    top: 2px;
    width: 20px;
    transition: 0.3s;
}
#switch:checked + label {
    background-color: #4b5563;
}
#switch:checked + label::after {
    left: 28px;
}
/* Dark Mode Styles */
body.dark-mode {
    background-color: #1f2937;
    color: #f9fafb;
}
body.dark-mode .container {
    background-color: #374151;
}
body.dark-mode input[type="url"],
body.dark-mode .result input {
    background-color: #4b5563;
    color: #f9fafb;
    border-color: #6b7280;
}
body.dark-mode button {
    background-color: #2563eb;
}
body.dark-mode button:hover {
    background-color: #1d4ed8;
}
body.dark-mode .result button {
    background-color: #10b981;
}
body.dark-mode .result button:hover {
    background-color: #059669;
}
body.dark-mode .error {
    color: #f87171;
}
