/* --- iOS Style Toggle Button --- */
.theme-toggle {
    /* Dimensions */
    width: 52px;
    height: 32px;
    
    /* Reset default button styles */
    border: none;
    padding: 0;
    cursor: pointer;
    
    /* iOS Styling */
    background: #e9e9eb; /* iOS Off-Gray */
    border-radius: 16px; /* Fully rounded edges */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    
    /* Smooth transition for background color */
    transition: background 0.3s ease;
    
    /* Optional: Subtle shadow for depth */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* The White Circle Knob (using pseudo-element) */
.theme-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-radius: 50%;
    
    /* Shadow to make it look "raised" like iOS */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    
    /* Smooth slide animation */
    transition: transform 0.3s ease;
}

/* --- ACTIVE STATE (Dark Mode ON) --- */
body.dark-theme .theme-toggle {
    background: #34c759; /* iOS Native Green */
}

/* Slide the knob to the right */
body.dark-theme .theme-toggle::after {
    transform: translateX(20px);
}

/* Optional: Hover effects */
.theme-toggle:hover::after {
    background: #f0f0f0;
}