/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    display: flex; /* Use Flexbox for layout */
    flex-direction: column; /* Stack elements vertically */
    min-height: 100vh; /* Ensure the body takes at least full viewport height */
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 20px; /* Add padding to the body */
}
.container {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 750px;
    margin: 20px auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px; /* Increased margin */
}
h1 {
    margin: 0;
    color: #333;
    transition: color 0.3s ease;
}
p {
    text-align: center;
    color: #666;
    margin-bottom: 30px; /* Increased margin */
    transition: color 0.3s ease;
}
.settings {
    margin-bottom: 40px; /* Increased margin */
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none; /* Standard property */
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    margin-bottom: 20px; /* Increased margin */
    transition: background-color 0.3s ease;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none; /* Standard property */
    width: 20px;
    height: 20px;
    background: #1E88E5; /* Slightly darker blue */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
input[type="range"]:focus::-webkit-slider-thumb {
    background-color: #1976D2; /* Darker blue on focus */
}
/* Toggle Switch Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 55px; /* Reduced width */
    height: 28px; /* Reduced height */
    margin-left: 5px; /* Added margin to the left of the switch */
}
.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: 0.4s;
    border-radius: 14px; /* Adjusted radius for new height */
    -webkit-appearance: none; /* For WebKit-based browsers */
    appearance: none; /* Standard property */
}
.slider:before {
    position: absolute;
    content: "";
    height: 22px; /* Reduced height */
    width: 22px; /* Reduced width */
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    -webkit-appearance: none; /* For WebKit-based browsers */
    appearance: none; /* Standard property */
}
input:checked + .slider {
    background-color: #1E88E5; /* Slightly darker blue */
}
input:focus + .slider {
    box-shadow: 0 0 1px #1E88E5; /* Slightly darker blue */
}
input:checked + .slider:before {
    transform: translateX(28px); /* Adjusted translation for new dimensions */
}
/* Toggle Label Adjustments */
.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 5px; /* Reduced gap to bring names closer */
    margin-bottom: 10px; /* Added margin to separate toggle labels */
}
/* Password Strength Progress Bar */
.strength-output {
    margin-top: 20px; /* Increased margin */
}
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #eaeaea;
    border-radius: 5px;
    overflow: hidden;
    background: linear-gradient(to right, #eaeaea, #d3d3d3); /* Subtle gradient */
}
.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}
.strength-text {
    margin-top: 10px; /* Increased margin */
    font-weight: bold;
    transition: color 0.3s ease;
}
/* Inline Copy Notification */
#copyNotification {
    display: none;
    color: #1E88E5; /* Slightly darker blue */
    font-size: 14px;
    margin-left: 10px;
    transition: opacity 0.3s ease;
}
/* Buttons */
button {
    background-color: #1E88E5; /* Slightly darker blue */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    margin-top: 20px; /* Increased margin */
    transition: background-color 0.3s ease;
}
button:hover {
    background-color: #1976D2; /* Darker blue on hover */
}
button:active {
    background-color: #1565C0; /* Even darker blue on active */
}
button#copyBtn {
    width: auto;
    padding: 8px 12px;
    margin-left: 10px;
}
input[type="text"] {
    width: calc(100% - 120px);
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    margin-bottom: 20px; /* Increased margin */
}
input[type="text"]:focus {
    border-color: #1E88E5; /* Slightly darker blue */
}
/* Adsense Ad Placement */
.adsense-ad {
    margin-top: 40px; /* Increased margin for better spacing */
    text-align: center;
}
/* Dark Mode Toggle */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 15px; /* Increased gap */
}
/* Footer Styling */
footer {
    font-size: 10px; /* Small font size */
    color: #999; /* Subtle gray color */
    text-align: center;
    padding: 10px 0; /* Increased padding */
    background-color: transparent; /* No background for subtlety */
    margin-top: 30px; /* Increased margin */
    border-top: 1px solid #ddd; /* Subtle border for separation */
}
footer a {
    color: #666; /* Slightly darker link color */
    text-decoration: none;
    transition: color 0.3s ease;
}
footer a:hover {
    color: #1E88E5; /* Slightly darker blue */
    text-decoration: underline; /* Subtle hover effect */
}
/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 15px; /* Reduced padding for mobile */
    }
    .container {
        padding: 15px;
    }
    h1 {
        font-size: 24px;
    }
    .switch {
        width: 40px; /* Further reduced width for mobile */
        height: 22px; /* Further reduced height for mobile */
        margin-left: 3px; /* Reduced margin for mobile */
    }
    .slider {
        border-radius: 11px; /* Adjusted radius for new height */
    }
    .slider:before {
        height: 16px; /* Reduced height */
        width: 16px; /* Reduced width */
        left: 3px;
        bottom: 3px;
    }
    input:checked + .slider:before {
        transform: translateX(18px); /* Adjusted translation for new dimensions */
    }
    button {
        font-size: 14px;
        padding: 8px 12px;
    }
    input[type="text"] {
        font-size: 14px;
        padding: 8px;
    }
    .dark-mode-toggle {
        flex-direction: column;
        align-items: flex-end;
        margin-top: 20px; /* Increased margin */
    }
    .header {
        margin-bottom: 20px; /* Increased margin */
    }
    p {
        margin-bottom: 20px; /* Increased margin */
    }
    .settings {
        margin-bottom: 30px; /* Increased margin */
    }
    .adsense-ad {
        margin-top: 30px; /* Increased margin for better spacing on mobile */
    }
    footer {
        margin-top: 20px; /* Increased margin */
        border-top: 1px solid #555; /* Subtle border for separation in dark mode */
    }
    .toggle-label {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px; /* Reduced gap between toggle labels */
        margin-bottom: 10px; /* Added margin to separate toggle labels */
    }
    .checkbox-group {
        margin-bottom: 20px; /* Added margin to separate checkbox group from other settings */
    }
}
/* Accessibility Enhancements */
button:focus, input[type="text"]:focus, .slider:focus {
    outline: 2px solid #1E88E5; /* Slightly darker blue */
    outline-offset: 2px;
}
/* Dark Mode Styles */
body.dark-mode {
    background-color: #333;
    color: #eee;
}
body.dark-mode .container {
    background-color: #444;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}
body.dark-mode h1 {
    color: #fff;
}
body.dark-mode p {
    color: #ccc;
}
body.dark-mode .settings {
    margin-bottom: 40px; /* Increased margin */
}
body.dark-mode input[type="range"] {
    background: #555;
}
body.dark-mode input[type="range"]::-webkit-slider-thumb {
    background: #1E88E5; /* Slightly darker blue */
}
body.dark-mode .slider {
    background-color: #555;
}
body.dark-mode .slider:before {
    background-color: #fff;
}
body.dark-mode input:checked + .slider {
    background-color: #1E88E5; /* Slightly darker blue */
}
body.dark-mode input:checked + .slider:before {
    transform: translateX(27px); /* Move inner circle to the right in dark mode */
}
body.dark-mode .progress-bar {
    background-color: #555;
}
body.dark-mode .progress-fill {
    background-color: #1E88E5; /* Slightly darker blue */
}
body.dark-mode .strength-text {
    color: #fff;
}
body.dark-mode #copyNotification {
    color: #1E88E5; /* Slightly darker blue */
}
body.dark-mode button {
    background-color: #1E88E5; /* Slightly darker blue */
}
body.dark-mode button:hover {
    background-color: #1976D2; /* Darker blue on hover */
}
body.dark-mode button:active {
    background-color: #1565C0; /* Even darker blue on active */
}
body.dark-mode input[type="text"] {
    border-color: #555;
}
body.dark-mode footer {
    color: #999;
}
body.dark-mode footer a {
    color: #666;
}
body.dark-mode footer a:hover {
    color: #1E88E5; /* Slightly darker blue */
}