/* --- 1. Define Color Variables --- */
:root {
    --background-color: #ffffff;
    --text-color: #333333;
    --button-bg: #e0e0e0;
    --button-text: #333333;
    --border-color: #ccc;
}

[data-theme="dark"] {
    --background-color: #222222;
    --text-color: #e0e0e0;
    --button-bg: #555555;
    --button-text: #e0e0e0;
    --border-color: #555555;
}

/* --- 2. Basic Body & Content Styling --- */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: sans-serif;
    transition: background-color 0.3s, color 0.3s;
    padding: 2rem;
}

.content {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.content button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

/* --- 3. Toggle Switch Styles --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked + .slider {
    background-color: #6633cc;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}