body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh; /* Ensure the body has at least the full viewport height */
    display: flex;
    flex-direction: column;
}

.dark-mode {
    background-color: #333;
    color: #f0f0f0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #e0e0e0;
}

.dark-mode header {
    background: #222;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
}

.container {
    width: 720px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    flex-grow: 1; /* This allows the container to grow and fill available space */
    min-height: calc(100vh - 130px); /* Minus the header and footer height */
}

footer {
    text-align: center;
    padding: 20px 0;
    background: #ddd;
}

.dark-mode footer {
    background: #222;
}

.dropdown {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff url('data:image/svg+xml;utf8,<svg fill="%23000" viewBox="0 0 24 24" width="24" height="24"><path d="M7 10l5 5 5-5H7z"/></svg>') no-repeat right 0.75rem center;
    background-size: 1.25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-bottom: 20px;
    width: 100%;
}

/* Dark Mode adjustments for dropdown */
.dark-mode .dropdown {
    background-color: #444;
    color: #fff;
    border-color: #777;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23fff" viewBox="0 0 24 24" width="24" height="24"><path d="M7 10l5 5 5-5H7z"/></svg>');
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; /* Reduced size */
    width: 16px;  /* Reduced size */
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

.switch.small {
    width: 30px; /* Reduced size */
    height: 20px; /* Reduced size */
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(12px); /* Adjusted for smaller size */
    -ms-transform: translateX(12px);
    transform: translateX(12px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}