:root {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --primary-color: #4568DC;
    --secondary-color: #7851A9;
    --surface-color: #1e1e1e;
    --border-color: #333;
    --button-hover: #5676e6;
    --success-color: #4CAF50;
}

[data-theme="light"] {
    --bg-color: #f5f5f5;
    --text-color: #333;
    --primary-color: #4568DC;
    --secondary-color: #7851A9;
    --surface-color: #ffffff;
    --border-color: #ddd;
    --button-hover: #3a5bc7;
    --success-color: #4CAF50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.description {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.url-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

input[type="text"] {
    padding: 0.8rem 1rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    background-color: var(--surface-color);
    color: var(--text-color);
    width: 100%;
}

button {
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    background-color: var(--primary-color);
    color: #fff;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--button-hover);
}

#sanitize-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

#clear-button {
    background-color: var(--border-color);
}

.result-container {
    background-color: var(--surface-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.result-container h2 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.result {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    border-radius: 5px;
    padding: 0.8rem;
    position: relative;
}

#result-text {
    flex-grow: 1;
    word-break: break-all;
    margin-right: 2.5rem;
}

#copy-button {
    position: absolute;
    right: 0.5rem;
    background: transparent;
    color: var(--text-color);
    padding: 0.5rem;
}

#copy-button:hover {
    color: var(--primary-color);
}

.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--success-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 1.5rem;
}

/* Toggle switch styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

@media (min-width: 768px) {
    .url-container {
        flex-direction: row;
    }
    
    input[type="text"] {
        flex-grow: 1;
    }
    
    #sanitize-button, #clear-button {
        width: auto;
        white-space: nowrap;
    }
}
